Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1767692lql; Wed, 13 Mar 2024 07:42:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVHD+vYzp5BU3fWiTj5QdTa58KqHS8/iHpqc8vbsvy7dKkU6WGBLkyBWuVmGWI2o3D7Fi/YsXUj5cBqS25ANvl02KktGE2tnzZVvjXW0g== X-Google-Smtp-Source: AGHT+IEw9V43TDMBHtDMfREdV0MiDeR5vTtBaZZOgYbwPasJ1eETsJTtn8Y9tvQFBMeRDNLdGoTU X-Received: by 2002:a2e:3607:0:b0:2d2:df0d:9e92 with SMTP id d7-20020a2e3607000000b002d2df0d9e92mr7550384lja.49.1710340950695; Wed, 13 Mar 2024 07:42:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710340950; cv=pass; d=google.com; s=arc-20160816; b=guDMjXaYW71TuXKoBa8UGBH+kui61S1thOl1WI7NancgNjYh0f/8BY2DEFYYTVFuAR /yExU/j5PsG8OkxPIn9FQKnkHWoaglgjg0LT+362vubvAJ72Z67a0/vJdVzpzdFKs/hV 7Zpqlw5aP/cQwxvJaYghoLKTIt8ryGATej0MJuGiQECpL6MO/3vuYXC7vnZCUwNNxT6x sMlSl23RUuaKtiZml2q30wHi4W7SLLGhmb6GbNUCyzhAh36bwHHvcIvqbegCjtb2j83Z k3TANN37o9PNuTSBDqP4AGk+d+iPZCU12MGqln3jyuWWSS9pDPmpuKXW0kwJCFZ0uplN zckA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=s56+A8op/q+HdIVsDoLHkIGjaMoZ34ZrAuFSbXAA8e8=; fh=ByeZmlkXxaotcaHU41tZIoM1S8VS57GWGqsRnQL8Scs=; b=i4GM4CsuB0GGnjJA/paOiVaAmwYLItXYdEkXIwrG3Vzt8XMic1hxtmyxo8f3lINj8q VERBNyx6EUzLQh2umIXV1mXYw5iCnTKElQHyU0RDl5QHb2mNIqJozCOl6k411fVkdF2L sKPgKKNn0acXMb2JJgkeK4d8E8sSPbTpstQVRBc5qV1EZVeGj3EAbiSR01Zpg493EK5Z S42lkJM3v9hWAayNMAV6uubNRG++EjH1rjt5SwbOXlToRNm79lfDKTZ7WvXJ9r66uwJU 1zXL5lD7GeXXwwO4v1qfPXZDS2HVHrP+EH+aR/+1a9xW+jzOhywzmO3I9SiUdluvnsC3 ZpAg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=VW3FX9Ns; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-101631-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101631-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ap9-20020a17090735c900b00a4665e95eadsi165280ejc.286.2024.03.13.07.42.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 07:42:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101631-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=VW3FX9Ns; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-101631-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101631-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 699911F2279E for ; Wed, 13 Mar 2024 14:42:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A1339B67D; Wed, 13 Mar 2024 14:42:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="VW3FX9Ns"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="yJF0v230" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 50DB44409; Wed, 13 Mar 2024 14:42:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710340940; cv=none; b=W1j7eU45MoqGZI+d8TCIb7Q8KTJRh+iHy+D/MTavSolkL3PAjwf1aHKujr9P0iWFI+1pfKNJx8LmhgYHwV3iXyixJicncRRnZi8j/+uti6dDX0Os7PyiYxAD79cxb2+Q8OyWo5KdTAuJBWpCUIHqN6zLMaV9cTtNOPkdMfJzDi4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710340940; c=relaxed/simple; bh=U5c5j9lYX0V5EhN9W9NhQsGKnW1C1zrts03VpAiVNg8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DTZso5yBGZ42NVgMn2jzfAV2AUkSAxTeLGvFdbE2rCDcuC9TJ7biDtglGmGuY9mWeCTBM+ua1qk9KNdBs2Ht5d50jKqY1oN8B3f1AsnIQn15tWS2wYlQHe4pAsWlyDcAS3REROu95sN78r+bxDwhmXvUIvU+TE2JdH+mRVwT8xo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=VW3FX9Ns; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=yJF0v230; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Wed, 13 Mar 2024 15:42:17 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1710340937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s56+A8op/q+HdIVsDoLHkIGjaMoZ34ZrAuFSbXAA8e8=; b=VW3FX9Nszwew+ZNsV7lgDshx2B+dlyawq7UgJUNk0Ze3vwPeQ7rHGLQTw/Qw860mUSTaI8 P+QUfJETXssHsJeBeZDkYBazeM16XBd98PYxMObxCBV7FBkVNgbDdmZMPLCjKv4PM2bV+u mr+3h9U+ugtJEBtZtlNVVVcZX/rIjQ8ml0QspNnZPm76EDN0KHVuc3STWS40Qe0blCvlAR u0sqxMSEzaj0MdFus/PVMhYagX7QSO4gDP5Bf3EQ6x1zB/1ZNOHfJqL6u3DRmxNDwX7ghx HvhaRxr5iskQXcW9fq+oOcIDoC9LyoHQVpu6F/dS6+EugIc7T8hVMACdwmB5Sw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1710340937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s56+A8op/q+HdIVsDoLHkIGjaMoZ34ZrAuFSbXAA8e8=; b=yJF0v230JK9QRq95rjjeV7q+BlD834eJebMVfmXKyXIA6T5x/UcdXTnBBtvrRFh0x4oNEs xq/BYZE2Iq3+3RAQ== From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Masahiro Yamada Cc: Kees Cook , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: Re: [PATCH 2/2] gcc-plugins: disable plugins when gmp.h is unavailable Message-ID: <20240313154111-53729221-b8fb-4969-ac4d-ea74861f6c84@linutronix.de> References: <20240312-gcc-plugins-gmp-v1-0-c5e082437b9e@linutronix.de> <20240312-gcc-plugins-gmp-v1-2-c5e082437b9e@linutronix.de> <202403121452.701C91AF6E@keescook> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Mar 13, 2024 at 12:47:59PM +0900, Masahiro Yamada wrote: > On Wed, Mar 13, 2024 at 6:53 AM Kees Cook wrote: > > > > On Tue, Mar 12, 2024 at 04:03:30PM +0100, Thomas Weißschuh wrote: > > > The header gmp.h is meant to be picked up from the host system. > > > > > > When it is unavailable the plugin build fails: > > > > > > In file included from ../crosstools/gcc-13.2.0-nolibc/i386-linux/bin/../lib/gcc/i386-linux/13.2.0/plugin/include/gcc-plugin.h:28, > > > from ../scripts/gcc-plugins/gcc-common.h:7, > > > from ../scripts/gcc-plugins/stackleak_plugin.c:30: > > > ../crosstools/gcc-13.2.0-nolibc/i386-linux/bin/../lib/gcc/i386-linux/13.2.0/plugin/include/system.h:703:10: fatal error: gmp.h: No such file or directory > > > 703 | #include > > > | ^~~~~~~ > > > > > > Signed-off-by: Thomas Weißschuh > > > --- > > > scripts/gcc-plugins/Kconfig | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/scripts/gcc-plugins/Kconfig b/scripts/gcc-plugins/Kconfig > > > index e383cda05367..a664fb5cdde5 100644 > > > --- a/scripts/gcc-plugins/Kconfig > > > +++ b/scripts/gcc-plugins/Kconfig > > > @@ -10,6 +10,7 @@ menuconfig GCC_PLUGINS > > > depends on HAVE_GCC_PLUGINS > > > depends on CC_IS_GCC > > > depends on $(success,test -e $(shell,$(CC) -print-file-name=plugin)/include/plugin-version.h) > > > + depends on $(host-cc-option,-include gmp.h) > > > > Why does the prior depends not fail? That's where plugin detection is > > happening. > > > > -- > > Kees Cook > > This patch set should be rejected. > > > It was already discussed in the past. > Just install a proper package, then gcc-plugin will work. > > https://lore.kernel.org/all/CAHk-=wjjiYjCp61gdAMpDOsUBU-A2hFFKJoVx5VAC7yV4K6WYg@mail.gmail.com/ Thanks for the pointer. As there is already consensus I agree that the patches should not be used. Thomas