Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp33695pxj; Wed, 16 Jun 2021 19:30:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgicY+/dkHYkyArP00btbIAqHC8jvza29/pXFN1YL60tLlmBRRD9YT9K8HH6OKuSPtp2rW X-Received: by 2002:a17:906:4697:: with SMTP id a23mr2572528ejr.305.1623897024426; Wed, 16 Jun 2021 19:30:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623897024; cv=none; d=google.com; s=arc-20160816; b=GT2WvzMk6ur3y5cMzJjzCCcNO8k5WTvLBKGOQx86oGjqYhJFF+AEkkVc1/F8ZaOXWE zEPsKoiDhO7Of/xd63W5YofMsbj7S/1z712odz2lS3kT1GUqPaHYBl9Vkkyq6dpscoal JSHpjQ0NQc+9y8Qr/2JHISunNYoGUYQ+PGtqjENeRSvQCXSh05ZKdJrzt09sQONCOqIa 5gTKPsD598kVKEO6MycLCeS/mXgVwgJolGn4NA8yF9AloDwXsR51TYVaGqvj5FC16WO8 73Pdu9GVmiTCs5OczcacxWD1KLjcCqGDv8UmH0tvV25GPs0UqqE9lkt4FOG9dz+Ifbpt 9RnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ynFypKw6yaFTAwjszi5wGpSPgyHOdH7h2sszX4y3jj8=; b=kHK9Ms/Dp+IFbIeHwNJ32AkqMBBn70oDgEOyjFvUC+m+s8LJQauBsPdCg5JtFSWaSc kZsvpxMGtLVDE4Ek/pW3YdBOE7Y3o4habHL6Y4X6NNeOXBzuQYjOxOo/m5CJ2NxY4AKc RFTmJyknPYnVuPkcZ80ytOuE4NJMdSfbqiD1Dpp5AF44M0/+YysNy+fZ4LgOQUvGB5nw bUlR4Hv9Zee19kVADb4RzGIOeVYtvma374cAJGUzKh+yx7jzmwGow2QkQrjkpFwq8mGG QAm4NqMxY952tJ2Mz/mUZ1aROp3V/lg1FOPAB7GtvKK8++LdkiMaawW5UqCC/ch13Pbx EHCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IfXqqk5q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si4350604ejc.247.2021.06.16.19.30.01; Wed, 16 Jun 2021 19:30:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IfXqqk5q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234209AbhFPWPs (ORCPT + 99 others); Wed, 16 Jun 2021 18:15:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:31626 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232258AbhFPWPo (ORCPT ); Wed, 16 Jun 2021 18:15:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623881616; 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=IfXqqk5qaqrzRdlu5QqLvnvN/WViw6bq5BA+bUw0RjzLsxXPdoDKmN3jac/G/WbcEw7KHd fXuR7NVoEDsoHjmfEbPtLUr5p0u688UzX1aVFwuvlmf8bIcUGPOPqI/Swt+0lCdPfBWVva 9izL68n31TlNiBTocmkhXcyPeu5huNA= 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.