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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D81D1C433F5 for ; Tue, 17 May 2022 01:07:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 22B516B0073; Mon, 16 May 2022 21:07:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1B49F6B0074; Mon, 16 May 2022 21:07:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 007016B0075; Mon, 16 May 2022 21:07:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id DE35C6B0073 for ; Mon, 16 May 2022 21:07:44 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id ADC9F31A7F for ; Tue, 17 May 2022 01:07:44 +0000 (UTC) X-FDA: 79473447648.12.B5F8DDF Received: from mail-oa1-f42.google.com (mail-oa1-f42.google.com [209.85.160.42]) by imf14.hostedemail.com (Postfix) with ESMTP id 92A1F1000C5 for ; Tue, 17 May 2022 01:07:35 +0000 (UTC) Received: by mail-oa1-f42.google.com with SMTP id 586e51a60fabf-f18e6ff0f6so8107900fac.11 for ; Mon, 16 May 2022 18:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=4loixfGJBX/b2d0tY/k6yxdSnhFDGM7TlcCGNU7ptp0=; b=Xhr/SVElLugHHcTTc96KL4WT+84spwWYl4MIWiOZB2LmEggYCObeYkSv2Vg+L1CTSB DR53XbWR28V3a6LJUV9yl1eOKX4IQ87ZrX+m6oUttMfndOlWMtNfts951EwQpTo8nSrF 0LnBftUYOfaIkgf7pei/zgMcoL9LB4GSjk4MAj2DaO3FEcUmbJSqypPyHKA1a6VFTba+ hB9gFztylyA1rkCoOTn5KgMrvPHqFi6fcI+G7Y6MtHg5/OzOIsMXNaDg3D/l0vxe/42Y m8yEbuFCL6dHwWkWgjijXPc1kPSHbdNMl9B6LiT1PYk7s9lwqEGLn3iBYJ1FUPlCRBQ0 oetg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=4loixfGJBX/b2d0tY/k6yxdSnhFDGM7TlcCGNU7ptp0=; b=LsjCZGIICHj+AMPKMJx2DH+C1vWo7FhZsl5vTtrI7+qgWw2LOdTjSSPhYCFzJ11CFM ZqhMBPmXhDJwtxRL+YOgy4U1/wbkSfXmlbv0Jo7gUX337xHKfZH37PE8AVNbH+nqDMuF dQstGGFUg+MGrU6FXWxKJDeSUPaIodvsIB/ieXa6YXTJIYjfvhHcZr8pHI/9HoO0H8J+ LorFmVHeg4v3ggaIO7cnqsnQ8ZES9qKwrE7b+aPtMbCsYvZnqYW9fnYEAT0U+Uo/Tn6G EiJaQG4PYbPRsF2ZN8r91Gyh1AgcxDheX7DY+TGyMxMUGv3e/qg242Y7uTyl0smMHrbE C6qQ== X-Gm-Message-State: AOAM531Vt6xY/xsL6SwgUMctm58c4bWzSeV3z5fVapnYSaKvSQkulBUt pn2FXBIiZhcJ8nxg8/JbwcGJtzp8Nlve9ff9yXekRg== X-Google-Smtp-Source: ABdhPJyvVQl4zKW3GeSWaLTFgBdMEFgS+d4GbYEezcLSzKpZbs//QU5ZPYddnmkfzPV8jiXng/KxB7xutWQBkrMQQbQ= X-Received: by 2002:a05:6871:438b:b0:ee:326d:b3f9 with SMTP id lv11-20020a056871438b00b000ee326db3f9mr17111321oab.126.1652749657202; Mon, 16 May 2022 18:07:37 -0700 (PDT) MIME-Version: 1.0 References: <20220504182908.1322874-1-yuanchu@google.com> <20220504184537.130085-1-sj@kernel.org> In-Reply-To: From: Yuanchu Xie Date: Mon, 16 May 2022 21:07:25 -0400 Message-ID: Subject: Re: [PATCH v3] selftests/damon: suppress compiler warnings for huge_count_read_write To: SeongJae Park Cc: Shuah Khan , Markus Boehme , David Rientjes , Andrew Morton , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 92A1F1000C5 X-Stat-Signature: jp5ozrjygujmi759h6x7ujxmtufmcsep Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b="Xhr/SVEl"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf14.hostedemail.com: domain of yuanchu@google.com designates 209.85.160.42 as permitted sender) smtp.mailfrom=yuanchu@google.com X-Rspam-User: X-HE-Tag: 1652749655-595236 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: SeongJae, Do you have a preference on how this should be handled? Thanks, Yuanchu On Wed, May 4, 2022 at 6:12 PM Yuanchu Xie wrote: > > Hi SeongJae, > > On Wed, May 4, 2022 at 11:45 AM SeongJae Park wrote: > > > > Hi Yuanchu, > > > > On Wed, 4 May 2022 18:29:08 +0000 Yuanchu Xie wrot= e: > > > > > The test case added in commit db7a347b26fe ("mm/damon/dbgfs: > > > use '__GFP_NOWARN' for user-specified size buffer allocation") > > > intentionally writes and reads with a large count to cause > > > allocation failure and check for kernel warnings. We suppress > > > the compiler warnings for these calls as they work as intended. > > > > > > Signed-off-by: Yuanchu Xie > > > --- > > > > It would be a good practice to mention the changes from the previous ve= rsion of > > this patch here[1]. > > > > [1] https://docs.kernel.org/process/submitting-patches.html#the-canonic= al-patch-format > > > Thank you, I missed this when trying to figure out how to add > additional comments for a revision. > > > > tools/testing/selftests/damon/huge_count_read_write.c | 2 ++ > > > 1 file changed, 2 insertions(+) > > > > > > diff --git a/tools/testing/selftests/damon/huge_count_read_write.c b/= tools/testing/selftests/damon/huge_count_read_write.c > > > index ad7a6b4cf338..91bd80c75cd9 100644 > > > --- a/tools/testing/selftests/damon/huge_count_read_write.c > > > +++ b/tools/testing/selftests/damon/huge_count_read_write.c > > > @@ -2,6 +2,8 @@ > > > /* > > > * Author: SeongJae Park > > > */ > > > +#pragma GCC diagnostic ignored "-Wstringop-overflow" > > > +#pragma GCC diagnostic ignored "-Wstringop-overread" > > > > I agree that this must be the cleaner way than v2. But, I get below wa= rning > > after applying this: > > > > $ sudo make -C tools/testing/selftests/damon run_tests > > make: Entering directory '/home/sjpark/linux/tools/testing/selftest= s/damon' > > gcc huge_count_read_write.c -o /home/sjpark/linux/tools/testin= g/selftests/damon/huge_count_read_write > > huge_count_read_write.c:6:32: warning: unknown option after =E2=80= =98#pragma GCC diagnostic=E2=80=99 kind [-Wpragmas] > > 6 | #pragma GCC diagnostic ignored "-Wstringop-overread" > > | ^~~~~~~~~~~~~~~~~~~~~ > > > > My gcc version is: > > > > $ gcc --version > > gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 > I see, I'm running > > $ gcc --version > gcc (Debian 11.2.0-16+build1) 11.2.0 > > I believe this is a new warning for gcc-11 [1], and somewhat > unfortunate that it results in a warning for gcc-9.4. I'm not sure > what the preference is here. > [1] https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc/Warning-Options.html > > Thanks, > Yuanchu