From nobody Tue Jan 18 15:31:47 2022 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 B4A781964F3F; Tue, 18 Jan 2022 15:31:49 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JdXnK37MRz3PXp; Tue, 18 Jan 2022 15:31:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642519909; 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=SuTl4hCkg8XfoD2rRHuCriFGzXF+2cXz3q94xcxey+s=; b=CiXTXk+2OWpOtQ1e3EilqC7RwtXUAgJa1Q5+3Ex1lixcyaYOTSjCIbfgPSVnHgf6kJ2RNu FuoNsAmBZtG0XFshI+iUNeal9KqxqeA7VttS7/1KOCZZLweq/dxbY0MXxASmsxdOsqZ1ab VXAqmHfXNZ5I6WxKsZYdpB8LY44wcA9TbU/787NVE97FSwcCXsvxeupTT0wh0BfWUSN3k4 ZJL8g1lqd1g8xu6h/PZ9njpV9tB4tIm5VjdQVyUEEGQZQrkE4AHjBU9zkR4h0SRsFnPLUS j4yDZpEjLqDTmibF7SaTA5KbQxrgJy20IlaZ2eoxQbojeky+z5WblaevECSNOQ== Received: from [IPV6:2601:648:8601:8b20:a805:a11d:8c0d:2824] (unknown [IPv6:2601:648:8601:8b20:a805:a11d:8c0d:2824]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 971982899E; Tue, 18 Jan 2022 15:31:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <4e0db863-71fd-faa3-41f1-3cb05d539def@FreeBSD.org> Date: Tue, 18 Jan 2022 07:31:47 -0800 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: git: 706f4a81a812 - main - exec: Introduce the PROC_PS_STRINGS() macro Content-Language: en-US To: Mark Johnston , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202201172113.20HLD7v9006931@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202201172113.20HLD7v9006931@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642519909; 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=SuTl4hCkg8XfoD2rRHuCriFGzXF+2cXz3q94xcxey+s=; b=Kj1xpBC170lPM2fV4f/OAPaxiBZtCKHkpOlSXVKR5ncG/QhVDa4srohGYfLIz/DVZTO3Hf lJtVNA41y6tPlYOtCecq0YRWVouLyTB0yxFRlMWx2Znyjpxvif6sjAauptmIJN5iD4eeHU 5MFtBZcwclg9TAo++HX4DCYLdnf/SCyZ+LOOuYXjcKMzt1GZ7jtremvwfDT80Uhx6tkCrV 8g04T7HN97lyvRwqTL33ULY4TmAYHACgwnxa4191q6OvdJOsArCj/7wVPDVJPC1UWGHubs PunYVYjRMLd5FrjxvArOjuUPkRMEYlL01fopSps61ulEnWAapw1uuu0ZLNoZQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642519909; a=rsa-sha256; cv=none; b=L0AvOY8VYLUSEcXOG2VzVbAsBb+Ra5RwCA4/SLioqHknewa3LT2mREbYqwcttauxiityOJ cw7iOWz3Thu6wPnsjSpTq+VdaZZatopqtehgWC8vadtqE0gcOyIE1z/gsc2lJHHfZHax9e jGX9LcpZvRKoYR5kvY3jRD4wb9z9a9S5E+i/1/2jqZzHzWuDJEUA56Ikvnve36uy/UbjYe wDyHkHN4HWv8OW3MlmTD0R5jeMz4SkRO8bEBgZ5nEpquRzAkDFWWJA5IS1yD+1OJ1JQVBW U8wIftpyZdtxMyiA4kR3wQMV+zAqfy5aVLXFokhyzKFwdg3bXnXch2tvNTY53Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 1/17/22 1:13 PM, Mark Johnston wrote: > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=706f4a81a81250a326ea25914e7effe1768f1a37 > > commit 706f4a81a81250a326ea25914e7effe1768f1a37 > Author: Mark Johnston > AuthorDate: 2022-01-17 16:42:28 +0000 > Commit: Mark Johnston > CommitDate: 2022-01-17 21:11:54 +0000 > > exec: Introduce the PROC_PS_STRINGS() macro > > Rather than fetching the ps_strings address directly from a process' > sysentvec, use this macro. With stack address randomization the > ps_strings address is no longer fixed. > > Reviewed by: kib > MFC after: 2 weeks > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D33704 FWIW, in CheriBSD we have a 'p_psstrings' member in struct proc that is a pointer to the ps_strings structure in user space that is set by the ABI during exec. CHERI removes the need for ASLR, but due to alignment requirements of capabilities the stack is not a fixed location as its address can vary based on the size. -- John Baldwin