Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp21310lqo; Tue, 7 May 2024 10:54:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXe/F49SDsARsHMDdQ+RGszGLYg2CLjEzdR9pqUNCcgq7UHga8GV40kWH2hv8sku3AFm9Bos6WiWmBbioLLDs1MHbkkq6MqGwSJO9EbJg== X-Google-Smtp-Source: AGHT+IGAqXi4ti74AM6dNLe4o2SvmlreuMaGE1Xl4bHt1avtnpu03P5vLgCFQy7Q1rr8YgfT6YK/ X-Received: by 2002:a05:6512:3681:b0:521:7846:69d3 with SMTP id 2adb3069b0e04-5217cd49129mr166031e87.55.1715104455469; Tue, 07 May 2024 10:54:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715104455; cv=pass; d=google.com; s=arc-20160816; b=0XlUe0KFnoinoWcPw58W9ZVf0pWsd/e9mv2xhBXlc0EK1otQ9fDp5x295hkjPzuRHh XocbT3YjokpQisDydoSUcIQVXlXQZagDMzlXjhY+zp+zpJmEPYknZaQCYS+fjcU71FKu SZzZVk3qHuM/zvFwV1cTIYkw/WfvDM7eYv0Trg8QWeGl0lRTiBZy2Yu+ohTXwmwW7fE7 MRjHQG7Udae5M2bBoM357pCqKx7pJxk3+1Y2Uk1CEabI3U3u6DaDrQbe+msT89Idv9Vs qAKgErU7E4Is1N6m4//5NA7X6fqu6yqRyv9nMb75l8pGOrJk35mKnkPH09HxPNxMHoH0 F+BQ== 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=ZZSBxoniVFCnSwsRyNGGB/5WVFKEVwOzPElRSvx/1EU=; fh=ZqtOknhnDPj6U6fGAQ2KGZTWt10jIKwjwbZpILdtrZA=; b=gvtKBB3o3EVQ+tUGB74q5tjblihom/z766vMlverqb6RwKJvj5rhhFh//oSZGEtT1L ZjkhECneHsXEXxrweyAGU7CI9dZ1tWcc1Hr7nFFt+Eh5mYTyHNenmAMNvz7OIi2TiBPC d5BHoVSgmx0VT/EncpJ8P1XfKYjQWpaviU56X64/q7a9hLKXSlVsqJNPmxyPUVZCf99A GUteMz+3Gs6FXneDZSyDW7iKTUYhe8Fl60jxS3bychlT6QwdupgezxH6VtUXQdO0iuR4 t5CJXM6hqd2jpiObqzDYVcsj0JZP4n3cdnftcDu9sFLqigEMwNWMrkXAlWAOkgTuRI7B s5Ng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=R5pdE+Oj; 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-171932-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171932-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 lo16-20020a170906fa1000b00a599a979a8bsi4957773ejb.903.2024.05.07.10.54.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 10:54:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171932-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=R5pdE+Oj; 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-171932-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171932-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 317B21F22CE0 for ; Tue, 7 May 2024 17:54:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 93D3E16D31B; Tue, 7 May 2024 17:54:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="R5pdE+Oj" Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 4096816C868 for ; Tue, 7 May 2024 17:53:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715104439; cv=none; b=eRz9WbSsmHhEtp/hl1cSvfn7uF8EO1vpIFRhR8Zerkf2drogBk5NMEOTRKSQ7tsLfupITFZ4oQONJPnp/ncHSlRWALj6UbHH4Mq9UCKTRhINHsi0ZyM12q0pCYAt5C3VOIjDfZrMRknkcCreXMIqlVlJ0C7IyvubVxwCjsGP2tE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715104439; c=relaxed/simple; bh=f4jkcb6eCGK9z9a2d3qPQI3YlfWTfGaPefAR0W1j3LQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=LPAgziLeve0cIUQDFmnIomgz4svcV3JP40FkEXZ5BW0Wz98c0Wse5WIbTFmLPpcOokNCI/9x7ID9y4lJN3z341YhKdb/e+BDraB1x24S92+v+X4+ZFWJhw7QO9bdkbxgIN3hYXLFnC7ICN/ZAUhDAbpqTHN+qnjVHAO8y0yvVw0= 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=R5pdE+Oj; arc=none smtp.client-ip=209.85.128.46 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-wm1-f46.google.com with SMTP id 5b1f17b1804b1-41a428374b9so11175e9.1 for ; Tue, 07 May 2024 10:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1715104436; x=1715709236; 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=ZZSBxoniVFCnSwsRyNGGB/5WVFKEVwOzPElRSvx/1EU=; b=R5pdE+Ojdt2Cf5snoCts3zjuPF+NBboucpKaRWvWgyataQj2lyuCl8muFmDUew1dIJ pDT0/AfQStpl9KL5fIHOuhGp/GFnj/lvtdIgkxXj0TeJyfYCJsmg5l0+Nx+iRcwvEK2K +T6bgg/8EupoWfWeKz4F5PGwEWZJF4OgUdYAptkWRbt9z2bCz7HQwYNdNLQW+vO7DY7R 1Otjr7MtGzNjSh1KPtRe1WvnwHFWbbZhX/C+UnSGdcFMNNX1gox1bnmmu0UY9B8fWjhB gN01Ma6l8bRH9yRsacL7Pq/XGNZPAciiYzX4QcNJNRYeOr5H6ak9cuiYu73daIk4JlMb PXRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715104436; x=1715709236; 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=ZZSBxoniVFCnSwsRyNGGB/5WVFKEVwOzPElRSvx/1EU=; b=TSeE5P/j4Fyx7S4h7rfH4UXm9yDWkXjtI9BuEuQs2SYltWRuVS461aHnw9FCKHEhcM KqFRMgn+eIzUTxsMDsH3Y9BoB47LkZroFWB6MoqM3jb4utDYveNtBfESkNB2xjrZBXd2 znSN5vnfK+kOuhBrW6+rf2GisPOi9xpueSX/93FllZv/4pfSpMF+08V5f8tXe9C5f37j H36dQpEbLV1nRYZTLmsCNJ26zrGx/1njtKqnVeXVY31oZ8pKPEyBvl8jMLKa3GX4iWtR zz13Rh4W24470zrkF47RRwfqM9QEvjyyRp5LhF0WIdrgSv8Rl+wTZ7eqCR3fWPAn1lUA r2hg== X-Forwarded-Encrypted: i=1; AJvYcCWyKKDw2BjsXMy9WriGF3kOFEAvA6itSrzyeBYHyVZ9glSsj19F/wVgteBuy9VSDN5sooCQwTchlTq6079ESn0siWs/xgNO1mJg5MKv X-Gm-Message-State: AOJu0YyzG3r7KSRGbAQ+f40sntb1tpOe01V3/LgUjsqS3JdyWjwojZ7O SVJQ4X1Ebp9mnkTaCThyyNB7DWWMbUgALtz8KO9iXbH5N0HvwDOCN+wxPIud7LLErSRa2CCVEw0 N3AkR3O1QVT9++vONbZgT2T69vlD058ExoS9L X-Received: by 2002:a7b:c046:0:b0:419:b16:9c14 with SMTP id 5b1f17b1804b1-41f7a8634ffmr90295e9.1.1715104436438; Tue, 07 May 2024 10:53:56 -0700 (PDT) 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> In-Reply-To: From: Edward Liaw Date: Tue, 7 May 2024 10:53:28 -0700 Message-ID: Subject: Re: [PATCH v1 00/10] Define _GNU_SOURCE for sources using To: Muhammad Usama Anjum Cc: Mark Brown , shuah@kernel.org, Jaroslav Kysela , Takashi Iwai , Jiri Kosina , Benjamin Tissoires , Sean Christopherson , Paolo Bonzini , Bongsu Jeon , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexandre Belloni , Jarkko Sakkinen , Dave Hansen , Andrew Morton , 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="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 30, 2024 at 10:41=E2=80=AFPM Muhammad Usama Anjum wrote: > > Thanks for the fixes. > > On 5/1/24 6:59 AM, 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 th= e > >> -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. > The easiest way I could think of is to add -D_GNU_SOURCE to KHDR_HEADERS > definition in tools/testing/selftests/Makefile. It wouldn't be obvious fr= om > KHDR_HEADERS name that there could be other flags in it as well though. I'll try this approach and see. It looks like there are also some Makefiles that don't currently include KHDR_INCLUDES. Also, this will cause _GNU_SOURCE redefined warnings wherever #define _GNU_SOURCE is present. Should I also delete them or wrap them with #ifndef? > > > -- > BR, > Muhammad Usama Anjum