From nobody Wed Jan 29 13:42:45 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YjjzW1cdNz5mmWy; Wed, 29 Jan 2025 13:43:35 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YjjzV5FFXz3FPy; Wed, 29 Jan 2025 13:43:34 +0000 (UTC) (envelope-from netchild@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738158214; 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: in-reply-to:in-reply-to:references:references; bh=7zAUVfxGccY4gzAlG7/hV3Gn0cvkSM/ZtSqhUHdIeW0=; b=wDrhFgSobzvBLDSSDmM8AmElnk1ZD2joFKa7tHjO481bfStY2QjxS8FyxIoUMRPZCU7gxv DdulRugqMG+RNVT9x1BKHVlsHCcYBeARXshiwbDD4hwx6HoXHgReOPVrXGEb3wbF7W3uX0 4kE+WhTtVn+9+++SMPgbV2VcASXfa3CwKPleCB1JCIRibSQmMvFStKRxWkT1fiT8NZuwTx nVyt3Z/oh584xVe3v2cSnYS2th7MYPJlOWWUG8JlQWiLORXEx52dJ638qtdWh0l9v/UMmg MuRLazgE3hvDfvPWq9iTCwdtzEDYjQspg6GkZgaV/vbWXbrTrfPvoBCJ86hJJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738158214; 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: in-reply-to:in-reply-to:references:references; bh=7zAUVfxGccY4gzAlG7/hV3Gn0cvkSM/ZtSqhUHdIeW0=; b=Fykalh4qzgCPnGCe9MELimajipuWHLMGqU3k1HZhYbEZTOiWT7UwJ85wSuqWaSffYgymNy c98r7hxYqKemY2jh3MaQvhH07kol+I8CEdxmhC3umsa0gl1zKdmcZ8kaZnglwCudVKnSzI /+2WRVg+2WXhNhgN5uV7Qx8NFgtMjHHvRgXiSrgSTluwDSkkSVHHK14HCJxSsDuGyROqYb A0uqgTNRAb5vQfcIeW93XTCrTZ3K25CAepaCP4fGe1H+JKuNWsZWm1UwbsRrqbMXFQkMSf EvqrX/3sWyymZlJGWPUhCqEHUVzan1vRQ4LhQaJyemizpG5C3sKHIrbU1iZwPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738158214; a=rsa-sha256; cv=none; b=jsRcrbXiLineCAdKKGfnxV92Hh1twhr1h3mcSLp0e9iNSOdAptVzv3pj0J8SLDP336LYVx 1RPIYXINGrrBUC/jAFmYgUqqbCTjnoxzXhBPVKRu7/TeGNg96A2y2VWSvz4J81wnaW/Ne6 U2bmvv+T0W2yCgXwtoV7DWqFlDeUhhzpAvScgl6DixcuzFnC2gdy9NVoT3kewK+Z30CcWf PmDEv4ZTaeNBxP3p0b8n8PNqc2wl7jbdT/diy+8SdTX/NdHPI7XXplxUJWkYJcGGgbYJSU i/yIg9HP8ONp8O3/eNckjS9sglhGvYJehub1J/nlOSFDzKZZd9OHgG9Zzt5Lww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from outgoing.leidinger.net (p5b165f59.dip0.t-ipconnect.de [91.22.95.89]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "outgoing.leidinger.net", Issuer "E5" (verified OK)) (Authenticated sender: netchild) by smtp.freebsd.org (Postfix) with ESMTPSA id 4YjjzV28wCzJFn; Wed, 29 Jan 2025 13:43:34 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from webmail.leidinger.net (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: alexander@leidinger.net) by outgoing.leidinger.net (Postfix) with ESMTPSA id 6E2D020B0; Wed, 29 Jan 2025 14:43:02 +0100 (CET) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Date: Wed, 29 Jan 2025 14:42:45 +0100 From: Alexander Leidinger To: Ed Maste Cc: Jessica Clarke , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: f934e629dc22 - main - Add stack clash protection to the WITH_SSP flag In-Reply-To: References: <202501251308.50PD8Qsg042260@gitrepo.freebsd.org> <81A8E695-5034-4945-8D07-DF95E76904D0@freebsd.org> <9fec6bfae287dfc123a359c3e1164ae2@FreeBSD.org> <6C70A3E0-CC6D-4B0B-96A8-70636F08AC6B@freebsd.org> <3e0e88c0031d9c3e1f6232f2949f8909@FreeBSD.org> Message-ID: <99a3d04aa2eb3c1e8ea0dd24b37a5c44@FreeBSD.org> Organization: FreeBSD Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=_ceddf5ffd6a4e58b2cffc16ce89738cc"; micalg=pgp-sha256 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --=_ceddf5ffd6a4e58b2cffc16ce89738cc Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8; format=flowed Am 2025-01-28 14:42, schrieb Ed Maste: > On Sun, 26 Jan 2025 at 07:38, Alexander Leidinger > wrote: >> >> Am 2025-01-25 20:21, schrieb Jessica Clarke: >> >> > It looks like with Clang we end up using -Qunused-arguments so the >> > warning/error is suppressed. That at least means the build doesn’t >> > fail, which I suppose is good, but I’m not sure we should be promising >> > that WITH_SSP will protect against stack clash then having the compiler >> > silently emit unprotected code (for which we’re to blame, by telling it >> > to ignore the fact it’s not supported). This at least needs to be >> > documented that the protection will only be provided if supported by >> > the compiler. > > I suppose we should add support for stack clash to COMPILER_FEATURES > in bsd.compiler.mk and add the flag only if supported. I will submit a review for this later (testing some arch limits for zeroregs at the same time, seems it has similar restrictions). >> function correctly. >> supports stack overflow protection using the Stack Smashing >> Protector >> .Pq SSP >> compiler feature, >> -and stack clash protection. >> +and stack clash protection (if supported by the compiler for the >> given >> architecture). > > To make it explicitly clear that the "if supported" applies only to > stack clash protection, maybe make it a separate sentence. > > ... SSP compiler feature. Stack clash protection is also enabled, if > supported by the compiler for the given architecture. > > Looks good to me either way. Committed. Bye, Alexander. -- http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_ceddf5ffd6a4e58b2cffc16ce89738cc Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc; size=833 Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmeaMGUACgkQEg2wmwP4 2IZZ4A/9Hzoinux+qxxxLNa2zpkwlN5eyljIBzd+YBrsy2YY8zVlpNkZRsLrmHAq gLCbeR1YYC/P+H1zoruFqJbxdt+KvrlkDrbbJzsIk54LHDUR19EhX06+Hdxt4SYT dLxmPApeS5wdMi5rQ8NvLVo5Tt3MARYbgihk8pH2uvL2yfgfMurvPlhwnlShxuHy Zl99SeQn2L9iQaCIAzTGudilcNC65uWk6Gv6Vu8ymqt/XiXEbfAkPZpDURORsjJT 6l+8GWKZm+8gtCmclXUqUFLmPev05LdYdcUhfZGQPpgssVOWHM4n116Qxs4U6sv1 Sbp/WGv5XU2VmqUSO2pVq6Ge7btLNNVZ5mItkSU3LAv5+h0SBgiNo+LL1u5vUrmm hC6C9yv5eqIQalSP2VZAMFjPlSbLWfjXSsUWv4A5XQtDhjoW8crqhuINCqeqE4Cv SbWALFBBHTRohtOojSKNFSvbXsYBAEwACTa4zFghRScR8H5KGRc77g/R1ewyYvZ6 no1rXmzPZPXkmAMpnCjKQpAefRwwh973czCoOVdVHSL0l48hmZ75JKMTRYEGUQv6 PfM1mXxkXp0lhndHp6YL/1S6KH1AAhmLCZY2n4yBM5fGnVqoujxT3h9Bx6zAVqFS vkzU0tv1yTQ3iewo03/6o/tH1Dsg4qzt5LN/Wd+AuKHUSkXO18Y= =gWQ6 -----END PGP SIGNATURE----- --=_ceddf5ffd6a4e58b2cffc16ce89738cc--