Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1358601lql; Tue, 12 Mar 2024 15:01:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW9p11YbxXcO1UisesAid6dWf122swMgyJi6l7zp4PKGNu7Sna9IEAwVThuqqH+tIlDTF4wT7WLF97ivW8OUV7xZq3GCusIABThpPH4Tg== X-Google-Smtp-Source: AGHT+IHrnwuvEoIblH27nGMZjqApxxpEeXQxtRxFJhBvRXH3WrCAcAGbf7j1Dmhssx13Dxn015lB X-Received: by 2002:a17:90b:157:b0:29b:c322:238e with SMTP id em23-20020a17090b015700b0029bc322238emr2987043pjb.3.1710280871263; Tue, 12 Mar 2024 15:01:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710280871; cv=pass; d=google.com; s=arc-20160816; b=tRoIdIc5ry6zSb6TM1/r6x7yhni8QlJl1b/7QGBynxxocnzonYoWjY49P0T03py7gV rTR0evdFfCAL/7JeFOJBwrSzr6Szt5H1ExRLxtwRmfTEsNu5A1TFqIhaaNzCe7GfC7I5 9v5FVo/3IJb878J6ZRSlDr8w3rcZ8jLxxCSJQwPgReZe/L3WF9p5eexTZo/4xhFlCvT0 6uQqyogqmbzkNjCF+uk/bApO5KwTo6RlqJ/vJZUnqD65Ug+1cuCYoeR9lsVf37SM4X4u q12FIptnuPGNziD5Md0fqRRtYAgNc052WB4AD6ev3/kJGcW4V9295V4XjOZ2kkTIbztP P1HQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lLq08iYnVcnWuDzFJHO0LDnyeIZ1/WCj/v6YSvUnsiY=; fh=CyTf1YG6yAUKWsx1YTDNsfEYANP6C/N95aQBpw5eFy0=; b=WD49acKmqJWfzi7nNwAWttlaMtmDrrf/y3s0xzdiGlN13aUL4IukibWi+e6eeeLgkW wFraGKFf85Z6UEyKacaDl3pgqK+fAXXyJPZ9YPSwZ7Yv97T9D2qcJNjOkeCXwLu4Dj1g euXDDBfP2ELFag5ZC2dRNDeFqut7aaTJQMEQi8Z+Zu2zEP0brKXFfuci8fw6pSuSBazQ wScvyOZyOa3UNc59WJxjmvJjzucbSyL2aErqEq8e/aE9q+hz2sGGSkyBhM1vsWOhnp4t vfxKBtfzzTV2evMRJcofiGo2uuKyZc2Q/2TaMkEkwUqIfHlBvq+9e3bgizU6bzuf5sLC CLvg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IdtI2Ovp; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-100845-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100845-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z14-20020a17090a468e00b0029bacd3c927si126221pjf.63.2024.03.12.15.01.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 15:01:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100845-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IdtI2Ovp; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-100845-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100845-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E8BAC2840C7 for ; Tue, 12 Mar 2024 22:01:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DD909143744; Tue, 12 Mar 2024 22:01:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="IdtI2Ovp" Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C103143740 for ; Tue, 12 Mar 2024 22:01:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710280862; cv=none; b=uv1saCFFFbeIBxLAQJ/GhsJCokhcKrw1aSOnjcW9FYAoEI9Jh6Dhn/7hIY2gyXZdHd/hzSolRTTydtZ1DAD0/8bAyObdU4Fs7Dd4rNTKm16CjH2UPSe5/0TXqLTINO+8BYtBUw0CvKGKdHHiWIoSkii9ebyeb4Q1kke5yyezQz8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710280862; c=relaxed/simple; bh=wGnHuFYICWDAqpBS7st1+d1ZNPu8frSboYhyV8sLtoc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mudyd/jfk48brR9XbYm7DWq72MlNTduALiH1axnrrCqPoRQfDknoE4P9OrQmM55ZS3jhE7F7aObhkNS+7GfByvZfnAilI8aqdYKEtUQbhoc9GyL08VNVn2RB9rYssRAa4X5+HCCj2KRd4mivxtEC3//QKFD6ZBkarBiB8Ol+irc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=IdtI2Ovp; arc=none smtp.client-ip=209.85.216.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-29aa91e173dso4272248a91.0 for ; Tue, 12 Mar 2024 15:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1710280859; x=1710885659; darn=vger.kernel.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=IdtI2OvpSorUoROtlC29BT/59AfyqYkwITljCmkf2/G6/yKSNivtz6BNk3sZ+rAX7b l6ajD7icfu/XgUu+s078GIcdEyRoVcRDW9XU5RI8qxd89Wq6BBoRgr6qtnnN+9LkHN6E xYOdDeOVyTgi57HS7d3uMuSeHPmFAHrcyPKVc= 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=hFfqWmw97Lzg5Pr4xotbgtZ7itD7lDcV0Sz0Ibybx5TahusWe8zN0WI20Z0BnYu5eS MamUhK8DsxOrqgis54CAi8sleO0wENWTerycOvTL7Tlb+y+khsETgvILEZ/wgmqkbPSc dME6jZUPHWh7kfzCS6KLatO87dWtJNs32haYP8izNSTIuEbtYOnIQrwwkgtijO32aYQV 6pGu49xy1/0cwAaTbk/oRUCkEIZXc8PSYbH12Qdv/7eOUnTajz0w171ooGa/3YfqwawH 1/jIxsmX29JlAM9B9aDB2VoCJaDTQ6ON6sd05MUacfwvNVX87QtRhwwIM/3hmpwYqCIu HeQQ== X-Forwarded-Encrypted: i=1; AJvYcCWsjDrcAZvvZCZKY/S4QwhgoAR1DJIv8pXIKSf5iz3dOWf57g6kt703kQRnrd3i76N90VHZcWbGIYdFMSAl/M1/f7x0T9+MjU7Warmc X-Gm-Message-State: AOJu0YynWZ8h3a0rogEFpC+JwWbPhb1QqcqOXK8FBIIuLSpO9neay94s BUGz/Ik5zOM/+SFsE93cpOQDM0p2Hjm+TPRwUEVsw86XEVyx9JnUbA/x/EikWg== 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 Cc: linux-kselftest@vger.kernel.org, David Airlie , Arnd Bergmann , =?iso-8859-1?Q?Ma=EDra?= Canal , Dan Carpenter , Daniel Diaz , David Gow , Arthur Grillo , Brendan Higgins , Naresh Kamboju , Maarten Lankhorst , Andrew Morton , Maxime Ripard , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , Daniel Vetter , Thomas Zimmermann , dri-devel@lists.freedesktop.org, kunit-dev@googlegroups.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, loongarch@lists.linux.dev, netdev@lists.linux.dev 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240312170309.2546362-2-linux@roeck-us.net> 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