Date: Wed, 29 Jan 2025 14:42:45 +0100 From: Alexander Leidinger <netchild@FreeBSD.org> To: Ed Maste <emaste@freebsd.org> Cc: Jessica Clarke <jrtc27@freebsd.org>, 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 Message-ID: <99a3d04aa2eb3c1e8ea0dd24b37a5c44@FreeBSD.org> In-Reply-To: <CAPyFy2CDwzhNS6Bt6x6gi4QXj9JNu8On5X%2BYQhGGCEqNz%2BYrMw@mail.gmail.com> 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> <CAPyFy2CDwzhNS6Bt6x6gi4QXj9JNu8On5X%2BYQhGGCEqNz%2BYrMw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] Am 2025-01-28 14:42, schrieb Ed Maste: > On Sun, 26 Jan 2025 at 07:38, Alexander Leidinger > <netchild@freebsd.org> 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 [-- Attachment #2 --] -----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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99a3d04aa2eb3c1e8ea0dd24b37a5c44>
