Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp671165lqo; Wed, 8 May 2024 11:04:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWc09Ds+KyjB+/8YOU52JG3AHto+Q0V2QR8XmWns9l5qxPXBmsLaLgmIxMMDyTL2ok0zTBKsvcCjAnOww/F4yOj7YIso7QbR2OZe49tEg== X-Google-Smtp-Source: AGHT+IHcJ55WnE5OHNla0wKSH6eRs+pd+p7wucH1/ileBvdsATnWk4Hi3BC01f6EjD85qB/obmMb X-Received: by 2002:a05:6a00:98d:b0:6f4:9fc7:d239 with SMTP id d2e1a72fcca58-6f4c9334e39mr592330b3a.14.1715191444728; Wed, 08 May 2024 11:04:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715191444; cv=pass; d=google.com; s=arc-20160816; b=urSii+TaIRhNEDh7D/NJXFBUweRREiCUwPpaYnfmY3lQ5hu5m7RUcFb5Rv7q3tfTyT n83UoiCczy5hZJgsF0NKsYIG1bppT7YTxJwsDHhd67zpoJ5j0xEBIHsdLQ+pfiOvn6O9 k4CsrOYpBu+S2U/P5m+m+NQrRHLfEfhyTh7EaQbzh2Nz66RHQmljMUec5ftMGJVWr/H4 1YngqmommxrDgBxv/gSzxWiN56/FYBVdnN/HtV0QhKrKlUX6c8zglWF/z/Sd0/aTU5Th h8FPex8o4FMQ1kz41cEFROZIolkeRT+mx9TBxNmGby68cqN0V2LGVNv+lf1bI0F7Ex/s z1RA== 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=NKy0w8SAVZYo27FpU6ZBovVv7b8KWTwyUtyfvoxHua4=; fh=htOV09zbi6XIw48zI68tSP9iBZz0cyjzCQhjpePkz0g=; b=DsKsgdfgNPFUTFtDoyOvVUJuRWd7uZqukC6rpu8OD+tB+hHlGH3HykOcqJCvXIpqDM WYt4/wjTHSDVFqxV5IwRJyXdjQSFz1f+cUhoOKNWW3/2qpXJjzLwm+BBBuS++6/aswvm MR3KD0kZSq3kqqBneCrqG/vcxXBfXgjuD8cc4FA1xWFG40r3sJpgdakY2kDdTKiF42aG aaO7rFX4tNqfbpYoYPPOcnuWuOFxonV0QbR2v6Ke8tvB1qkScwTn/RMxSEWXdYgKhde9 bs8akw1WF3a4Tol2pPG7TTpBGAZQ41x7QquUsNt+K4qTNBpxl+SJ28HHCJZBSXcGA6RR kuKg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="DUGEar/2"; 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-173687-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173687-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id v16-20020a056a00149000b006f45fdb6060si8896708pfu.369.2024.05.08.11.04.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 11:04:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173687-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="DUGEar/2"; 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-173687-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173687-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 56BFC28ACF6 for ; Wed, 8 May 2024 18:04:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F1D612EBED; Wed, 8 May 2024 18:03:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="DUGEar/2" Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (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 2B59D127B5D for ; Wed, 8 May 2024 18:03:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715191420; cv=none; b=kqvQAm17M7rQdTEoxDM+qLC/I1Pf3m/CsLkOOKiWzXetW3lCIlpMqHI60rPlTBdaXXFSRntDLWBo9fBl9KeENTumOmEBiMv2jD+i/0jMUkQSAomsXli7ykRuJZLV/2pwI4nKrwmw/gj8QpC66zV+cyHEAAxKRb9Lz50fAJL72/c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715191420; c=relaxed/simple; bh=QnIGcOGbV4cqrx4Nx/huveAV3Zfk93aDR5GKJzn4mog=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=X4xCKkjxxX6MmPJS8Svj/Ap0aSXIL8v3ZnwBy14gFiEqKbmDWqhs0MJw4zsQk6rFPodkNhmVHop7f0W7yhJ+tEki3E+jhetzoP7cpcKTXJ+HbkguV5o9yffcoOkPo1SN7AqdwBiTgN/eQ9JlwofjMs7yjYkJo9MWId54e6GfH0E= 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=DUGEar/2; arc=none smtp.client-ip=209.85.208.49 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-f49.google.com with SMTP id 4fb4d7f45d1cf-572a1b3d6baso1741a12.1 for ; Wed, 08 May 2024 11:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1715191416; x=1715796216; 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=NKy0w8SAVZYo27FpU6ZBovVv7b8KWTwyUtyfvoxHua4=; b=DUGEar/2Azn7Sk1QTNCuUDEulN/0fZl9vXB5hOQzu0/nOgrwg4fZf52/mToQDVM8qK jiUsdPGqqUwvZzc5u0l9202dIYL0q+IMe7xxZmBhlXB3J5eRzxWX0fftblZOgWkxI+we 9XD++0LEzvNluWOsumBz40KWlPtxbPjPC1kf6Ok4aTOZesZCMqDyE4i2PbM2TmRkV77y fnpSfFLerzM3rn5+E4gNgR7DEPJhXlLQCIGbBmOfFDZ+yXafG5xPNT3IZJeGT7IZdJGj zytDYAaO/LVJKWnOCxxOJKkQXzbNcmOYPnzY1vzpXmWU5IB7rQ0/IA1p+LCrYBo48PLP biFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715191416; x=1715796216; 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=NKy0w8SAVZYo27FpU6ZBovVv7b8KWTwyUtyfvoxHua4=; b=S27Cu/1IcrfVGhbuKMwP9LBArmCGTLrqB94nJ0dAfNYyjw3jmBQWE0kBojS7aNgpVl ++HRhMyrwH+ByMLQniHthKC9yQ3mkO75d6HU8vayXP3xTTPXiZ5pzUDq9NEIufv7Q3xr kfMgHi/As0mIu7g7oDLchaUfgKMoOeW+TA88yurjNzgMmuL0vv0NSdHARwuCq5Q1WILq djekUXSxzkT+PZApZg0/bNptTQdYYNFGVDcEXvfJAOz2pa29VpgP8MJuwcC5GWabL7sc f2rhGJEZJBxJEvl8y+4JMxwNeSrUCns5xZI4BSQY8xq95fGiF3MI4D002UUE4imnNCYo t0KA== X-Forwarded-Encrypted: i=1; AJvYcCU6AYiYrmuC4IubZxCXZwV2TZpG665wfMSKSaWKbKK5ffw8VolVfJtGb9UPfFTNxnLtrTb0JmwwMfqHlDT8vUVAVWyYBS8OnqSS1WJ5 X-Gm-Message-State: AOJu0YxWKD/ACtYyZTBmCV3sFK4ESxdsSUmOvZoxU7e6bu3VH+LcRsSk dZNXGWMQVqubBBzk39EbrOXZy6DFOe3M9HZO/8DCm8WoZb79XPhg7lHp+9e9PwAFpcAVaxK/86f beGfc6teQjEeP1KUc92uIau/+WpP33+z58MN7 X-Received: by 2002:a05:6402:1763:b0:572:554b:ec66 with SMTP id 4fb4d7f45d1cf-57334b922acmr1088a12.3.1715191416289; Wed, 08 May 2024 11:03:36 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240507214254.2787305-1-edliaw@google.com> In-Reply-To: From: Edward Liaw Date: Wed, 8 May 2024 11:03:07 -0700 Message-ID: Subject: Re: [PATCH v2 0/5] Define _GNU_SOURCE for sources using To: Sean Christopherson Cc: shuah@kernel.org, Mark Brown , Jaroslav Kysela , Takashi Iwai , Catalin Marinas , Will Deacon , Nhat Pham , Johannes Weiner , Christian Brauner , Eric Biederman , Kees Cook , OGAWA Hirofumi , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , =?UTF-8?Q?Andr=C3=A9_Almeida?= , Jiri Kosina , Benjamin Tissoires , Jason Gunthorpe , Kevin Tian , Andy Lutomirski , Will Drewry , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Paolo Bonzini , Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , David Hildenbrand , =?UTF-8?B?TWlja2HDq2wgU2FsYcO8bg==?= , Paul Moore , James Morris , "Serge E. Hallyn" , Andrew Morton , Seth Forshee , Bongsu Jeon , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Steffen Klassert , Herbert Xu , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Manivannan Sadhasivam , Matthieu Baerts , Mat Martineau , Geliang Tang , Willem de Bruijn , Fenghua Yu , Reinette Chatre , Mathieu Desnoyers , "Paul E. McKenney" , Boqun Feng , Alexandre Belloni , Jarkko Sakkinen , Dave Hansen , Muhammad Usama Anjum , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@android.com, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-input@vger.kernel.org, iommu@lists.linux.dev, kvmarm@lists.linux.dev, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, linux-actions@lists.infradead.org, mptcp@lists.linux.dev, linux-rtc@vger.kernel.org, linux-sgx@vger.kernel.org, bpf@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 8, 2024 at 6:47=E2=80=AFAM Sean Christopherson wrote: > > On Tue, May 07, 2024, Edward Liaw wrote: > > 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced > > asprintf into kselftest_harness.h, which is a GNU extension and needs > > _GNU_SOURCE to either be defined prior to including headers or with the > > -D_GNU_SOURCE flag passed to the compiler. > > > > v1: https://lore.kernel.org/linux-kselftest/20240430235057.1351993-1-ed= liaw@google.com/ > > v2: add -D_GNU_SOURCE to KHDR_INCLUDES so that it is in a single > > location. Remove #define _GNU_SOURCE from source code to resolve > > redefinition warnings. > > > > Edward Liaw (5): > > selftests: Compile kselftest headers with -D_GNU_SOURCE > > selftests/sgx: Include KHDR_INCLUDES in Makefile > > selftests: Include KHDR_INCLUDES in Makefile > > selftests: Drop define _GNU_SOURCE > > selftests: Drop duplicate -D_GNU_SOURCE > > Can you rebase this on top of linux-next? I have a conflicting fix[*] fo= r the > KVM selftests queued for 6.10, and I would prefer not to drop that commit= at > this stage as it would require a rebase of a pile of other commits. Ok, I'll do that. > > And I doubt KVM is the only subsystem that has a targeted fix for the _GN= U_SOURCE > mess. > > If we want/need to get a fix into 6.9, then IMO we should just revert 809= 216233555 > ("selftests/harness: remove use of LINE_MAX"), as that came in quite late= in the > 6.9 cycle, and I don't think it's feasible to be 100% confident that glob= ally > defining _GNU_SOURCE works for all selftests, i.e. we really should have = a full > cycle for folks to test. That sounds reasonable to me. In this thread Tao suggested reverting back to 809216233555 and using a fixed value in place of LINE_MAX to fix 38c957f07038 https://lore.kernel.org/linux-kselftest/20240508070003.2acdf9b4@kernel.org/ > > [*] https://github.com/kvm-x86/linux/commit/730cfa45b5f4