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 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 77ECFC54E5D for ; Tue, 12 Mar 2024 22:01:57 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=h3rW0w7J; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4TvSKb6NB4z3vXm for ; Wed, 13 Mar 2024 09:01:55 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=h3rW0w7J; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=chromium.org (client-ip=2607:f8b0:4864:20::102f; helo=mail-pj1-x102f.google.com; envelope-from=keescook@chromium.org; receiver=lists.ozlabs.org) Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4TvSJf5nQwz2xPZ for ; Wed, 13 Mar 2024 09:01:04 +1100 (AEDT) Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-29be5386b74so2218405a91.3 for ; Tue, 12 Mar 2024 15:01:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1710280859; x=1710885659; darn=lists.ozlabs.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=lLq08iYnVcnWuDzFJHO0LDnyeIZ1/WCj/v6YSvUnsiY=; b=h3rW0w7JxwshCDQ9yWB8qYoNyW+zFuVa+L8eDwMaYIb8V68oQI0dyVClRmj2p7k7vn tIymHU41CO/rPUYlZ7akcpRfDlNzBmnE7zWXqH3MdrHvkC6Mp7tx/jm6mKPc4TjqDWM0 elj5fXt+vC4KsjYcx2AjV6mp/HGT4fhuOso8E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710280859; x=1710885659; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=lLq08iYnVcnWuDzFJHO0LDnyeIZ1/WCj/v6YSvUnsiY=; b=L6KBExZnJ/l0zmUye5amdc9+g/OFCz15dTQkPn6hUFeli3HOOHbrhJwlb0uLnor/B1 ebZYVO+rLCsSwd26cdZN21JKoq1yj8VJiFOGGxSlCHEXElVCu5LFbNUolCddzGUNEbW/ /7DhNfj8pac4TZkjh+5gGqQ7LG6YCuWlvv39JQGNknKJrfuZgrH9LJRq6xAUnhK4wNvo LTOgdpkYUxLzQcCs7jUE4D+ZMDL4AQxE1JgkXr//y7zl8mDoNm5cYHA+qQ77NAyf7d+e 7TchxBlmO6VPvT/RgYpqdVON/KidlW8wMwnv6ClU1vwfZQJfftq+EyTrtiRm3hI1kb1n ApeQ== X-Forwarded-Encrypted: i=1; AJvYcCVuef7zWCBii0LXSfX5JoEir5vWqe1so0oV+S4sqaiNj0BTszS5/zSKcenv/SPphVu5Vr6YHPx1cSi/Vcl+ZUHKVRmuzpvmUaTnAPEn/g== X-Gm-Message-State: AOJu0YxY0gLjo2mAyuCYbKV5o+M4jQWXdfrZ6PBAg7VgByKD0s5kx1H/ S7nTRx3jKCQQuCCnAl8qF4dE9mLXTtGNJ1ZsiABiEqvC7E4owM0ryD/8gFmNDQ== X-Google-Smtp-Source: AGHT+IHdha0C7GHgTOtn+h7GC1nV2SuVFIKnwQ0XR5LyRaxyHLt5ciUVNw2VJKedo24c6BQYxDb+PA== X-Received: by 2002:a17:90a:8b02:b0:299:4cc5:aa25 with SMTP id y2-20020a17090a8b0200b002994cc5aa25mr2853635pjn.25.1710280859551; Tue, 12 Mar 2024 15:00:59 -0700 (PDT) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id u8-20020a170902e5c800b001ddb57a4dffsm2232631plf.132.2024.03.12.15.00.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 15:00:59 -0700 (PDT) Date: Tue, 12 Mar 2024 15:00:58 -0700 From: Kees Cook To: Guenter Roeck Subject: Re: [PATCH 01/14] bug/kunit: Core support for suppressing warning backtraces Message-ID: <202403121500.64A2C02@keescook> References: <20240312170309.2546362-1-linux@roeck-us.net> <20240312170309.2546362-2-linux@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240312170309.2546362-2-linux@roeck-us.net> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: loongarch@lists.linux.dev, linux-doc@vger.kernel.org, dri-devel@lists.freedesktop.org, Brendan Higgins , linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, David Airlie , Arthur Grillo , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Daniel Diaz , linux-sh@vger.kernel.org, Naresh Kamboju , =?iso-8859-1?Q?Ma=EDra?= Canal , Dan Carpenter , netdev@lists.linux.dev, Daniel Vetter , Arnd Bergmann , Maarten Lankhorst , Maxime Ripard , David Gow , linux-arm-kernel@lists.infradead.org, kunit-dev@googlegroups.com, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , Andrew Morton , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, Mar 12, 2024 at 10:02:56AM -0700, Guenter Roeck wrote: > Some unit tests intentionally trigger warning backtraces by passing > bad parameters to API functions. Such unit tests typically check the > return value from those calls, not the existence of the warning backtrace. > > Such intentionally generated warning backtraces are neither desirable > nor useful for a number of reasons. > - They can result in overlooked real problems. > - A warning that suddenly starts to show up in unit tests needs to be > investigated and has to be marked to be ignored, for example by > adjusting filter scripts. Such filters are ad-hoc because there is > no real standard format for warnings. On top of that, such filter > scripts would require constant maintenance. > > One option to address problem would be to add messages such as "expected > warning backtraces start / end here" to the kernel log. However, that > would again require filter scripts, it might result in missing real > problematic warning backtraces triggered while the test is running, and > the irrelevant backtrace(s) would still clog the kernel log. > > Solve the problem by providing a means to identify and suppress specific > warning backtraces while executing test code. > > Cc: Dan Carpenter > Cc: Daniel Diaz > Cc: Naresh Kamboju > Cc: Kees Cook > Signed-off-by: Guenter Roeck Yup, this looks fine to me. Reviewed-by: Kees Cook -- Kees Cook