From nobody Fri Jul 12 03:30:57 2024 X-Original-To: freebsd-hackers@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 4WKxvS4WVsz5Qblp for ; Fri, 12 Jul 2024 03:31:00 +0000 (UTC) (envelope-from kevans@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 4WKxvS3zcvz4pRG for ; Fri, 12 Jul 2024 03:31:00 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720755060; 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=XjQm2A6K01x+U/5+XQyv5gGfEg59aHq/NtjuRNzMN8I=; b=A+d0AE3Idjl1LajE5/WwOm9ktCEdb3HY/acAHCIQ+kdoAI0+8/vUXuukNaLI7Zn6bra0Ge PmfkBVDIxNQLQ8SWYaWemVrL+YlDR8Y9PD0AT1gyCfky0jWNstmWYHGrfRJLPBOdPPhZtw 2rxBNUdCfyv86vLhRlh8IzQOoJrPVyXjT4U9S+4DNTT/Hwd3cVH/Bc//LDCuyOncwk75AY 3BcLdWw23lwn5syd2sBJgp6sv9S63nqeaLsmse1jVJEFQ1Kqp3N9KF/gPtGzy8P1vqXSTu UjsvQFUrAOeC8R0KzrNY+JTXfmBbApnuGsj6EANkexVYcHzON6ByRwq0e+Bhig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720755060; a=rsa-sha256; cv=none; b=F3rRV8W2Q8Xe9fSw7TI8WHUbRfX4y18sLFANRTEoFOy00ncF+l8My2gF1O8n2taik9Fwl6 p9RavoTfd2UL/XVKSh/eJc9KKZqwNeqxLxiJtKqTXWqDERLvybFXnWSVN2gRB31RZCLmeX wfvp3m/8P7jYlUy5Bm8ynSmCDBM1KKZ9G2SmpGfsE41oUbNoF1LB0EElxXXbFwYQ06m/gW p9tYHqzHKV49UxQUO736m67fpwvhMVbndYypJxrhRAb+jCLsY7cCk0z5O7UimEr0i1as66 hUtgZqLKRbkeFXvJqurUuihVFDPxgW676kVc+Oi0Z4QBw8hu8e+/YGc93kADKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720755060; 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=XjQm2A6K01x+U/5+XQyv5gGfEg59aHq/NtjuRNzMN8I=; b=U78a+SAcK5hw34/44u2/46u7RIZk42DwxsGpQpgRijHLpD3gZYXosKT6dXYqndQkzPBMUW bOvL70CxDgOfrnfalsHRNyxh0BSxxNYgREsLiD/JnxzN0q5Q5ym/o2dAL2nq3ZTCCy2ZjT FhHN7t8km8WrJ3VfSdEpOm6hfQnvi/Tq8iYFWf/AJaNIB98FQ/RmXywlbFd2jqITbbfCTh Pz66xxTs1DjuYJ14G3Mne3DT6S0t7qFlEm/6+vzMBB6Dsk6c2MwQfGLsyKeacGgk5OKmcy pmY6ounwsa7SddCko47uc8jSnrSwb4GmRCd4CdfOR9WR8Ptz/IiBtwYBCmtEsg== Received: from [10.9.4.95] (unknown [209.182.120.176]) (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: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WKxvS0jwqzMyX for ; Fri, 12 Jul 2024 03:30:59 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <9d2a7044-6d58-418a-9255-658eaf063c36@FreeBSD.org> Date: Thu, 11 Jul 2024 22:30:57 -0500 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Further work on FORTIFY_SOURCE From: Kyle Evans To: "freebsd-hackers@FreeBSD.org" References: <89e3763a-093f-4ac2-a785-fe95448061f4@FreeBSD.org> Content-Language: en-US In-Reply-To: <89e3763a-093f-4ac2-a785-fe95448061f4@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 6/21/24 21:22, Kyle Evans wrote: > Hi, > > Sponsored by Stormshield and Klara, I've completed an extension of the > original FORTIFY_SOURCE work that landed a couple weeks ago.  This set > includes both a test framework to make sure that it's more or less > working as we expect, along with fortification of many, many more libc > functions & syscalls.  The relevant reviews are in a stack starting at > https://reviews.freebsd.org/D45676 and include: > > D45676 Prepare some build fixes in advance of more _FORTIFY_SOURCE > D45677 libc: move __ssp_overlap back out into > D45678 libc: tests: add testing infrastructure for _FORTIFY_SOURCE > D45679 include: ssp: round out fortification of current set of headers > D45680 include: ssp: fortify poll/ppoll from > D45681 include: ssp: fortify > D45682 include: ssp: fortify > D45683 include: ssp: fortify > D45684 include: ssp: fortify > D45685 include: ssp: fortify > D45686 include: ssp: fortify > > I've pushed a branch to Klara's GitHub as well for anyone interested in > trying to consume it in that format: > > https://github.com/KlaraSystems/freebsd/commits/stormshield/fortify_source/ > > Review and feedback are welcome- I've been running the full set on my > laptop and my build machine with no obvious issues > > One caveat that we'll need to work through is that the lang/gcc* ports > include some headers, so those ports can't be used to build > anything with _FORTIFY_SOURCE enabled (not compatible with ours).  These > headers should almost certainly just go away at this point -- the > improvement in the feature with GCC comes from the builtin > implementations, not from whatever they've written in these headers. > FYI- these all have clean reviews now and I believe all feedback has been addressed. I'm doing some last minute smoke tests with my laptop and build machine to exercise a number of common paths where we could have something funky, but without sufficient objection I'll be pushing this series around ~24h from now, give or take a little bit, assuming the tests go alright. Thanks, Kyle Evans