Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp181787lqo; Tue, 7 May 2024 17:02:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU5sIn/qgfNHUA01H9aZUAXWlmk+acGT/shvvljBtz109jhfoskZZMRtbwzyPEvcSF18TlJIjYYCxeGHsrLQnMXw+2u3KIkN0Pg1x0pqg== X-Google-Smtp-Source: AGHT+IFBnDJ23q3/6ohSXg/nMUldwmKKMKInierVa3x03KDB0zx3RPg9FexnH2cdQYaDAK2vfdOK X-Received: by 2002:a05:622a:1441:b0:43b:6e0:4291 with SMTP id d75a77b69052e-43dbfdf1996mr14359501cf.53.1715126543118; Tue, 07 May 2024 17:02:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715126543; cv=pass; d=google.com; s=arc-20160816; b=vmGrp0G+d7IFa8l5WGhH/Z/I1JCN7X7o1WJNj06dBZemq1C50TMibaWiQ91bD1agqV DHWODS1wI71VMir5mtpF8DZDXXE8dLdP0lfhSizxpyHBePvst/tfQzrTH20VSdy8HOlC eK3XsmjO5Q9fCq/KO20xnSkEhP44nYWB08iSY93EfBJqjZmqauVK3dz9PgKq6OMCUjG7 1UvJ+aePjANbfQHrwxfAHDUJ4mlcgfFost74eLV0ApE0RZGePMnV4JA6GNHKFSbrCKfJ UebqcML0qaVeX+h5bqc0tYrwqjlTmxV/pKtVTuL34dOKuCzr+NIPFwxJm0/S6TzZDECZ 9Yew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Tt8XgRQm+eA+VmBxGqEcvvy66oE9R2AfbLeL3WkCPuU=; fh=qbGMEc1nPJ+bLfHiDTRAM4lQYa67KoIoDmfYOpmjlhk=; b=QET3aTCbSbnV4VXiZO+JMTIrtRPO4qbroV7ZOGT0rLHjIyKFOV96rnHm5T3P6tDsXe kMEON+XtkDO9WykvPQ3Lf0hIIRf/0F6/msfmj/cBf/7mjeAxbD2rNajAN2gw+zUj0MO2 UoEOsfgvlGgZv/7TR+xZTUsLv7bcDDSf+zk6k510dlNVhQxJ+R4+17xKl4xpeCz8NpHT qIGAoY2q/SfP/MSbezzsMiIblOxjkU6/eYs4WEyQyM7XByhokAtJ1JIBHsKcS376D6IU aMJz6+8iJkV0ua+6zGpRPjSVDPIM2N3EY86wDLu12sSJ8zbPgOhEfIjT+1v85muaFf30 XPHg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YSKyRV2q; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-172516-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172516-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u5-20020ac858c5000000b0043ac84e8349si13968531qta.686.2024.05.07.17.02.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 17:02:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172516-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=@chromium.org header.s=google header.b=YSKyRV2q; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-172516-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172516-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 DDE921C21006 for ; Wed, 8 May 2024 00:02:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CBF6912D1EC; Tue, 7 May 2024 23:28:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="YSKyRV2q" Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) (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 F3DB112BF20 for ; Tue, 7 May 2024 23:28:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715124536; cv=none; b=Qxveu4XrEYTAwPG0zavcJ1IbQkP165UKQLqwb5XXaPLgIrtSv3EeMlZ9FBIcnQkswkE7JXXP2vjabwzkyitIkicMSjwJsYW5xVG4ojyIYQcVICrM2MGVXEOdmWMI9fqUw/rW8cdsyvg0OaI39OS4BttiVUxrH6xTmTZt1e5/kxo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715124536; c=relaxed/simple; bh=JX0XCKXr1thgDPxaTecjtKr6rIsRQAHKTIazy9OBhDc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=F7VZsiaWmxh5B8Rd605vpzaee1r33ZLxZ5/x3qAqyUd79CXWFC7MEr43FBEuXqJKE/gaKgfwdY5iEDB1hxWUcauUcGFgpbMQMlRx2nXrp0hScoZPC5YphALsCnAG6jqU/Au9dvxWvTjBkFRKyS9FkKF+qY688aefUf6mDqBl7Eo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=YSKyRV2q; arc=none smtp.client-ip=209.85.215.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-5d81b08d6f2so2894539a12.0 for ; Tue, 07 May 2024 16:28:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715124534; x=1715729334; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Tt8XgRQm+eA+VmBxGqEcvvy66oE9R2AfbLeL3WkCPuU=; b=YSKyRV2qjy0ljrYgd0U6Ch3uzgizQZe+4pSJYHsZSP01gcra909Tiz1I1roMahHF4f R02+dz1KaKB4os+ZuM06R3OW4OuuE5O+jtzs5QpwOMbe9ciAbxWjG0HBoTz/GjMb/HTS JZzkAPMzRCPpiJPnaz9ioUHMig2uiUqQfpOOs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715124534; x=1715729334; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Tt8XgRQm+eA+VmBxGqEcvvy66oE9R2AfbLeL3WkCPuU=; b=jDFWo2svW5RDLeFY43MWOX2Cn3Y6uPERpVXShvVFbdXNi9YbG5IbuuSVjYypt+jsNc YR4Tb8L4jhUDkdPzetsDAYDrX7oWaNgP4cGRmYs7qmAE3i3BA0e4YRj702NzU+15C3d2 ylSyr8rO+3kqxkzMM4g07fchbAer5htmH/q98gU4uZirWG9mqhoO62h4hmzDSv26Jlpj GL59a3cDaHycicaKXA6xeE47ZV6IXHHWboXecnxUXGa1jPTeLymOmEBh7bMGWj/p3x/D adB5XKyvrLHTbOEgKMzOR/0wClFz1WiW4EGOab9U5ukz3z0IbdBiwS0a6ecceAktYvBS 2FFA== X-Forwarded-Encrypted: i=1; AJvYcCVF1CyF++vCvoeY48KT4rg+r6ZvRufKyFOeDEA1OeHJldV4vxeChGRC7GwhUvhF5IN+pqh9v8Y+g5gWEaZagDxGK3k34u9FGPcC3ssO X-Gm-Message-State: AOJu0YxoRTnNKh1lCdD5LwuhiVKdoTuVFnq4r/2FmAe+gBfpSkhxH8Yg WM5288TkGqI78y8MnZIFbyy3nt9HMAD6+GQxxBIy4SZ4S9cxt8CVXLQ6cCGHsQ== X-Received: by 2002:a05:6a20:9f88:b0:1ad:6c5:4ea1 with SMTP id adf61e73a8af0-1afc8db5479mr1525582637.41.1715124534335; Tue, 07 May 2024 16:28:54 -0700 (PDT) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id 60-20020a17090a09c200b002b624b0161fsm80422pjo.19.2024.05.07.16.28.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 16:28:53 -0700 (PDT) Date: Tue, 7 May 2024 16:28:53 -0700 From: Kees Cook To: Edward Liaw Cc: shuah@kernel.org, Mark Brown , Jaroslav Kysela , Takashi Iwai , Catalin Marinas , Will Deacon , Nhat Pham , Johannes Weiner , Christian Brauner , Eric Biederman , OGAWA Hirofumi , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , =?iso-8859-1?Q?Andr=E9?= 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 , Sean Christopherson , Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , David Hildenbrand , =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= , 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 , Andreas =?iso-8859-1?Q?F=E4rber?= , 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 Subject: Re: [PATCH v2 0/5] Define _GNU_SOURCE for sources using Message-ID: <202405071628.7F8C3EC@keescook> References: <20240507214254.2787305-1-edliaw@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240507214254.2787305-1-edliaw@google.com> On Tue, May 07, 2024 at 09:38:25PM +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. > > v1: https://lore.kernel.org/linux-kselftest/20240430235057.1351993-1-edliaw@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 It's a lot of churn, but I don't see a way to do it differently. :) Reviewed-by: Kees Cook -- Kees Cook