From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.71 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795085236; b=gWzTMl8AtG83Rok0+RUpTBnpCOjyYhEJpTPqiq++lY/b65kKnfO6/FuSdNI4JkN4hpbu j451N6VDP8DwA9wiqqXmOnDhbVDAjyO2Hy00ANEyCKn2JinqizcaQnk/NNkDRzxsrl+OK 5sEy/+iGhYHx2KkHQn0YJgVFCmKL4VsmWpH9eDEWol7sb+5IIAHaI7O8yQTdDGga9RxDd 51G4CwCiXh0lTosNcLO4PmGKxVWbPwprVKjxP4LCT0ONg4F6n7PB1gGgmySKuK62IcDKj 7TVtboVNRIXPYOZ3EqJvqA9OyLvgKhF9Vh3zviayG6VlN9xwYYLtMDa4Vh2krmDclyA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795085236; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:Message-ID:Subject:From:To:Cc:Content-Type: Content-Transfer-Encoding; bh=67I3bNEfcu+N7yXs6EAi+/lBjbBrobM44S6SPv9jyFg=; b=AvL1axR3NodMZFME1xXbU4b02tckbf4T4okYbbvEoeeUlXyEFqVhbgIInlKh/7X1hKAP snGZnbi1alGu/vLicUgjHR17JwusifNwH05cGRejV95yYO7fD5JZoYMUEqGh+E5VEtsp5 DrZnOvRlwgiT64DCX+DUKtOOiJp6Ac8aab1QzEu2ows8dDPoWOy7Xj6JAaKXebQAvvRTU 8+qJA+JO9IwgGokh+Phx+257GEPLJbV2ongo3fFhPk/pnkNRPSLUTvSqRjEOLePyoN/lt clOHBGhwHTX8NR0V3tjz7Il0Gt2tGoIYSPOsEocDfVl97alojWio6ctxSq/oSBOp0pA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--halg.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=NdNKDppB; arc=none smtp.remote-ip=209.85.128.71 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B60C606A32A for ; Thu, 19 Nov 2026 10:47:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5B60C606A32A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--halg.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=NdNKDppB Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4b764ffc014so18130545e9.0 for ; Thu, 19 Nov 2026 02:47:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1795085235; x=1795690035; darn=vger.kernel.org; h=content-transfer-encoding:content-type:cc:to:from:subject :message-id:references:mime-version:in-reply-to:date:from:to:cc :subject:date:message-id:reply-to:content-type; bh=67I3bNEfcu+N7yXs6EAi+/lBjbBrobM44S6SPv9jyFg=; b=NdNKDppBshR3yFJ0FfbOWsYgjw9irAEaVT/7IxVBjACSprcjw70nJAaThe4TTE+dBk UInzrM8KIqiFSmvFBXVwwQFzSfHXLRF4YLznNEgsA197A1YdVcYipcpKCnel74Lh3uP3 IJU8KmNQDE6rlRrjF6eygat4qW2/xwIgaKCTrFmzkS0v7LtEztyWb9t1xJsPCF5aMRuU AIOVlCWj4gpRfMcPCpCzLg8bap7PiOOE6JeYbZy0QxdKAoWH1AASpuiixOTlS7ayd7/G VorTt3PcndgbOdBiGT0Q/3kekAtTPAvN9t/QClLjiNey7MLYcj9IijV1Jh+gIk3Z/tIK upLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795085235; x=1795690035; h=content-transfer-encoding:content-type:cc:to:from:subject :message-id:references:mime-version:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=67I3bNEfcu+N7yXs6EAi+/lBjbBrobM44S6SPv9jyFg=; b=RPKAPJiQKNn357XRU2nfhnHyvzbH3LjsSVgGxkIXnxe4BG8D+J0q+RAPSt1RjeqM9K 6C1JU0HLXqeVjCLMFYF5aENLFY5qB4guavrjqWHE7NoZ8k3xlf2E3zi1p66Vd1v4XvXT 7uqCfpQO3q4F1B641pTBEcEk0ya4cfmxE4KxHFoeAt8tMXQCs8GBIjkBSQ2XYi3cXkAm +TcRMFe1ZdAdIk8tthtzDZEMKlv5qXJv4IqUeWgkPg3SVvVZn2ZBQ1S3gCph80iYKGEF w5vdgE4ENKVvEeik94RtWZ+o42u325eWpsexxUfKkPyotpUvIuYRNaLzgOSIanj/oycr nuXA== X-Forwarded-Encrypted: i=1; AL+hErE0smZXWJ3KPgRiDqRrtxRAdC4ksW+Uy0m1i8Qm9Zi9IyZ5byA/OFdV5E7MKwF6wIUdEbl0aHHFiOOh9xY=@vger.kernel.org X-Gm-Message-State: APuU4Z9YzX1xc2nxtu0v2691hDc4u4+yVJT4LQkBHQDdrQbfp0ZqgaWd 6I2+JyLMmOKSFGvSd7iWSRh5XmcpSZy0ZyJ99wRpnrH6NmQ/HE6W+YxeYhSpT8JR66BA5pxEyQ= = X-Received: from wmwb7-n1.prod.google.com ([2002:a05:600d:4447:10b0:4a1:a2ef:38dc]) (user=halg job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:4e56:b0:4bb:7581:2bb9 with SMTP id 5b1f17b1804b1-4bb7da3003emr104763395e9.22.1795085234352; Thu, 19 Nov 2026 02:47:14 -0800 (PST) Date: Thu, 19 Nov 2026 10:47:13 +0000 In-Reply-To: <20261118.faiBee9Taigh@digikod.net> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 References: <20261028221705.3915340-1-halg@google.com> <20261107.aighieG4Ami1@digikod.net> <20261118.faiBee9Taigh@digikod.net> Message-ID: Subject: Re: [PATCH 0/8] userns: per-namespace capability bounding set and opt-in netns loopback From: "Hallgrimur H. Gunnarsson" To: "=?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?=" Cc: Christian Brauner , Alexander Viro , Paul Moore , Serge Hallyn , Kees Cook , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jan Kara , James Morris , Simon Horman , Jonathan Corbet , Shuah Khan , Randy Dunlap , Jann Horn , "=?utf-8?Q?G=C3=BCnther?= Noack" , KP Singh , Jonathan Calmels , Casey Schaufler , linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-api@vger.kernel.org, containers@lists.linux.dev, netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 18, 2026 at 03:43:03PM +0100, Micka=C3=ABl Sala=C3=BCn wrote: > Hallgrimur, could you please explain why your use case would not work > with Landlock? The capability split or new clone flags would be > complementary of course. Apologies for the late reply. Landlock's capability restrictions work well for self-sandboxing applications and launchers. The main gap for our use case is setting a host-wide default for unprivileged user namespaces while still permitting exceptions. Because Landlock restricts all capability use (not just capabilities acquired via user namespaces) and its domains are strictly irrevocable, PID 1 cannot apply a default policy at boot without locking out privileged services, file-capability helpers, and authorized workloads. Using Landlock here would require explicit opt-in enforcement at every unprivileged transition boundary (SSH, container/job launchers, etc.), where missing any entrypoint leaves unprivileged user namespaces unrestricted. In v1 we had the global sysctl to tackle this. In v2 (based on Christian and Andy's feedback), we combine per-cred cap_userns with per-userns cap_bset), and PID 1 or a service manager can lower the default userns ceiling once at the root of the process tree, while privileged tasks automatically retain capabilities held in cap_permitted and can explicitly raise cap_userns for authorized workloads unless locked. Another minor difference is visibility. Clamping the task's capability sets on userns entry (and exposing CapUns in /proc//status in v2) makes it easy for userspace to inspect what is actually restricted.