From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from e2i673.smtp2go.com (e2i673.smtp2go.com [103.2.142.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D5BA1DE2DC for ; Sat, 22 Mar 2025 21:29:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.2.142.161 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742678980; cv=none; b=ZByeFq4fvaEriguvUHfGyOjwos7q9IGhmei4okmEIQNupQqqgy7GVX6zDwgBJDumipC6wWPMzkXv33M2VW69VztG64Y5/ESUnJK6h9QijysB6OSuG482bE0tVWh+T6sn3whKPmGWfWkqQlgzJJfKE/l18Ilw/ajMZUsu3mtP6HM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742678980; c=relaxed/simple; bh=Mb79DNtCDH+YprnnK7anYxnTAMJUcCMlahmLdHiruXo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IlgcpwkBLVmQ4KMhQB76ZVogG6pDIwkMrmU330k0CF+VXEUVbE0drL2mIwVl1zC79twq7amVpA7hVZwSGV/EHaZSZjcpq1u3Tpr3vqKK+k06dSmWehH249nMjsQCVYY2gdvlIR+sDrL5MU0psQp1oQIKAjvrgjPMZLs9AJIigJM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fjasle.eu; spf=pass smtp.mailfrom=em1174286.fjasle.eu; dkim=fail (0-bit key) header.d=smtpservice.net header.i=@smtpservice.net header.b=Rh7Z7SZc reason="unknown key version"; dkim=pass (2048-bit key) header.d=fjasle.eu header.i=@fjasle.eu header.b=kkWEfGs8; dkim=pass (1024-bit key) header.d=fjasle.eu header.i=@fjasle.eu header.b=i2dRR+8j; arc=none smtp.client-ip=103.2.142.161 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fjasle.eu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=em1174286.fjasle.eu Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="unknown key version" (0-bit key) header.d=smtpservice.net header.i=@smtpservice.net header.b="Rh7Z7SZc"; dkim=pass (2048-bit key) header.d=fjasle.eu header.i=@fjasle.eu header.b="kkWEfGs8"; dkim=pass (1024-bit key) header.d=fjasle.eu header.i=@fjasle.eu header.b="i2dRR+8j" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpservice.net; s=mp6320.a1-4.dyn; x=1742679870; h=Feedback-ID: X-Smtpcorp-Track:Message-ID:Subject:To:From:Date:Reply-To:Sender: List-Unsubscribe:List-Unsubscribe-Post; bh=ZkOds2VlnsYuYQLmdf8w6Ep7Uph1rKBP3ZEzdDiDdsg=; b=Rh7Z7SZcCdvGCKtdIMzLxg460J 4OCVJT3Q+mpYDou1L4xMENfWhiCHNLenhI1xaTUlis0Y4h/qp2rW9dZI247hFMzMv35VxSDCipymP HAIEnxc1CjfMtcTAXUtOVmu2KGXKOKfhvMpb0TsY6xGjDELWfHQFV/zMjm4XiK67PDwlSl6gTIydc iqsLQRMQzTnjVFMgVHS5+EOanC6jZ//3sY///fZyA1//vVTpKUSBOZ9HjKjLmvF8/i+dTfWyZY5cS W0g7cG0HcyS1DW2xcu2BqVZBJ0nV/ISOFBoW53KVD5scLTCBxcCCWjfsX5HPVzacwp89rkzL+pp3P AMC87r3g==; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fjasle.eu; i=@fjasle.eu; q=dns/txt; s=s1174286; t=1742678970; h=from : subject : to : message-id : date; bh=ZkOds2VlnsYuYQLmdf8w6Ep7Uph1rKBP3ZEzdDiDdsg=; b=kkWEfGs8/BV0V7/2iXCUc1hD2L/cTQF0o053ShCFViRL1ewRDRAHl9DUt1dQ+NDPOPPh8 ioKFOsVbsA8YOJdrglPoeIkA1L3h8hym84/CT+ZdBFz6S9/ddE1Y7XWRNQe4TtdR6CUM9qD O4iIoujATgfDQEl8vw7TzWZYYpswqw8giaLw7ud4mC1IcPGi4CcpbPgKkVm8021HBJGIPiY VQPChZmYiQcigV8CUDNXBb4fdlUXiDeQU58sR0ZoKVW41JpFlleDCh8HJpQBOZAASAMUi71 c+P40C7LzMhJWgZ1JdbLAzrjeT2uoKwNPOfgJdrN8Q7JMT+N++q2okOQk9Uw== Received: from [10.139.162.187] (helo=SmtpCorp) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2-S2G) (envelope-from ) id 1tw6MF-qt4Caj-2k; Sat, 22 Mar 2025 21:26:20 +0000 Received: from [10.85.249.164] (helo=leknes.fjasle.eu) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97.1-S2G) (envelope-from ) id 1tw6ME-4o5NDgrqv8S-km5i; Sat, 22 Mar 2025 21:26:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fjasle.eu; s=mail; t=1742678776; bh=Mb79DNtCDH+YprnnK7anYxnTAMJUcCMlahmLdHiruXo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=i2dRR+8j6qpe7Lr05Ew/b/2waRuShb9V6VCoVHZHZQzdHQa0Vu6l0QnxuHdPs9pTD K32Ymx+ZJJZw3kdfQ310kflq/waV3fcLieVrlLXL2kUckhY7IIU75tlWkuxp3bFtfe VKWIFWQcF0HrGMa2a9FiDxgKOe9LZ9D4mTEZbRQM= Received: by leknes.fjasle.eu (Postfix, from userid 1000) id 65D913CBC9; Sat, 22 Mar 2025 22:26:16 +0100 (CET) Date: Sat, 22 Mar 2025 22:26:16 +0100 From: Nicolas Schier To: Khem Raj Cc: Thomas Bogendoerfer , Masahiro Yamada , Kees Cook , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] mips: Add '-std=gnu11' to vdso CFLAGS Message-ID: References: <20250322000940.778730-1-raj.khem@gmail.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: <20250322000940.778730-1-raj.khem@gmail.com> X-Smtpcorp-Track: ElQxUPQjLANj.TgeDsMgFKsxW.-d5b1Q_lA4g Feedback-ID: 1174286m:1174286a9YXZ7r:1174286smZycWegRd X-Report-Abuse: Please forward a copy of this message, including all headers, to On Fri, Mar 21, 2025 at 05:09:40PM -0700 Khem Raj wrote: > GCC 15 changed the default C standard dialect from gnu17 to gnu23, > which should not have impacted the kernel because it explicitly requests > the gnu11 standard in the main Makefile. However, mips/vdso code uses > its own CFLAGS without a '-std=' value, which break with this dialect > change because of the kernel's own definitions of bool, false, and true > conflicting with the C23 reserved keywords. > > include/linux/stddef.h:11:9: error: cannot use keyword 'false' as enumeration constant > 11 | false = 0, > | ^~~~~ > include/linux/stddef.h:11:9: note: 'false' is a keyword with '-std=c23' onwards > include/linux/types.h:35:33: error: 'bool' cannot be defined via 'typedef' > 35 | typedef _Bool bool; > | ^~~~ > include/linux/types.h:35:33: note: 'bool' is a keyword with '-std=c23' onwards > > Add '-std=gnu11' to the decompressor and purgatory CFLAGS to eliminate > these errors and make the C standard version of these areas match the > rest of the kernel. > > Signed-off-by: Khem Raj > Cc: stable@vger.kernel.org > --- > arch/mips/vdso/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile > index b289b2c1b294..15521004c563 100644 > --- a/arch/mips/vdso/Makefile > +++ b/arch/mips/vdso/Makefile > @@ -30,7 +30,7 @@ cflags-vdso := $(ccflags-vdso) \ > -O3 -g -fPIC -fno-strict-aliasing -fno-common -fno-builtin -G 0 \ > -mrelax-pic-calls $(call cc-option, -mexplicit-relocs) \ > -fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \ > - $(call cc-option, -fno-asynchronous-unwind-tables) > + $(call cc-option, -fno-asynchronous-unwind-tables) -std=gnu11 > aflags-vdso := $(ccflags-vdso) \ > -D__ASSEMBLY__ -Wa,-gdwarf-2 > Thanks for the patch. Did you evaluate adding a line like $(filter -std=%,$(KBUILD_CFLAGS)) \ to the assignment of ccflags-vdso? Then MIPS VDSO C standard keeps aligned with top-level. Nevertheless, Reviewed-by: Nicolas Schier