Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4066729iob; Tue, 17 May 2022 13:09:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziVf5NGzH5iRwSvUV19H+Mzv1wS4jzhiYo0J1l7KkRXKVGUzNOczxXCkxmbBfjdwSjZLMQ X-Received: by 2002:aa7:cd70:0:b0:426:49a3:9533 with SMTP id ca16-20020aa7cd70000000b0042649a39533mr20932239edb.34.1652818157810; Tue, 17 May 2022 13:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652818157; cv=none; d=google.com; s=arc-20160816; b=sRR76+Jl5RQhPRE+MWssdv+n5C1YjVTHA3BAp+k4LlVK5DaCvLDP+kmybLJ+mpnzrC AenfucrXNj4z43Y7nZhbU0RuPWtmqBqGmkjS4aavKLfDf6XYLFxMz59hrn/y8ONRUcco NarI/TXrPf5QGM94y9OAnbJnEFalvkSne2eBlzPDT2Kmjea95iOo8fUvYKflSTwHXF1d Y2ffaVyVVpxyqHBj9R8RTk+rZcPQpQ1hKNfAz6oCYyu1KLD/QXgoduYz6Via1JuVLJih 5sKlD5NChRwvK4BEY8l5TZkLtiVsk4KpZwmYvVTLzr7+J1xSOFcGtiPAKKiRuDIMxvdC fshQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=4loixfGJBX/b2d0tY/k6yxdSnhFDGM7TlcCGNU7ptp0=; b=k+UMCxQ7a09jQ+Cu3qzwaceArZc+9VaT5a65oPsq3HRBDTfJ07LpAwejkC0VHcnu7m 3MlYRb5dCrLUOdp9BxlKVnDPYKJvRkCMReGBwvmaK3hgEqiUYQeAoQBQD6sgjJdmldq+ ayDKIV/zbHfbxXRV3HeixSAt6OBQ0tIaItI5KX56xEoeHJ8W5fGPIT9EPR8TJ7/mdJh5 aCiONKHIei7B7h11ZojJOD1g6nrs8bZfqnM387a9VY70RMfu6BMKZHCHZti3O9Wz82CG fzqod3m2Epnh6HII+81oO+JkVUAVJsmVBHhnHjueZ7cRsoQy6EA9QWGIMuV1MIHTjSHA mSfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="Xhr/SVEl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc19-20020a1709071c1300b006f4abbac711si228076ejc.136.2022.05.17.13.08.52; Tue, 17 May 2022 13:09:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="Xhr/SVEl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233134AbiEQBHk (ORCPT + 99 others); Mon, 16 May 2022 21:07:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231422AbiEQBHi (ORCPT ); Mon, 16 May 2022 21:07:38 -0400 Received: from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com [IPv6:2001:4860:4864:20::2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DF6F3FDBF for ; Mon, 16 May 2022 18:07:38 -0700 (PDT) Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-d39f741ba0so22411808fac.13 for ; Mon, 16 May 2022 18:07:38 -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=d+6QUjrBSzvDx3oWJYqky+Cg7R32ixJWb14EK4iuRthXdqfhd4D6S2H+oeutcguC2O pX37JpPAh3QKxQ52QTt4nK5sKfWaU0I1LYQPnLEabxJbu5pfmy/mEjw7RB7Yp7fQAQgY Qtc2Klo/DpkPP6nT+bzgqC3GJ9zaQBWwz8u3gk61gHtc8kMsgOU7kbvCEXtQf3hdA0+C MIwlgF4I/Zp2l1pcqMHKRtWAG/GroWde4Qm8f9vuigQjdWu64IMs4yrAzjSFl3pb8daR flUTgRJwCGgQsTiBYPt7Se1FvcaDBzFrwQ7k2GZ/IDOeX89AbX9xCzQVP427SUnj5LKS hBBQ== X-Gm-Message-State: AOAM532gC3C/dSO9MOSazBP+oZD3mbYuTx2+FW18qo2jllYNuS9f3DF+ gibdhw1VfKWxblQWk1hoQuI1nGoUC012x57qGS1s+w== 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-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 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