Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp110427lqo; Thu, 9 May 2024 14:20:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV0b+cuvAqBXSZ4sQc0rXVw0q8trdvZk6zLuFb05XIumOH3KVSMJCzDfdmXGhHVIpLzOd610Am58F8uOAtNebjOAijaoTQKW6RbfCM3oQ== X-Google-Smtp-Source: AGHT+IHke/wyYy4UyYPCdTiNzArKOwjz35wsqJcdwUPQSVpkML7oLNm1dNYsaZVsqm2ILUH6IJY3 X-Received: by 2002:a81:b049:0:b0:618:5e8c:c66f with SMTP id 00721157ae682-622aff3bffemr8514877b3.7.1715289647007; Thu, 09 May 2024 14:20:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715289646; cv=pass; d=google.com; s=arc-20160816; b=KnkGiFMnWrSg4nR8xDkvBJwUos3YS+kTNj2n1U7h3DIsDvNSI/YN/Um5w8cp+a8RAk iZ9m5ThagYD9+iaa2M4XFpgWcm5Y5M2PlS+cE3vFEAfS1JH7aKauOGydPt7iStKwuISg PJ6oSgkhKnMFrFH/6JfNKp3W4D1aRMxguypZ7apzb8UaipabOVj57hVxA4WtBeEwqw41 flp5eg4RIO8emA+LLa0u0+x2v8How7OYxc7NeO1gYESFsoWhBBEKKxb4dvPunecwitQP P5XyLTkwFc3ixL2a0goVZjiG6s1U50AdKcC7xDIZE06sjRcvSRPKp2hvByrM4o/wykzo 1lZA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=aj/ruisSex0Kp0dBhUAYPvC4ARDFWMxrTjQLMO36++8=; fh=hjQbIfZJAhAncOxNfHHGZ8g4iCvcAhuK9BauDBLW7FE=; b=vATuU1jNb5BAqn/rADI6T/Lll6PITgWkNlqMqMkFIO3qLJ7BQ45h2cb8UKv+CwTy6m wREKqp2PEq7/vo/dkoD3YhHSxav5R5+OQviWdmir1YLDk/3EsINaVdw5Si3De3cPVscs MPa/Th0TcW0eFoX/+ZLWSsmlcUjzjjTv389X+/asKPqv30XQR/zEzTc4HkF4lb0QPaiu dj4uj4+5PxGgmKVpHGVrZeZ9XWtQxPSrqCeX4m9e2uye36CJ43kKppZu3Bn5CiHDam6V H+Tuv7AGCM1inqXySiV2fZd3w9LcR2hfppljm11ws955ym2w6EwqsHdI/H/PFD67XRH/ PU6Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=RnFg9Uay; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-174982-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174982-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43df566f9d0si21683991cf.279.2024.05.09.14.20.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 14:20:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174982-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=RnFg9Uay; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-174982-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174982-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id AB0991C20D57 for ; Thu, 9 May 2024 21:20:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 12BC586240; Thu, 9 May 2024 21:19:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RnFg9Uay" Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7E898564E for ; Thu, 9 May 2024 21:19:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715289577; cv=none; b=sWGcnanBbgyl9pQDSV2p5I9z36LbeWE12YkMRNOsOSGll8u4XaNuSgobhQ96SyxCp8H6SnGdpw0gm5XeS5Eq2Uvt4wX+j3R3yYQdpWk9OgwskJEGs4hS6yEhFmpiEVB/inQo5crJoaR1BQ1MY+dT9cKriLbDrw94+9gfma94b6Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715289577; c=relaxed/simple; bh=Um2iaQ7WeSFO93nhxJoPQRrULk9qwBNcQZW38ADgIuI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=gvvOhBs2QyhVhw5QoGU/oEi2R/SheXQ4KoYmrGvaiWZIytGrKEn9wbWY/5CNxxGrb7aYjTlnGZ8O6SnlKQe5ZcHdG1PxVVH1uusjxEimRxr6w4qYSkXn4/2eT9/DN3547WJXBQncsZULjim6ZvLQGFycon4u3Dlf8bGPP+Skd0M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=RnFg9Uay; arc=none smtp.client-ip=209.85.208.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-572aad902baso5067a12.0 for ; Thu, 09 May 2024 14:19:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1715289573; x=1715894373; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=aj/ruisSex0Kp0dBhUAYPvC4ARDFWMxrTjQLMO36++8=; b=RnFg9Uaye0V/wEh+CofUbF/mTFaDJpOUF8VKlUbKgZlaCK0AURpyjQnS5iiUUeX+CI 380Gk+cOTxS4ES63Fm/f7YRVqECJNayQkwf7EmTz5hepGgr9pzF4M76aeWBmJ9fz2sUv 45rFJOHLglFzz83XZG3gl9OmXF7QibIStYoLr7v52nKMLwOgxUl6Tvo8MrFh7oRZni4d R2tO8IgBonNDCIm5nNBU3WFFk06SDvKjyYXYk9bWfhoGvtUQq2IEUN8lXx9ElPKRjyjR TNaTcaIT59ib+5cxbSeAYYE1rpVGXf71rszDUvJ884VTRnVvKMvG2BeBOkSZCbJcNzYn phIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715289573; x=1715894373; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aj/ruisSex0Kp0dBhUAYPvC4ARDFWMxrTjQLMO36++8=; b=ZCeEi2VYMfEKYcFZ7AOtONSkRtSM2bnOYpdsdbLOOh+1RxRDdSeLB5Hjra7l7tGI6T lM7NMyjfFpKzZHP+3wAU8SAMRyzzaTMoFYA7xwSGpzWLQuKPcsVYxS/4O8xO4jFOXmhy DINu0F4Psiv0oN3jVJqRq5AH5zARao4srxw3NzULv4t5HAYa7GIFtUraYGGde9SDQTqc qEpwKoQUIgT7N4OFCnJe1UJti91YBzNQ1qyaBnylvKkznxwZBA3gJPM0TUUaBkyht41l iby8iGEV206X/KhbmH2iZZ6vXQyzK4N6hgHBYwjlFD1gZfZChevPeG6Pxq3bOemBNDHk Gncw== X-Forwarded-Encrypted: i=1; AJvYcCV11t0lvdpMM/G2RrKTXYSco8MDCalzrq0DD6Ozvo1P/LYNvQBG/Jb27m3CFU2ouODhssvwBaO7YoeYnm7cBFrZbVjnJMt5tH84OJz+ X-Gm-Message-State: AOJu0YzSt/1EnzVtnDo2wN394Ik2asUcnCZ1edIJuNTgqUZ2qZKsgYt4 QLNaJ9aupufUURJV1oyRrwlJ2hNQxjxAM9C1VZlkfnpRKuKqnGNGXwkn4WpgEj1KT5ouQq0faN/ d4GObSPA1DHqMD0QX+rPUo+hIaPrD7rP4W2hm X-Received: by 2002:a05:6402:222a:b0:572:554b:ec66 with SMTP id 4fb4d7f45d1cf-57351ffc899mr8908a12.3.1715289570474; Thu, 09 May 2024 14:19:30 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240509200022.253089-1-edliaw@google.com> <20240509200022.253089-55-edliaw@google.com> <638a7831-493c-4917-9b22-5aa663e9ee84@efficios.com> In-Reply-To: <638a7831-493c-4917-9b22-5aa663e9ee84@efficios.com> From: Edward Liaw Date: Thu, 9 May 2024 14:19:05 -0700 Message-ID: Subject: Re: [PATCH v3 54/68] selftests/rseq: Drop define _GNU_SOURCE To: Mathieu Desnoyers Cc: shuah@kernel.org, =?UTF-8?B?TWlja2HDq2wgU2FsYcO8bg==?= , =?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 , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 9, 2024 at 1:16=E2=80=AFPM Mathieu Desnoyers wrote: > > 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. That makes sense. I can remove the fixes tags. 809216233555 will likely be reverted first anyway, and you're right that the focus of this patch series is on consolidating _GNU_SOURCE. > > 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/too= ls/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/selfte= sts/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 >