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=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL 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 B11C5C48BE8 for ; Fri, 18 Jun 2021 19:38:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9641861261 for ; Fri, 18 Jun 2021 19:38:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234064AbhFRTkP (ORCPT ); Fri, 18 Jun 2021 15:40:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229816AbhFRTkN (ORCPT ); Fri, 18 Jun 2021 15:40:13 -0400 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5343CC061574 for ; Fri, 18 Jun 2021 12:38:03 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id e33so8622645pgm.3 for ; Fri, 18 Jun 2021 12:38:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=efZiryzTZwErGPG9eUAqI8R5gBkZ9//XEzY7JmzlBZo=; b=meopqwHKty7urd9b/j/Syk7Hqvgj8LIJzopjpDceO3tXr+t/JjTvgpVzEIt8uur/bp O4eAQOwv1Q1O2tSsR1bL2LjV+gvhBtFhSw3AcI/BiX8JKjzOU3GC1ZuWT4jwQyqJVK4f YHl1xy78/znRIqh0soZANGYuQ6uuJDY5SBAjjNaDr76WhQ5Llt3HHGsI4xMurqsfEGAY Pl/UZYWtI5Wg54bCsMDFmO2P9hlwL39PbVIGynY/hkpfDDOsf9ngxppFwvwtu+VIa8Q/ 0Ey4CO7ebVOxUsJbDvwfIujUfnkmlELjGteOiDT/o4jZc+oSba1qBzqXmfOTQvjESqDP YNdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=efZiryzTZwErGPG9eUAqI8R5gBkZ9//XEzY7JmzlBZo=; b=tv9wtcheJFSbcrUrfxwQ4OAiwMyYJukAOASZh9UySPHBxwYXAtKAgbP25EJrVv+PKn 6WrQ87oLszq5FXQFgFo+pg1EVSfgEPBK2vVsK9NHCcu74mkW0+BRxFb519W814+BozHi TOVcL9C6Swhz5XSol6RMgc/In2o69FmggJzhZL+ibRG9amEPpZZLcS7pZQvQAnJwvUIm hcXEEh6xGJTRz1wGbbTAKZvzsbMvh2+jUyyUb+Re+YeoujhJOWynX/KQLgm6QLtXbPCP sjXiwTtTFA/OH965NH1/GLETWZgHbt0gEwZQnI1twRbopGw5RRyEncB203RDUBe/nOME qhuw== X-Gm-Message-State: AOAM533SKPNIdJShq8Vxnhuquw4HA/CSf4615+Lay7dIKvC/qexLbUcy 57IfD0m10HzdVU1RqUcxIPejiQ== X-Google-Smtp-Source: ABdhPJyb+EHmf/mckTtVARAc0EwTJ/lWhcRvsPrRgfIRUTgj05qgMsJnlWiTPYcj59BEIaCMEFQgLw== X-Received: by 2002:a62:be03:0:b029:2e9:fe8c:effe with SMTP id l3-20020a62be030000b02902e9fe8ceffemr6563096pff.34.1624045082626; Fri, 18 Jun 2021 12:38:02 -0700 (PDT) Received: from [2620:15c:17:3:3a6:a5d0:1984:a150] ([2620:15c:17:3:3a6:a5d0:1984:a150]) by smtp.gmail.com with ESMTPSA id y2sm8510157pfa.195.2021.06.18.12.38.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 12:38:01 -0700 (PDT) Date: Fri, 18 Jun 2021 12:38:01 -0700 (PDT) From: David Rientjes To: Georgi Djakov cc: vbabka@suse.cz, akpm@linux-foundation.org, iamjoonsoo.kim@lge.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 In-Reply-To: <1623860738-146761-1-git-send-email-quic_c_gdjako@quicinc.com> Message-ID: <413080c2-bfd7-f386-709c-43718242ae87@google.com> References: <1623860738-146761-1-git-send-email-quic_c_gdjako@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 Jun 2021, 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 Acked-by: David Rientjes 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=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL 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 93200C48BDF for ; Fri, 18 Jun 2021 19:38:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3C8D261279 for ; Fri, 18 Jun 2021 19:38:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C8D261279 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BE0F66B006C; Fri, 18 Jun 2021 15:38:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B90F56B006E; Fri, 18 Jun 2021 15:38:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A316B6B0072; Fri, 18 Jun 2021 15:38:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0107.hostedemail.com [216.40.44.107]) by kanga.kvack.org (Postfix) with ESMTP id 738F16B006C for ; Fri, 18 Jun 2021 15:38:04 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 08059180AD81F for ; Fri, 18 Jun 2021 19:38:04 +0000 (UTC) X-FDA: 78267855288.06.FC11981 Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by imf15.hostedemail.com (Postfix) with ESMTP id 321F5A001A51 for ; Fri, 18 Jun 2021 19:38:03 +0000 (UTC) Received: by mail-pg1-f173.google.com with SMTP id t13so8588724pgu.11 for ; Fri, 18 Jun 2021 12:38:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=efZiryzTZwErGPG9eUAqI8R5gBkZ9//XEzY7JmzlBZo=; b=meopqwHKty7urd9b/j/Syk7Hqvgj8LIJzopjpDceO3tXr+t/JjTvgpVzEIt8uur/bp O4eAQOwv1Q1O2tSsR1bL2LjV+gvhBtFhSw3AcI/BiX8JKjzOU3GC1ZuWT4jwQyqJVK4f YHl1xy78/znRIqh0soZANGYuQ6uuJDY5SBAjjNaDr76WhQ5Llt3HHGsI4xMurqsfEGAY Pl/UZYWtI5Wg54bCsMDFmO2P9hlwL39PbVIGynY/hkpfDDOsf9ngxppFwvwtu+VIa8Q/ 0Ey4CO7ebVOxUsJbDvwfIujUfnkmlELjGteOiDT/o4jZc+oSba1qBzqXmfOTQvjESqDP YNdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=efZiryzTZwErGPG9eUAqI8R5gBkZ9//XEzY7JmzlBZo=; b=hMEAZ3ytrc32OKtDERADMzQvL7NzJAfrtwpeeIl/ZcLzIm9cSdZ65EqgrRdnVcGxRv 6dfGHKIUMWeuGKOW+u1n3joRZTbSCRqmOA8rsihXfZeMPdp6Ra/ddE2aCR2y/kWO7Vz/ vdY1CGuhMk71YC/guLle02+kWmx995E+FlRpFPZTaby4sASD4Gd2Iw0zzIokJOZ05bvW xRLCel29RPucaYHnrmoflW578KQXerqCMnK/90alTG5U0j1ENx9rsqu/QBfRErc3XkSl yYuxG8GjyyrK5oNA8xDoGJS2Ma+ynadL/WUTq8faGkQyPMnvEuJd21ZjQKS2NVe71C6D MjmQ== X-Gm-Message-State: AOAM533gAM1i8qIHcO4+tx43ylLhvvNXNPbGApboWb2MX+OPz5OoRw0i n59L2wyX2mZSFFVIsFFyNzZ5NQ== X-Google-Smtp-Source: ABdhPJyb+EHmf/mckTtVARAc0EwTJ/lWhcRvsPrRgfIRUTgj05qgMsJnlWiTPYcj59BEIaCMEFQgLw== X-Received: by 2002:a62:be03:0:b029:2e9:fe8c:effe with SMTP id l3-20020a62be030000b02902e9fe8ceffemr6563096pff.34.1624045082626; Fri, 18 Jun 2021 12:38:02 -0700 (PDT) Received: from [2620:15c:17:3:3a6:a5d0:1984:a150] ([2620:15c:17:3:3a6:a5d0:1984:a150]) by smtp.gmail.com with ESMTPSA id y2sm8510157pfa.195.2021.06.18.12.38.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 12:38:01 -0700 (PDT) Date: Fri, 18 Jun 2021 12:38:01 -0700 (PDT) From: David Rientjes To: Georgi Djakov cc: vbabka@suse.cz, akpm@linux-foundation.org, iamjoonsoo.kim@lge.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 In-Reply-To: <1623860738-146761-1-git-send-email-quic_c_gdjako@quicinc.com> Message-ID: <413080c2-bfd7-f386-709c-43718242ae87@google.com> References: <1623860738-146761-1-git-send-email-quic_c_gdjako@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=meopqwHK; spf=pass (imf15.hostedemail.com: domain of rientjes@google.com designates 209.85.215.173 as permitted sender) smtp.mailfrom=rientjes@google.com; dmarc=pass (policy=reject) header.from=google.com X-Stat-Signature: t4jjagbdjn8wfnupno1r1r56kww9ocqc X-Rspamd-Queue-Id: 321F5A001A51 X-Rspamd-Server: rspam06 X-HE-Tag: 1624045083-136460 X-Bogosity: Ham, tests=bogofilter, spamicity=0.002590, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, 16 Jun 2021, 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 Acked-by: David Rientjes