Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp144796iob; Tue, 17 May 2022 21:46:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxboMg7QC2sZkWjWHxGEqHU/orHG5s0KCFkifTcdiX47QzErlNLc3H1Ykg6RqH+BSgdjOy/ X-Received: by 2002:a17:903:290:b0:15c:1c87:e66c with SMTP id j16-20020a170903029000b0015c1c87e66cmr25980614plr.61.1652849160782; Tue, 17 May 2022 21:46:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652849160; cv=none; d=google.com; s=arc-20160816; b=fjIyZn4x/qs0/B0lxEsFOWa/ed0ZQ4q223W2MotE3aQ2wDTq+1Nls/QjMGyisNOksu Rf3XskArcuWYJofW4JNrcxGNHEJGlTuctFcIlrlRlOB+uacdTlup00ZkYuYig5VP4ZX2 cwlbWViMg8VwLBLtK2LS37hQ4Wjekbxb9SohB/3hgLcYa39CHRIZac8cht44vHmFiofh bPSnN/Ive9hudQbyGyyHJyXhL7GQZSVjxjgXVPu8fR6YJ2Ggj36fnAPlh7cgVBLfzLda USUH+Q+OuVeN9GdSOlUoYodaA6odc8BGOwQ16YY/NgkCiUaD9n9kQPBQx+P1RoRMyEPx NjQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=meIK6LxdesdeEKWOVHu5a71zsWK26QRcPw4MGfN6fSM=; b=zXGoLsHY18Ga56wMIgdMSr7i6v5e4Jn5DUPJv2PXUIGggH4m0cEPrgcZRLt4HvO3s8 q7qYjCJcEv41H+6IJI/vB1dFh5Dznv/Q4fO/aUFCLrfQgVh+Nq+yW8iQNsynq3ZPGI1q 9I73udJEbHQLD0o3nCrDQzci2koh451UgRz1y42hiMxv3PYYvVodp0g4uWulk0am/nEl 4eTYikEyim28L//6BcibYlrxsjiMAcRrFNTcWkKpyun7FztiERmniwOP6xM0NJi4quYy NIlpJD2Yn5bABxptE83HZCG4gydiuQEQyPanbFgHd3BbbUTEOxUZYJsYM4SjhRjkkEBN 7WqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FUW9q9ow; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s24-20020a170902a51800b0015ceea6bd9esi1282073plq.550.2022.05.17.21.46.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 21:46:00 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FUW9q9ow; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D619A99691; Tue, 17 May 2022 20:58:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243478AbiEQQEb (ORCPT + 99 others); Tue, 17 May 2022 12:04:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235701AbiEQQEV (ORCPT ); Tue, 17 May 2022 12:04:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD7C550046; Tue, 17 May 2022 09:04:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 78FB161243; Tue, 17 May 2022 16:04:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B39E4C385B8; Tue, 17 May 2022 16:04:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652803459; bh=fMF2BNIvkvrF0iD186WbKtU3kdy8mDQgsofbJCS1OPk=; h=From:To:Cc:Subject:Date:In-Reply-To:From; b=FUW9q9owWQTX9xiyiV23z1NZBo2aGhO4u75vC9rqi9hDzbQ/13UvfRIPhoHHMIhiF lpS5/2Hy0RKLVpGp2lrWG13uJ6qzJpZqpd5Xk3EUi5Sodu7iWfNtuCK9F2AA/Iw/rM 8DHReuWxlzXmh/VInI11ifLQBU0U5HTdKOz+tsoQznXZN8T1vC7Uu+IE54Pdah8u35 iLjFnkg2/5Fb56+N0ppwTtEyznOladA6h4tPcHcHPEaW8BBm3JVvJnSX89zL75nugE OIU3QYtdnIx3+zeB4TnYn5etQF7WWgx3YZz3Rd0XXvhXacFI/0hbD7jz3iUYEHW83C 2hYgy70+PzyAQ== From: SeongJae Park To: Yuanchu Xie Cc: SeongJae Park , Shuah Khan , Markus Boehme , David Rientjes , Andrew Morton , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] selftests/damon: suppress compiler warnings for huge_count_read_write Date: Tue, 17 May 2022 09:04:17 -0700 Message-Id: <20220517160417.1096-1-sj@kernel.org> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 Hi Yuanchu, On Mon, 16 May 2022 21:07:25 -0400 Yuanchu Xie wrote: > SeongJae, > > Do you have a preference on how this should be handled? Sorry for late response. I was thinking you were asking Shuah's opinion. I have no strong opinion but the approach you made in v2 looks slightly better for me. Thanks, SJ > > 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 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 version 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/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 warning > > > 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 ‘#pragma GCC diagnostic’ 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 >