Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp467414lqm; Wed, 1 May 2024 06:24:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWaYd0It+Zn6n+OAnsvWxB8TR70I3rl6bmNEVokrONIts+RiAMJGNRkDyUPVYdYwxlivZHGaUfl0seCVhvXNxBG+8+wzehb7tTIEQvtkw== X-Google-Smtp-Source: AGHT+IH+SzQ5KIyHf50lWk8l/9/4NUYHHKqCRZgWY9R9GSv9lrzPZ2lSHa/PN1imSuBfaz/so9JE X-Received: by 2002:a17:906:494c:b0:a55:ae98:3aae with SMTP id f12-20020a170906494c00b00a55ae983aaemr1857473ejt.30.1714569898220; Wed, 01 May 2024 06:24:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714569898; cv=pass; d=google.com; s=arc-20160816; b=E57KmXUjIBUMc9Bl9KlK7thOC8ZCR3EOlCMl/AFHxJALcMFko8X77cmNYIzjiOvDBG gLc6g1AXZHwnHMpHep5+jdxbCAMRsB6sTZXjNcjF0Q4py8N3suNlaP1gvC+nJwRIHeXV 3kYRIjOJCEDz6L4pMq7LILgoI0+cw14zEKQnGJpA5/QYqA/dQ+bIGVp63RsgDHLmqlJ8 A+g+LbPMiVfjo5hUkeOCvmeoAU8csXCh6tYd1eiEHqvjx5YZFD8ofmN5vKmd3mwTTPrx WAT+IvMj3FLK0FAFQm7hsWHske3526cI+hXJOabdYWmdaan7GoBDrYwAORByROUXlHOj w92g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=4j6TmQ6ZgTGCAdIqQxwPqCx/nTzh+QyhXiuMiXZrc1A=; fh=IVYdTJ/LhhorqmhJr9j23UOK2ymz2iUIFUoM4/JMahs=; b=FJtMioE3Mix3nFpeZHd4z9Wy2M9lI6MDmIg94oDNmq5cVMiO4FRg16BKQWDwVdyNQR lqTsBFR/uZirps7cTuug0PbChoivDG3c/yYHVDTfPCiWYthap3RjDrs0XyP+8zjqjzHu w3RYbeMqtwYIqA9W154e1/UxWCTwn2PXQK7tG98IRxeVjXeIDR4CmJYrwEm+vnXivhMA 32JC2TVfsV8H0ba6x3PTz+6ylirrDQCIV8XWHIO1bDuN5S2zuTS5PZDWu/O6l9Jl5842 XY6nLPpWk/7g8KkbgQI4TmAZHFevYEgTOmvTKZ7lAepsIpWcdzcnti541drQQ4jpCqWF brBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=z4PSvnZZ; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-165315-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165315-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id bm12-20020a170906c04c00b00a521c17dc47si16224003ejb.179.2024.05.01.06.24.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 06:24:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-165315-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=z4PSvnZZ; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-165315-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165315-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 am.mirrors.kernel.org (Postfix) with ESMTPS id C6EF91F23890 for ; Wed, 1 May 2024 13:24:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A35D512EBDB; Wed, 1 May 2024 13:24:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="z4PSvnZZ" Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (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 DF39212E1C4 for ; Wed, 1 May 2024 13:24:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714569880; cv=none; b=YuZ7kbb5xCMy6N3zjpuoFdacO1ZmNQUuLjJm5pniYHFh0lLHERghYx2Rvuun8eaKYZoQWEALWAZvdCzvwGw4N+uY7hO0YBimNcy9uUTo/dOUAKB5tAfhL2MaCxbNFoGmPOSWvfJhwHGd9M4OHdMUJZSR/bJTTJXUVJim0LPWYLI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714569880; c=relaxed/simple; bh=krrfckqjbeQlFLb67v3IVek4EQvt8apnoVfcRYoUsg8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=FdaJrMpq6NmKkHaxP2OKJwo+WSx6uThUoxQuBlmnvqOBxwYMgDEZOuJnzeul9LJ9xf3XkEPXUL78OyYSSc7Ra+5R/YGyG4harsSdblhrpeLhFgpr9xZZMaLvBTO9ivaMR1fTDCRfmhLHDg5630nNGUur59aeJbuymhzomFBbhNI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=z4PSvnZZ; arc=none smtp.client-ip=209.85.216.74 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=flex--seanjc.bounces.google.com Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-2a473ba0632so7960122a91.0 for ; Wed, 01 May 2024 06:24:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1714569878; x=1715174678; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=4j6TmQ6ZgTGCAdIqQxwPqCx/nTzh+QyhXiuMiXZrc1A=; b=z4PSvnZZow+6cwPT+0ewrIkZ1zd7BDzLa+B4BwRbWfQeul8nzOsi19rm0gzFJB29a5 X1qrmI4UmTxNrE8laFdrt5n0s1LOcdAQUyN8KlFjksLa19gdfLjN9rdxS7rkHH6wHmSx Dt6vno8vuOBbKIVaNd/ZSN209Qkb/aM/VBPR0OgIPrRnR7/vkHGp68RZbNptbw41mTFa 3d043BKnXcNsJkhd/u6ytclKWj9RxAZpUPm0bNkT0+lSbw6W9UH6MMOoIsVtz9Jxpx/l 0NrMuyLM5KyCds8FWf26I6GWndEOa1VsaXVD1/lqiTKKSTp/prHyQE9HYEcdSmd7GLiI 2DfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714569878; x=1715174678; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4j6TmQ6ZgTGCAdIqQxwPqCx/nTzh+QyhXiuMiXZrc1A=; b=XkmuVpi2oDznPifZyWOxYYByarmqrnjtu4XLaDqAFFrDfcBR8w+U+pE+QYoy2eCFGD I2Td4sTAbtNArw0571GX8mnbPMvDoNuMFthPlCF0xRr0xeIC/QnZ5wCrjfsOjGXggMel pw5XLmQKRcVGCo++fh1SuP7rAJwDalHQfWDh4Zoh8rYXRmZ+KgRa6U0Ij/6AcElyVN3J AuyvWLu+29KBNjy+gwK3Thfk8iySRnxOFQ2vMP8iWwxnDAAUulLVR9jWJ4d5Kk3Ws0IX +0SfzfQaJuCJ+RE1790lmvs7wgSpL03t5iXq/CPEwMWsYfMegYWW/Sh2jxTGUsUboORD lrwQ== X-Forwarded-Encrypted: i=1; AJvYcCW3oVch/TTbzqQxQ6ZY//Pr/Z6kSdnq3KDvaI4nbxrInFHyPcLYveA8xhDeCf0JR4d000iAxeaz2iEZdaQ6fvQjT52aMuN/l2OHaWNB X-Gm-Message-State: AOJu0YzTkslyp700WLh1S3G4d63HbKzjEbNKrxCB0oQwRAMS6t0c/pVU kZHIHjWIUf08q35CdNr8SDQaAKBJ0Y6Q+Ab2393O7paHyQo4/316pAVLQggNWKRttWVvebZxNHY iyw== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:90b:b0f:b0:2b0:14bf:3f45 with SMTP id bf15-20020a17090b0b0f00b002b014bf3f45mr7454pjb.0.1714569878155; Wed, 01 May 2024 06:24:38 -0700 (PDT) Date: Wed, 1 May 2024 06:24:36 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240430235057.1351993-1-edliaw@google.com> Message-ID: Subject: Re: [PATCH v1 00/10] Define _GNU_SOURCE for sources using From: Sean Christopherson To: Mark Brown Cc: Edward Liaw , shuah@kernel.org, Jaroslav Kysela , Takashi Iwai , Jiri Kosina , Benjamin Tissoires , Paolo Bonzini , Bongsu Jeon , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexandre Belloni , Jarkko Sakkinen , Dave Hansen , Andrew Morton , Muhammad Usama Anjum , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@android.com, linux-sound@vger.kernel.org, linux-input@vger.kernel.org, kvm@vger.kernel.org, netdev@vger.kernel.org, linux-rtc@vger.kernel.org, linux-sgx@vger.kernel.org Content-Type: text/plain; charset="us-ascii" On Wed, May 01, 2024, Mark Brown wrote: > On Tue, Apr 30, 2024 at 11:50:09PM +0000, 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. > > This seems like something that should be handled centrally rather than > having to go round and audit the users every time some update is made. +1. And if for some reason unilaterally defining _GNU_SOURCE in tools/testing/selftests/lib.mk isn't an option, we should at least have kselftest_harness.h assert instead of making a futile attempt to provide its own definition, e.g. diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h index 4fd735e48ee7..6741b4f20f25 100644 --- a/tools/testing/selftests/kselftest_harness.h +++ b/tools/testing/selftests/kselftest_harness.h @@ -51,7 +51,7 @@ #define __KSELFTEST_HARNESS_H #ifndef _GNU_SOURCE -#define _GNU_SOURCE +static_assert(0, "Using the kselftests harness requires building with _GNU_SOURCE"); #endif #include #include