Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2137932rdf; Mon, 6 Nov 2023 05:58:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IG31jG0V4Sm3jdx860UuKfkgFHowpy4Nozm7fw/k/8nazW2zMNkN95f86SZ9bYPr1gV9q2s X-Received: by 2002:a05:6870:7184:b0:1dc:723d:b8d0 with SMTP id d4-20020a056870718400b001dc723db8d0mr38217893oah.27.1699279101519; Mon, 06 Nov 2023 05:58:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699279101; cv=none; d=google.com; s=arc-20160816; b=HeOoevphugKqstI3K3xmPWXB+W6xcMZ+Zfphku4EmyTZ/wntkfrUnyXWQF6nS4aLGI DVuENSZUD/YmlsUiNls04xGa+J/AfN/B/EzaLSh7MXrcLv2oTUpxycoLPfA51PIv//V2 kmGRMgODxVUSJha4LGQwSoU1X6Lfq+Nnw6RuHTzqeQYaYijhiEIBDfZAogtK5yxV3Ur9 BMxPC/MIwpXeMBrySj5/IHO0qFBeNPHzD7EIAEF7L7hT9GZffJT//mUFo93RU8hFvoG/ mmuviYVBHYggROwy5+xUObickA0GLmKiTfFMdDkEBb7dnChHjC5E/wNz5cndEnjrornN /jqw== 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:65;7400;1cfrom:message-id:subject:cc:to:date:from :dkim-signature; bh=A+ADHOe553UQ4XvbTwPxhWVBxS894STvjhV1YfAj9TM=; fh=Cjdj/I0GP/7cTqg3OOcx5yOpYmrrkVGpT5y1NupZSxQ=; b=z1DVA/HFKdMR8Qa6CUPDkorppquDI72KJYFmL9Yc3jYU6aULoK6Qq1NfhdVeKE5zXS kTVTNT8Gvmz1I8kEYiy97+CVbKDc2HTmVeF2VxAzWE8GaEDh/nS5tJVRemaBOY9QHmqc xFQQkL+BHwniLlQPJlWuklGrEADJYqXh1+WQEBsvUkjhPHR9PT7FOXKDjtY+pNZN/0BH ttaliFfUHEi09BihxhO1dOTfi3KNa+gnie8l0izq88sh625lA1DHbgM5Z/EntiFwBVxC u80PXXRNlnjX2Lfctx44CdPtcMY9qneefU8ehVpG0SU0S73GHZ/BdlCoo8JXK84CodeV HqUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PyUgHft7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id bj20-20020a056a02019400b005b8edc44692si8558682pgb.721.2023.11.06.05.58.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 05:58:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PyUgHft7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A4300806532A; Mon, 6 Nov 2023 05:58:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230030AbjKFN6T (ORCPT + 99 others); Mon, 6 Nov 2023 08:58:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229715AbjKFN6R (ORCPT ); Mon, 6 Nov 2023 08:58:17 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77671BF; Mon, 6 Nov 2023 05:58:15 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD348C433C8; Mon, 6 Nov 2023 13:58:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699279095; bh=146Hv24u0iSEfP0Lcoz7MmQS/jc9ccb6iAZD/d2PjY8=; h=From:Date:To:Cc:Subject:References:In-Reply-To:From; b=PyUgHft7oDTb28dERhjiXG7ymjucR0IV3zsIgfoMhonHCtvSfIqGeXiBs4IKUbuZ5 C7wAD6ia7eObwcY43OU5btkXZKbi/XnI4EEDpk8qt483bh2SwD8PfhqviMyMlhXcf+ Ly3RVdmvbAnKJri08i+Op1Tjle50Xsn+QgWJIVPOt9MPZUVr91MjLNQRnJy7t/bqMu Tnwvfyw8bAC1fBq/S9hoGsxom/XHiMm7m8Y2UFrtxP5K24Gc3AmLwWmrNI3js3Ax7Q oaeVl6aQv5HgEns4FF82Bera9+OddYbodYnd3Tr4WINKQHLAiFlaVJ+JBlefgC1/8b CRC4oab8dM2Dw== From: mripard@kernel.org Date: Mon, 6 Nov 2023 14:58:12 +0100 To: Dan Carpenter Cc: Naresh Kamboju , Richard Fitzgerald , Maarten Lankhorst , Kees Cook , Daniel =?utf-8?B?RMOtYXo=?= , Thomas Zimmermann , David Airlie , Daniel Vetter , Brendan Higgins , David Gow , =?utf-8?B?TWHDrXJh?= Canal , Arthur Grillo , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, kernel-janitors@vger.kernel.org, Ville =?utf-8?B?U3lyasOkbMOk?= , kv-team Subject: Re: [RFC] drm/tests: annotate intentional stack trace in drm_test_rect_calc_hscale() Message-ID: 65;7400;1cFrom: Maxime Ripard References: <02546e59-1afe-4b08-ba81-d94f3b691c9a@moroto.mountain> <7b58926a-a7c3-4ad0-b8a3-56baf36939ca@kadam.mountain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xqbcpamsz7sm4ktx" Content-Disposition: inline In-Reply-To: <7b58926a-a7c3-4ad0-b8a3-56baf36939ca@kadam.mountain> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 06 Nov 2023 05:58:20 -0800 (PST) --xqbcpamsz7sm4ktx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Nov 01, 2023 at 12:08:00PM +0300, Dan Carpenter wrote: > Let me add Richard to the CC list. See lore for more details. > https://lore.kernel.org/all/CA+G9fYuA643RHHpPnz9Ww7rr3zV5a0y=3D7_uFcybBSL= =3DQP_sQvQ@mail.gmail.com/ >=20 > On Tue, Oct 31, 2023 at 09:57:48PM +0530, Naresh Kamboju wrote: > > On Mon, 30 Oct 2023 at 14:33, Dan Carpenter = wrote: > > > > > > We have started printing more and more intentional stack traces. Whe= ther > > > it's testing KASAN is able to detect use after frees or it's part of a > > > kunit test. > > > > > > These stack traces can be problematic. They suddenly show up as a new > > > failure. Now the test team has to contact the developers. A bunch of > > > people have to investigate the bug. We finally decide that it's > > > intentional so now the test team has to update their filter scripts to > > > mark it as intentional. These filters are ad-hoc because there is no > > > standard format for warnings. > > > > > > A better way would be to mark it as intentional from the start. > > > > > > Here, I have marked the beginning and the end of the trace. It's more > > > tricky for things like lkdtm_FORTIFY_MEM_MEMBER() where the flow does= n't > > > reach the end of the function. I guess I would print a different > > > warning for stack traces that can't have a > > > "Intentional warning finished\n" message at the end. > > > > > > I haven't actually tested this patch... Daniel, do you have a > > > list of intentional stack traces we could annotate? > >=20 > > [My two cents] > >=20 > > I have been noticing following kernel warnings / BUGs >=20 > Some are intentional and some are not. I had a similar thing happen to > me last week where I had too many Smatch false positives in my devel > code so I accidentally sent a patch with a stupid bug. I've since > updated my QC process to run both the devel and released versions of > Smatch. >=20 > But a similar thing is happening here where we have so many bogus > warnings that we missed a real bug. IIRC, there was a similar discussion for lockdep issues. IMO, any (unintended) warning should trigger a test failure. I guess that would require adding some intrumentation to __WARN somehow, and also allowing tests to check whether a warning had been generated during their execution for tests that want to trigger one. Maxime --xqbcpamsz7sm4ktx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZUjw9AAKCRDj7w1vZxhR xVHxAP9+MVNkRhFAcYBlsPMe3eQ/ZiQV5eqW/Q8okxFof/9xegD/WBapKwZv6qgF CyoizI3A8AGSVFpMUx9COGghvklOAQE= =iyFQ -----END PGP SIGNATURE----- --xqbcpamsz7sm4ktx--