From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr2-f0.google.com (mail-wr2-f0.google.com [74.125.225.64]) (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 4E5B422A7F0 for ; Mon, 20 Jul 2026 18:30:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784572218; cv=none; b=rRb29AQJlX0/EOTYudmBKtsodUETgLlCYI1g3VLDg//EX77x1sw+YETz0yXeef3GZazB4tnEcbXNURypT/c7QX8QrddKGkv26clwMgpNyElyZIXNs0CqV8XmAqQsRlFevm0Me42iTz0EfLTWPGuCZuZzeKdFOf0WiG8AxXzJc+g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784572218; c=relaxed/simple; bh=OwznwCCL51DqvpfNCtpfM2jVCP0UbJ8x8niEoEDbl1c=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=eLm/31lPN0NUiOHKYoB/z0kC9ax3GUw9YTgIH3TGAMU42hIMogIrwqoKM3m/RQsfXks99Adf5RnCSY6SYxwzqsjc2pxWw0Zncl/SRzACLskPheLqU0O/wh1C8dE1hPkg6HPAVkXAggsgCbQf6d8ywd8lu32wP8uiDv70yiBap+g= 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=MJHo0iPx; arc=none smtp.client-ip=74.125.225.64 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="MJHo0iPx" Received: by mail-wr2-f0.google.com with SMTP id ffacd0b85a97d-47825ef4012so2877341f8f.1 for ; Mon, 20 Jul 2026 11:30:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784572215; x=1785177015; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:from:to:cc :subject:date:message-id:reply-to:content-type; bh=LvO6UAbRFcGCSjoBuZmDbMqs86kUUw9tJDf3lq23ABQ=; b=MJHo0iPxIH3vbeR/eb3ZK37zC9/W4Xhpm5/kuTAKx8kN0C9YFsg6m4mmlVYnYxdrgx sfF3XDvy9CUrh/4IMV33rdxVlMHmOvRMqIdT4+OJuFdcu+llOt2LhDKyS0iT48IRk+Em swZ21vGyec0YAU9Gwo0aIiO/SCqQeTR5UMSqPqpxdMFw+z0KJRKFc34BHVxmP+tI5DCG rtOZQURBk+tWbA/SulQhuwDiSNXDt+h7nFFKHLsOdbnwQFUJMx4RBYDcXhLuxwuslSxq SmgyxlmNuiAgIf8z+fNi69KN7ox9pAIQqr5dBsTqfMteAfWrbKtQrYFv+1mv6Re2oPUt gbNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784572215; x=1785177015; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=LvO6UAbRFcGCSjoBuZmDbMqs86kUUw9tJDf3lq23ABQ=; b=F4xbgE0yOIHlmvFyQo7ze0hLF/CI/ufd4kUQ5y1aAuqEwszRkfCWzOWGOU1SHvN63j ATiy7vN3UY3aqCfetiRniPVSW4ZMVLcaJXxRYqsENCZeilwVNc5izJ5fY6UrFZRhwudn A80W3M0zgzVZog6lUE90h0A6b4iKqca0jlupYN5J76Fqt4xXCzkhTHLsC4SQ1Re/y/HE EVUvvklunzY4mhIeYzWp+DFDX2qdykwICXZqz9AfKDVoeppPjur8Lx+4pW5j+Fn/Euwh zAMzm1JVEdwGzvYbjo/VviOjnTRY+Jag+a2N7hHJ8549JTlejjX6rtjgHwnikpjevxuK KUPw== X-Forwarded-Encrypted: i=1; AHgh+Rq8IvO0rIa9dkWcNLz41r0LLv+Va0owa050RXE9n2MXBOvFU+vw9ABzwMu+KbUfG1vRxneY57b8oaAoKvM=@vger.kernel.org X-Gm-Message-State: AOJu0YxOEKngNsVvSKsoMCerXy6aur4QQrSEZy7zySwNE/VbMqR4R3iP 2ZgcERKv3iz33BvQR3V6hRCVTzDfDFXEkjvU8dqHG3stp1lSHqg8qb9B X-Gm-Gg: AR+sD10A047cl5UnqoQ7X5H4BmCVF27MM5kz0BWAb3qe4aafsfRiCpJuWwemy5sG6p3 eClZyZXTBLXuSlAt/vw68UUVwzrGwqcZOeBURpXQ4wZ1ARUdwLXLx2c1s2huJFuTM/Kz2pbe4Hm MfEWWNTHD20Nj1u6s0uva8JC4mxhIqr+f/vDa/oZMBtiLJSYdt9W8lEiEZ8cxxig8Hpt0Mfhif3 l8BrvmGAjLCXzeFgoiwsUL/aRLCDCoMFy2D9GO/gKnvDEyi3bk8Op5vE6YqmM4/q4M4o6lB87Gn LGlHANVxn9oxAKUnP74a1WIs/++ICs09iaCNubmtD5S+KSqZNX7hFbmxOTLvyLGt5GwsW4ge85x gEtD15pA0DLJ/+V/UnpegjI/9qugK/ZGtxe9QavZAX4OzrhdDxcFLOnLhyTMp/2xXEnTDhQK+v7 A0Xl+8r5FVkrTh8kA2YoSFvp1p/pf8Li9PPbhvC8m1qm0X36Bq2YwIwJYAzkYewvtfEEImaILEb msuch/4GCGMM5oXtSchEsXs+pnNWkGySPrEDI1JSj027EaYNHHBGcw= X-Received: by 2002:a05:6000:2385:b0:47f:756f:9a83 with SMTP id ffacd0b85a97d-47f756f9bdamr7960451f8f.55.1784572214440; Mon, 20 Jul 2026 11:30:14 -0700 (PDT) Received: from localhost (nat-icclus-192-26-29-3.epfl.ch. [192.26.29.3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f63e49ce4sm32759891f8f.8.2026.07.20.11.30.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 11:30:14 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 20 Jul 2026 20:30:13 +0200 Message-Id: Cc: "Alexei Starovoitov" , "Daniel Borkmann" , "Andrii Nakryiko" , "Martin KaFai Lau" , "Eduard Zingerman" , "Song Liu" , "Yonghong Song" , "John Fastabend" , "KP Singh" , "Jiri Olsa" , "Emil Tsalapatis" , "Matt Bobrowski" , "James Morris" , "Serge E . Hallyn" , "Casey Schaufler" , "Stephen Smalley" , "Ondrej Mosnacek" , "Mimi Zohar" , "Roberto Sassu" , "Dmitry Kasatkin" , "Eric Snowberg" , "Alexander Viro" , "Christian Brauner" , "Jan Kara" , "Shuah Khan" , , , , , , , Subject: Re: [PATCH v5 2/3] bpf: add bpf_init_inode_xattr kfunc for atomic inode labeling From: "Kumar Kartikeya Dwivedi" To: "Kumar Kartikeya Dwivedi" , "David Windsor" , "Paul Moore" X-Mailer: aerc 0.21.0 References: <20260708000956.46138-3-dwindsor@gmail.com> In-Reply-To: On Mon Jul 20, 2026 at 8:27 PM CEST, Kumar Kartikeya Dwivedi wrote: > On Mon Jul 20, 2026 at 8:12 PM CEST, David Windsor wrote: >> On Thu, Jul 16, 2026 at 5:55=E2=80=AFPM Paul Moore = wrote: >>> >>> >>> I'm sorry David, now that I'm seeing this function again, especially >>> with the LSM specific bits extracted into a LSM function, this absolute= ly >>> belongs somewhere under security/. It's only callable from within a >>> BPF LSM callback and all it does outside of some BPF pointer boilerplat= e >>> is call right back into a LSM helper function. >>> >>> If the BPF maintainers aren't willing to accept that, then we will all >>> need to find another way. >>> >> >> Where this code lands doesn't matter to me, so I'll stay out of the >> decision of where it lives. >> >> If this kfunc goes to security/, would we also want to move eg >> bpf_set_dentry_xattr similarly? >> >> I'll roll v6 of this series meanwhile and we'll see what the BPF >> maintainers say. > > I don't think there was any preference expressed from the BPF side. Logic= ally, > one cannot be faulted for adding a kfunc to set the xattr for inode in th= e same > file where similar kfuncs to set xattr on other FS objects / entities exi= st. > > The question about bpf_set_dentry_xattr is thus valid. > > Anyway, I will leave it to Paul and Christian to decide between themselve= s where > it makes most sense for this one to live. Also, perhaps it makes sense to use set/get naming for this one too, to kee= p it consistent with other ones?