From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yx1-f51.google.com (mail-yx1-f51.google.com [74.125.224.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D194A4C8FF1 for ; Fri, 21 Aug 2026 14:31:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787322721; cv=none; b=Hl5n6IfcdSfSgfb+q7uTzAKowStREULtnibDS7SGV5hN7Yy8iqP32y0i2IYjJlkngK4mY//NhrMszJM1it14RYp2uJQY+9EliqsixWkRsjf6biVHof+OE4H6L+dTVp5pUdrN4G4kx2Q41u46QRHf7cHXJyvr88HgxvsDEAYuXCo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787322721; c=relaxed/simple; bh=DrZfMDLRTzk2UFTiQWUmac1FpzL/yMGaHEUgIZ1u0pE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=urwIVvsWz+wQm2cXIjvRqFoc/veYg1Ln0J23kxtU9emifNsYlP47HVN5+um6dDVsiGipOdn7Hz9c+jbpafeDwoSnxftOoZ9PPb+f/j+0OpRDG4P1Qs9MIe3gHkafwLmWFakGuvLdKDDvBRo84VvD7q+4kCzePZD8bZEP1IR1ROo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=im+5H1/+; arc=none smtp.client-ip=74.125.224.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="im+5H1/+" Received: by mail-yx1-f51.google.com with SMTP id 956f58d0204a3-66cdf0df0acso1498793d50.1 for ; Fri, 21 Aug 2026 07:31:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787322712; x=1787927512; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=KEQwtM0/L/H2ZNYGWj1jrSqhTDuXigyAxGdx+ch9XwU=; b=im+5H1/+xxm3KqD/mY/LTqlNBB4XW2Y+Yn3CtrTn/Hr+HJenHeLobUtDlacTH72Whb fbb01VwtvmVpHFkDQQZI0ycNZ6ujNQnNlnX4bud9N1WtGkjsMKLwela4HnisqczBCIGn sDyxciEEqzKBXgYwuvaVzooCxMzTcvM+N4d+BuO5gp1epKMkexpyAvt+7Y61NyPUX4Oi W/rIG/W2zDhCaq/AJN5jw+NKKUQnwW8mr3uy+TWWPlI+URYsCTZ4zQm2jz2+IIkuMAWS gBxf9ynTuLI6/eiAJgS//pEnmK9EV4hZZQDjB1pD1vDjJ74Vbeon27uqgXsZLgA35Dnl AAiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787322712; x=1787927512; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=KEQwtM0/L/H2ZNYGWj1jrSqhTDuXigyAxGdx+ch9XwU=; b=M5OXF+5kQr/2jGHBWj4jtE6ooU/4oZm/Ht2CUBkBCYkVDuFQDhJ+Bn+RJcrju3T2eM hWGcgR+NdX4isKRmwPdoPH0CgT/Z8ynFPfWhuXoM6u0FnPH1KSkolOAwprKU4GXzw+ux aTEh9VWTS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d50.54.1787322712556; Fri, 21 Aug 2026 07:31:52 -0700 (PDT) Received: from zenbox ([2600:1700:18fb:6011:350e:631:3b2c:9519]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-66ccafcfe3esm4404567d50.2.2026.08.21.07.31.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2026 07:31:52 -0700 (PDT) Date: Fri, 21 Aug 2026 10:31:51 -0400 From: Justin Suess To: =?utf-8?Q?G=C3=BCnther?= Noack Cc: mic@digikod.net, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [PATCH v2 3/6] landlock: Bump ABI for LANDLOCK_SCOPE_SYSV_MSG_QUEUE Message-ID: References: <20260727230833.138165-1-utilityemal77@gmail.com> <20260727230833.138165-4-utilityemal77@gmail.com> <20260821.ad614a879e61@gnoack.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Aug 21, 2026 at 09:15:31AM -0400, Justin Suess wrote: > On Fri, Aug 21, 2026 at 02:38:15PM +0200, Günther Noack wrote: > > On Mon, Jul 27, 2026 at 07:08:30PM -0400, Justin Suess wrote: > > > Bump the ABI version for Landlock SysV message queue scoping. > > > > > > Signed-off-by: Justin Suess > > > > The ABI bump is normally put into the same commit as the > > implementation for easier backporting. Otherwise, looks good. > I'll squash them. > > > > Thanks, > > I did wonder about if we need to use the landlock_object here? > > I'm pretty sure SysV message queues stay open after process exit, > which could cause the domain to be pinned by landlock_cred_security, > if programs are lazy and don't close them. > > So it probably needs to be a weak reference. > > But it's unclear what should be the behavior there when the domain > is dropped: > > 1. Should it become inaccessible and belong to *nobody's* domain? > > (i.e when owning domain is dropped, the queue belongs to no domain and is inaccessible to > all LANDLOCK_SCOPE_SYSV_MSG_QUEUE scoped domains) > > 2. Should it be moved to the parent's domain? > > (i.e when owning domain is dropped, the parent domain is the new scope, > and then it's parent, so on and so forth, more complicated, but more correct) > > 3. Or be kept as is. > > (i.e Allow an open sysv message queue to pin a domain > for it's lifetime) > Scratch all of this, I think it's best if the kern_ipc_blob takes a reference to the landlock_hierarchy plus a depth u16. I think this will require introducing a new landlock_put_hierarchy_deferred method because of the runtime context of the ipc hooks, but should be pretty easy. Also refactor domain_is_scoped() to take the server side as (hierarchy, depth). Justin > Either way this almost certainly needs to be rebased since it's been > a little bit and there were significant refactorings of the domain and > ruleset structures since the tracepoints series. > > Justin > > > –Günther