From nobody Tue Aug 29 20:17:12 2023 X-Original-To: current@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 4RZzHH3zRLz4s8x3 for ; Tue, 29 Aug 2023 20:17:15 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZzHH3PJvz3CdB for ; Tue, 29 Aug 2023 20:17:15 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693340235; 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=8LyAvvkMwssLcGJ+RqcCT7qrv3TL+oLOA74yWvlg95k=; b=WB8VT6psd3CrBA2lrnD/AvLKT7j6kjEHdUK8x/HVeDMubI7J//RVQueqSuy8KSflWAffG4 IoK4xsntHCl26eRfpYOwNE7wb2rz+NmK+0S5smWbJnyU5FJfe3lB9SSIX8dopPR8MpY9hB nwFZ3+apUe/n8SJWkbtR+yG8maDuCpjfEoemEKEGcvagZ0skeWo5AtyjA+ZBnfJBMsq49u NcFiJ9IjrFt2TEo/4X22OCnwZSwMtLilQ8X6n+XYkH6gy4Xhh4y8oRR5pPX+zwtyffgdZz 1JVGYvELMXXY6ih7nkLFFuxHGMOFFdxiRnZ1NP5AEgh77tkCp+ylbJtKUJzY0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693340235; a=rsa-sha256; cv=none; b=hy+vqbDUB87QzmTbFO374Wyso1w5/A7KHUO/Oaovto61zZOQj5SdrTXr/ElAXQCIoSxvQo MyWmP5UwmAMR0CYNg2PUOCGB3EOiGgnLilfff0YXWmmTiIXjklZwwAEdzwx+SSMV+jJ6Cg CjEFV3g0TQExncBJtp7UCQ7ybG3JSEqjxQFDtJNtp+VV+dxM9EhO6g9PZ11EFLrK/lD9QW UPQ4l1ircsRSx7BiLdU1dy+rd6gpwM7klPUot58YGr9DkkL8DdZfsjsrT88iSDWjq1/lKn TgVq8x8maIBlKumi3v6wElmJXotoWKKhKBwYnK99DrT3yZh3UxRHh9jBz6TkjQ== 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=1693340235; 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=8LyAvvkMwssLcGJ+RqcCT7qrv3TL+oLOA74yWvlg95k=; b=RtdmA++tQnyvnuyWPb8OTRfI8/qLpXSRvYg1G3mUAu2YYYDW5llPirLxDs/O9iF3Szgp6+ LP4SIaZw2Pc+3YuE8dRrxFVIAs/bTKVTexPFG88dungn8J2PWgJo1WxPH8TDb9t++ofNzJ b4g+VUJdebJZIVgo3acAuuB/DAOO/6ohq8JR9jpHO1DxsuQks0MnOdg6NcEmTokPLx3nkf ipKjn66OKr/NiIRNIYHXkFp4SgiAwERhe/LdN3PZX6qMapREXkcPAp9tMeLuXJw+kqd4wP A3D1DrUIGByxNO9U0iyMp3B1Z5nH+yUswn/TBU3YwX7cHZbmY0QmHvTfvV/PIQ== 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 4RZzHH1F3mz19Kc for ; Tue, 29 Aug 2023 20:17:15 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <54cf548e-73d8-3376-6ee9-2be0694396c7@FreeBSD.org> Date: Tue, 29 Aug 2023 15:17:12 -0500 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: Possible issue with linux xattr support? Content-Language: en-US To: current@freebsd.org References: <20230829190258.uc67572553e4fq3v@mutt-hbsd> From: Kyle Evans In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/29/23 14:15, Felix Palmen wrote: > * Kyle Evans [20230829 14:07]: >> On 8/29/23 14:02, Shawn Webb wrote: >>> Back in 2019, I had a similar issue: I needed access to be able to >>> read/write to the system extended attribute namespace from within a >>> jailed context. I wrote a rather simple patch that provides that >>> support on a per-jail basis: >>> >>> https://git.hardenedbsd.org/hardenedbsd/HardenedBSD/-/commit/96c85982b45e44a6105664c7068a92d0a61da2a3 >>> >>> Hopefully that's useful to someone. >>> >>> Thanks, >>> >> >> FWIW (which likely isn't much), I like this approach much better; it makes >> more sense to me that it's a feature controlled by the creator of the jail >> and not one allowed just by using a compat ABI within a jail. > > Well, a typical GNU userland won't work in a jail without this, that's > what I know now. But I'm certainly with you, it doesn't feel logical > that a Linux binary can do something in a jail a FreeBSD binary can't. > > So, indeed, making it a jail option sounds better. > > Unless, bringing back a question raised earlier in this thread: What's > the reason to restrict this in a jailed context in the first place? IOW, > could it just be allowed unconditionally? > I don't think we can answer this definitively, FreeBSD has a pretty wide variety of users. I note that we don't /need/ to answer it, either, with Shawn's patch; it defaults to system xattrs allowed and an individual sysadmin can make that decision for their own context (and supporting the knob is relatively low-cost). The only part I'm not sure I agree with is the addition of the new flag to PR_ALLOW_DIFFERENCES. That allows it to be disabled by system root for jail "foo", but root in jail "foo" can create another jail "foo.bar" in which it *is* enabled (rather than only allowing "foo.bar" to have it enabled if its parent does). IMO the name PR_ALLOW_DIFFERENCES is a bit off, because to me it would imply that it just allows the flag to be set in one jail and unset in its child jail. Thanks, Kyle Evans