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 9AC57C433F5 for ; Wed, 4 May 2022 22:12:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BE74C6B0073; Wed, 4 May 2022 18:12:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B96FD6B0074; Wed, 4 May 2022 18:12:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A10976B0075; Wed, 4 May 2022 18:12:31 -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 8E4B56B0073 for ; Wed, 4 May 2022 18:12:31 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6C7822C4F0 for ; Wed, 4 May 2022 22:12:31 +0000 (UTC) X-FDA: 79429460502.23.2A020CD Received: from mail-oa1-f43.google.com (mail-oa1-f43.google.com [209.85.160.43]) by imf28.hostedemail.com (Postfix) with ESMTP id ECA3EC0086 for ; Wed, 4 May 2022 22:12:16 +0000 (UTC) Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-ed8a3962f8so2609951fac.4 for ; Wed, 04 May 2022 15:12:30 -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=wquqW3x/NVz0JD2PQXTktSWbyNjB4MSdaRsMfdQ/Zrs=; b=R7BE21HU+q0r9itfOFa4ZZBxOpuGYg5HWV9A9y3ufNAq/107F0JV8+d3Ice3rMW8K1 DkezRmzH0i709qnS7rusfIID1r2ORBfFr5m7cqjKp0pL8L1gUWrRUzfd/JpWv7Uxm4Z/ EBIg/0IirjaJTzzMUynZevhMPQasV1E7NICalwDQahjVT3zG5VjDEz6ydG+16aRh5y2C yAPkBfTXAAAOZqOZbahYVVljOAEfgi140CMPFx2hYTga+jgnL6Xe/klDsrK2Anq6C5ar Cab/zGVerAuPIHCM9dQtkcdhhNakWsiKz9n7IivyjxjGsf92ElJWWUWmp3+MYRCuPuJg BAZg== 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=wquqW3x/NVz0JD2PQXTktSWbyNjB4MSdaRsMfdQ/Zrs=; b=uoIprJizJeR18Ei3o5YKGrg1NFfmdi3iuuzS7ZhqyXSyWSeXfaTGoWWJlGDRS4b1VE K6ZWtN37uz3tMDYFWOvpkOip50Aq4jNzp84ji4y1+LFI+kypa6BvfbgxVKCkB47rI0mK XtMRVrzwPySVzpVgCoyb4zEM2goXlI6MFYs+fUyZxJJU7rvSuWFqhbis5J1S515GkaV5 CwhG5PB2dAtN8BaoY2OSrrUGThMpvzOw4I1IXM//9BwYeXDhkj28zC/XXDG7ylh24ZfE wu7aJqQi+Vrx+6YaYq3m+FqQ55+paJgSKFf3cNjzFzmsNzbA5VB4frrMpdN45Cu9G0Un HcXw== X-Gm-Message-State: AOAM533jRX0ibgFp1dFv8YoR+zYV5+EbabO6RAIGCPDzqjD7vl+/TogV 2A0CajKMRUiqe6qVM53vd7TwxfF7XfAp2jSW5NWv6A== X-Google-Smtp-Source: ABdhPJw9RAW6gV3GBRIHhsfV4MFjHHQN6T08u6egeYgBJl4X62rWrpQVpH7Qu7QnuWKAMo+wZ+Ng/P9Q5bRHx76qphc= X-Received: by 2002:a05:6870:c683:b0:ed:efb9:ffe9 with SMTP id cv3-20020a056870c68300b000edefb9ffe9mr859642oab.241.1651702350192; Wed, 04 May 2022 15:12:30 -0700 (PDT) MIME-Version: 1.0 References: <20220504182908.1322874-1-yuanchu@google.com> <20220504184537.130085-1-sj@kernel.org> In-Reply-To: <20220504184537.130085-1-sj@kernel.org> From: Yuanchu Xie Date: Wed, 4 May 2022 15:12:19 -0700 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-Stat-Signature: y7kg3p3j1fi319tcya5mqda93wbx3fyh X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: ECA3EC0086 X-Rspam-User: Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=R7BE21HU; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf28.hostedemail.com: domain of yuanchu@google.com designates 209.85.160.43 as permitted sender) smtp.mailfrom=yuanchu@google.com X-HE-Tag: 1651702336-388999 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: 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 wrote: > > > 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 vers= ion of > this patch here[1]. > > [1] https://docs.kernel.org/process/submitting-patches.html#the-canonical= -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/to= ols/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 warn= ing > after applying this: > > $ sudo make -C tools/testing/selftests/damon run_tests > make: Entering directory '/home/sjpark/linux/tools/testing/selftests/= damon' > gcc huge_count_read_write.c -o /home/sjpark/linux/tools/testing/= 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