Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp86249lqo; Thu, 9 May 2024 13:28:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUJvuTvvXEGTOEF9PLUrLbVGFScMjg0gCPAYRbWw68ieQpRE03uxLtVGFtOSr/36RxBtyK3MjDE4IziLhB4ghGdgdSAayfau8uT5QqyeQ== X-Google-Smtp-Source: AGHT+IEgEdORzWlGrUssc9ZMXD1ho8UXMk22EhRU9hsmq332WwyV8ULEs7uWE8K4YvYG0H2o5gzx X-Received: by 2002:a17:906:33d0:b0:a5a:1562:518c with SMTP id a640c23a62f3a-a5a2d66a7eamr44184466b.48.1715286488648; Thu, 09 May 2024 13:28:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715286488; cv=pass; d=google.com; s=arc-20160816; b=caQgFig/oBJIoLEvgNrKQUV9Ss6SFiebQMmctYUVmpBatzlq5WRKxDdjRal8tFKrRl 62m9LFh6IPtjSutgvr15yYwwszW3pSholRKnSKO0AEeuEx/V3MCOLndylTxBTAyeRHBa 9si9eLvXogUUnzlCMnl0w/VaJuwtVqpSB/yMvCeGrWZRTFibErXTQJ79Hf2DPIAijx6f As07plLGAM6Eyx8PIy7OUF8AEIlYo+0My5lTnFf3l4RJcbaQlh3us3yUx0D8gz91sUP7 p8bZipBK9YJFWCpLRGyZvZgAf+gXMf6xeDP3joN4ijklPwYy4YDF7GCOLcuL0DmylndX qJZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=crsl4fxescQWN30telwHx98T1yOjZSiFcWxk2EdGIpM=; fh=vj/Hy6YMqw4749l2M7ubotNLCC1R6XQpbTBB/JfP3yc=; b=lMZD1mOMIFOmOyA4Z07L/0Pw8f6Qd0UZwG80yY6DpqQy4tbRElUg32WYo0flOGQSIo 0CC6m75bfK+garQUKUY883Web0p+IyetrrbRDnqIlospAveIq0ckqpg8Pmo3TAhn6eOK 1Ds0uKEPgjLJhA0OpTdCEevC3waMk/1LNw4N9CF9NYrXnkWpFOZjO0OIDH27WyP2X2Bt A1WBpnYlmg+I76TbSSZ+fMjGM3KocBznZa3BPWZyEk+hXpdwOdTg0wi+FdAg0D9XQR04 SjJ4pFxQgEV6nnYY3RuV/LhqxmRRcF/hpsuygEJvoazef8cihduE91EJpknAwRRpF5q8 UkIg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=HPZWOmhn; arc=pass (i=1 spf=pass spfdomain=efficios.com dkim=pass dkdomain=efficios.com dmarc=pass fromdomain=efficios.com); spf=pass (google.com: domain of linux-kernel+bounces-174919-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174919-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17be662fsi119635666b.756.2024.05.09.13.28.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 13:28:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174919-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=HPZWOmhn; arc=pass (i=1 spf=pass spfdomain=efficios.com dkim=pass dkdomain=efficios.com dmarc=pass fromdomain=efficios.com); spf=pass (google.com: domain of linux-kernel+bounces-174919-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174919-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 21F281F21EA7 for ; Thu, 9 May 2024 20:28:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 988531272BF; Thu, 9 May 2024 20:16:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="HPZWOmhn" Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C4F580BE5; Thu, 9 May 2024 20:16:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=167.114.26.122 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715285773; cv=none; b=nwncLGbTUR9isNlfkxTEv/YqXC46G+RejkoV+juMAHKJzOhJcWDQpnMJhW7SDxFsb2dneYUJIDfk/WqB0y5vuVsx+Q/x5/qlbDA9FJVOWILCW9wBAxf52T5IvO0tzs1UMWPgz0u4Y0oB1BTW8G7xhUFdu0ha/U0W/pR3t/bYtJI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715285773; c=relaxed/simple; bh=cMWw8x/P40/KMWgVweNbntQjYA+K9n2XKgcRYU9QC9I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=RWj7pCbiJUYOoNITLg2fMvzibWkoG5woXPyoKyZ3FDQs3ED0W7yHe8FzClP3TJTL8Ft4SjxLzJMcbaZfN8CbmxM47sRBdjF+slL2QBRCWFtTpPmpnmvL5GIU6enZ98pvfds0yFpulvt6Zb/MV5kIJgrWbkayjnvSwEqejzhcek4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com; spf=pass smtp.mailfrom=efficios.com; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b=HPZWOmhn; arc=none smtp.client-ip=167.114.26.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=efficios.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1715285763; bh=cMWw8x/P40/KMWgVweNbntQjYA+K9n2XKgcRYU9QC9I=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=HPZWOmhnoRkqipHqnwg6g545VwMlsV8zx/BSHSoFPE4eWw/mPW4cf0jmeu422Z636 jLntHYOgVNutEjpLrWE9rP1+MPli0NS8sJtlLTVtYguaOTUm+CI3HmXiFtMYktT8Ql FX7RzuXYLAAEEvihpE/pWrH7pdCmnGMkPWZh//qC1SMDLhRv9YnaftIhQfQitZZkKa RamXBJLbx3DsqqXTvrWF2nqFsEHQH+JMe/Okl/wi7F4CIjX7ap+LzVAwX78Jj8CHfN IFkpFCckFqnrzKm/TaiKH4FX05dPGhNGc4WCKG05ghyQKfvelcPFGNsUruPcwx/gTc /zFV5k2dA0e8g== Received: from [172.16.0.134] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4Vb3Df5nW8zyZy; Thu, 9 May 2024 16:16:02 -0400 (EDT) Message-ID: <638a7831-493c-4917-9b22-5aa663e9ee84@efficios.com> Date: Thu, 9 May 2024 16:16:20 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 54/68] selftests/rseq: Drop define _GNU_SOURCE To: Edward Liaw , shuah@kernel.org, =?UTF-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , =?UTF-8?Q?G=C3=BCnther_Noack?= , Christian Brauner , Richard Cochran , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexei Starovoitov , Daniel Borkmann , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Muhammad Usama Anjum , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@android.com, linux-security-module@vger.kernel.org, netdev@vger.kernel.org, linux-riscv@lists.infradead.org, bpf@vger.kernel.org, John Hubbard References: <20240509200022.253089-1-edliaw@google.com> <20240509200022.253089-55-edliaw@google.com> From: Mathieu Desnoyers Content-Language: en-US In-Reply-To: <20240509200022.253089-55-edliaw@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024-05-09 15:58, Edward Liaw wrote: > _GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent > redefinition warnings. > > Fixes: 809216233555 ("selftests/harness: remove use of LINE_MAX") The patch per se looks fine, except for the "Fixes" tag. Commit 809216233555 introduces use of asprintf in kselftest_harness.h which is used by (all ?) selftests, including the rseq ones. However, the rseq selftests each have the #define _GNU_SOURCE, which would have been OK without those further changes. So this patch is more about consolidating where the _GNU_SOURCE is defined, which is OK with me, but not so much about "fixing" an issue with commit 809216233555. A "Fix" is something to be backported to stable kernels, and I don't think this patch reaches that threshold. If anything, this patch removes a warning that gets added by https://lore.kernel.org/lkml/20240509200022.253089-1-edliaw@google.com/T/#mf8438d03de6e2b613da4f86d4f60c5fe1c5f8483 within the same series. Arguably, each #define _GNU_SOURCE could have been first protected by a #ifndef guard to eliminate this transient warning, and there would be nothing to "fix" in this consolidation series. Thoughts ? Thanks, Mathieu > Reviewed-by: John Hubbard > Reviewed-by: Muhammad Usama Anjum > Signed-off-by: Edward Liaw > --- > tools/testing/selftests/rseq/basic_percpu_ops_test.c | 1 - > tools/testing/selftests/rseq/basic_test.c | 2 -- > tools/testing/selftests/rseq/param_test.c | 1 - > tools/testing/selftests/rseq/rseq.c | 2 -- > 4 files changed, 6 deletions(-) > > diff --git a/tools/testing/selftests/rseq/basic_percpu_ops_test.c b/tools/testing/selftests/rseq/basic_percpu_ops_test.c > index 2348d2c20d0a..5961c24ee1ae 100644 > --- a/tools/testing/selftests/rseq/basic_percpu_ops_test.c > +++ b/tools/testing/selftests/rseq/basic_percpu_ops_test.c > @@ -1,5 +1,4 @@ > // SPDX-License-Identifier: LGPL-2.1 > -#define _GNU_SOURCE > #include > #include > #include > diff --git a/tools/testing/selftests/rseq/basic_test.c b/tools/testing/selftests/rseq/basic_test.c > index 295eea16466f..1fed749b4bd7 100644 > --- a/tools/testing/selftests/rseq/basic_test.c > +++ b/tools/testing/selftests/rseq/basic_test.c > @@ -2,8 +2,6 @@ > /* > * Basic test coverage for critical regions and rseq_current_cpu(). > */ > - > -#define _GNU_SOURCE > #include > #include > #include > diff --git a/tools/testing/selftests/rseq/param_test.c b/tools/testing/selftests/rseq/param_test.c > index 2f37961240ca..48a55d94eb72 100644 > --- a/tools/testing/selftests/rseq/param_test.c > +++ b/tools/testing/selftests/rseq/param_test.c > @@ -1,5 +1,4 @@ > // SPDX-License-Identifier: LGPL-2.1 > -#define _GNU_SOURCE > #include > #include > #include > diff --git a/tools/testing/selftests/rseq/rseq.c b/tools/testing/selftests/rseq/rseq.c > index 96e812bdf8a4..88602889414c 100644 > --- a/tools/testing/selftests/rseq/rseq.c > +++ b/tools/testing/selftests/rseq/rseq.c > @@ -14,8 +14,6 @@ > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > * Lesser General Public License for more details. > */ > - > -#define _GNU_SOURCE > #include > #include > #include -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com