From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CF4FC49361 for ; Wed, 16 Jun 2021 22:13:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F269B613BD for ; Wed, 16 Jun 2021 22:13:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F269B613BD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6E88F6B0070; Wed, 16 Jun 2021 18:13:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 697786B0071; Wed, 16 Jun 2021 18:13:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 538F16B0072; Wed, 16 Jun 2021 18:13:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0135.hostedemail.com [216.40.44.135]) by kanga.kvack.org (Postfix) with ESMTP id 1E1246B0070 for ; Wed, 16 Jun 2021 18:13:41 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 9E318181AEF09 for ; Wed, 16 Jun 2021 22:13:35 +0000 (UTC) X-FDA: 78260989590.23.677F7DF Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf30.hostedemail.com (Postfix) with ESMTP id 3A317E000271 for ; Wed, 16 Jun 2021 22:13:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623881614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ynFypKw6yaFTAwjszi5wGpSPgyHOdH7h2sszX4y3jj8=; b=dOWPnsscC/8eBALUWcz3VcAL6XyId1KcBjyhnP7YxTTRrrUXJ2nWs7N/fabmG2csfMRo20 9J7u1WCOvzbHeDR4dh8EQQ7une7nNrSaJfrnDOK1mZFry2mZTkbnirnwa2lgDxjCIolrI5 rlOIygRKsfafwUiaIFkSswhlfSetCYE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-231-sP0V_TQWNIyTTK4aNmmkdg-1; Wed, 16 Jun 2021 18:13:33 -0400 X-MC-Unique: sP0V_TQWNIyTTK4aNmmkdg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 867BA1084F41; Wed, 16 Jun 2021 22:13:31 +0000 (UTC) Received: from optiplex-fbsd (unknown [10.3.128.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1BB4710016F4; Wed, 16 Jun 2021 22:13:28 +0000 (UTC) Date: Wed, 16 Jun 2021 18:13:26 -0400 From: Rafael Aquini To: Vlastimil Babka Cc: Georgi Djakov , akpm@linux-foundation.org, iamjoonsoo.kim@lge.com, rientjes@google.com, penberg@kernel.org, cl@linux.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, djakov@kernel.org Subject: Re: [PATCH] mm/slub: Add taint after the errors are printed Message-ID: References: <1623860738-146761-1-git-send-email-quic_c_gdjako@quicinc.com> <4b22baf7-582b-f1ae-a525-046a493ec85f@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4b22baf7-582b-f1ae-a525-046a493ec85f@suse.cz> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=dOWPnssc; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf30.hostedemail.com: domain of aquini@redhat.com has no SPF policy when checking 216.205.24.124) smtp.mailfrom=aquini@redhat.com X-Rspamd-Server: rspam02 X-Stat-Signature: uzrp8nm6boxqwyw8x35pyzdhm7nizfec X-Rspamd-Queue-Id: 3A317E000271 X-HE-Tag: 1623881608-334011 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Jun 16, 2021 at 06:34:41PM +0200, Vlastimil Babka wrote: > On 6/16/21 6:25 PM, Georgi Djakov wrote: > > When running the kernel with panic_on_taint, the usual slub debug error > > messages are not being printed when object corruption happens. That's > > because we panic in add_taint(), which is called before printing the > > additional information. This is a bit unfortunate as the error messages > > are actually very useful, especially before a panic. Let's fix this by > > moving add_taint() after the errors are printed on the console. > > > > Signed-off-by: Georgi Djakov > > Makes sense. > > While at it, I wonder if we should use LOCKDEP_STILL_OK instead of > LOCKDEP_NOW_UNRELIABLE. Isn't it too pessimistic to assume that some slab's > memory corruption hit some lock state? > Given there is noted corruption I don't think it's safe to assume otherwise.