From nobody Mon Nov 11 21:13:54 2024 X-Original-To: dev-commits-src-all@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 4XnMjb1wfbz5cccD; Mon, 11 Nov 2024 21:13:55 +0000 (UTC) (envelope-from jhb@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 4XnMjb1NYjz4d4T; Mon, 11 Nov 2024 21:13:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731359635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v4U+AS59WmF0+Stzq/ZCCnexgrANDOvKEJMwrmamG5s=; b=j4XmMvzPbl2cgR50lAdCX7ipTLg5h2Eo5TqLUv+mboZCK84tkcHAfsTGObkvzMMjV+Lffc w+UKUwD4NIfKmBBQP/+hZoJek8YcLLvu04dEKGDwKsnnhH/OYwyT5RQFUjf3rewX/BZfZ1 oSKLC1b6Uk0mB26rA1WPIrf7l2ejuPEXwV32IMItL62iT2rRAX91a2voT5uwfQ2SeUBDUO iD6pk/j6ttLp1tGkAn9N/IQYkwh1gIE+TPbHJiRULkH4dxd1nqBSfyON/O58vPArE4gL2v XfvENYUU5RZbCMg62h8VlckqP4+txpJpswAGwZFpg9WZ2Vi/HfpyQQ3myGMgeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731359635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v4U+AS59WmF0+Stzq/ZCCnexgrANDOvKEJMwrmamG5s=; b=I6qPYorcTkY1+x6HzlGc54QhgtF16ze+wbHsMRIW7J4OjIQgYHPmF4rz31mvSl0Err06vk ZgGGfSpdpqyhCOEtph+nUgTJmeUiiInzvR3eAsfnqfXtG7DEtE2IPzT+HgBfX3iEpXYHvt UkXGlgs99+6BQ1IXFFTLxcA+5Pg8+7m5COqses6vwtDoNMuv1KozKKCKa6IzwiAixGvgqV MXuPBX5W077i2EQeLo4uH9VKkt0PhJMN+wgyJRIHshPHXUuK614TboQ7UXmqEm6tr7S7jM GCdOIJd4u0SGSjIF6+RMijri5cWSgguQeUFG6nX+aZ6DTC5krpQVhoQD1uUyNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731359635; a=rsa-sha256; cv=none; b=XEJ2MUHw4s7Mj0NnWg9kClVuhYfYbWKi/ulk6ksAeATdjuynJW7Jf6EYTvzqsCBZumahMR lP7Rma7GDN+uZne3k9RxrwPF3Xd5N4N9TZzwY36N9F0zoRVKXD3r4A+XksCd9dtzBgAip6 1+vpIHhrUiu5joXaT0g4jRn1eg4jzzLIF5lOZJPWhujjJlsjxasQkTC35peiSFQc0Iv8Fz n4HQAMVf4fvVbGZw6JMMiqjpWYPafajdL+m/KlgiA2eaPHK4OhK5QUdrARyqOljidqjUrQ mcuvj/ejOA+ldqrOOgJtuUjCiXoXbBHMyTOJEkkNd42HmNOCtFNIlNdNTpeZUA== Received: from [IPV6:2601:5c0:4200:b830:d04f:46f9:caeb:6e94] (unknown [IPv6:2601:5c0:4200:b830:d04f:46f9:caeb:6e94]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XnMjZ6kMyzKt9; Mon, 11 Nov 2024 21:13:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <84468a78-9906-4275-8220-db5ef9ccff82@FreeBSD.org> Date: Mon, 11 Nov 2024 16:13:54 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: cf8e5289a110 - main - include: ssp: round out fortification of current set of headers Content-Language: en-US To: Kyle Evans , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202407130523.46D5N0Qh032534@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202407130523.46D5N0Qh032534@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/13/24 22:23, Kyle Evans wrote: > The branch main has been updated by kevans: > > URL: https://cgit.FreeBSD.org/src/commit/?id=cf8e5289a110954600f135024d1515a77d0ae34d > > commit cf8e5289a110954600f135024d1515a77d0ae34d > Author: Kyle Evans > AuthorDate: 2024-07-13 05:16:10 +0000 > Commit: Kyle Evans > CommitDate: 2024-07-13 05:16:24 +0000 > > include: ssp: round out fortification of current set of headers > > ssp/ssp.h needed some improvements: > - `len` isn't always a size_t, it may need casted > - In some cases we may want to use a len that isn't specified as a > parameter (e.g., L_ctermid), so __ssp_redirect() should be more > flexible. > - In other cases we may want additional checking, so pull all of the > declaration bits out of __ssp_redirect_raw() so that some functions > can implement the body themselves. > > strlcat/strlcpy should be the last of the fortified functions that get > their own __*_chk symbols, and these cases are only done to be > consistent with the rest of the str*() set. > > Reviewed by: markj > Sponsored by: Klara, Inc. > Sponsored by: Stormshield > Differential Revision: https://reviews.freebsd.org/D45679 For the change in , is the intention for to only be included in userspace binaries that use this header for some reason? As it is, there are a handful of files compiled in the kernel that use remove -nostdinc from CFLAGS to access intrinsic headers for things like crypto instructions and those files end up including all of in the kernel, e.g. this from armv8crypto: # Remove -nostdinc so we can get the intrinsics. armv8_crypto_wrap.o: armv8_crypto_wrap.c ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} \ -I${SRCTOP}/sys/crypto/armv8 \ ${WERROR} ${PROF} \ -march=armv8-a+crypto ${.IMPSRC} ${CTFCONVERT_CMD} For CHERI this breaks in an obscure way (which is why I discovered this), but I'm curious what the intention is? Should the kernel always be using the fallback definition of __ssp_real? -- John Baldwin