From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr2-f1.google.com (mail-wr2-f1.google.com [74.125.225.65]) (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 B4DBD468C26 for ; Fri, 31 Jul 2026 23:34:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785540866; cv=none; b=Oz1DByHtyDQfJSVD3cqESuPtS4muRMZeUnEgp4k3wtQSeQXR44icl891cMo9Sxs6bL7dla8cD5ameg6buetSPck8mPNWIpVW0n80gr5B0rRVpptf/g9WkEaHpucgnxSP8vqta7nzyewyoG/3Cq9zljaDRiGfsBgk/5Voi9IGHtY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785540866; c=relaxed/simple; bh=fG4lpzFhUhSHtM3MOTFT/bKd1/wg+jyQpf2vtD+aZVg=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:From:To:Cc: References:In-Reply-To; b=YaHHrrI1RHyzHe8/vV7mPobozzPJJMHXb6RZcQU0VLmd5md0epA8pkobdIbZiLkQ+x9seNe0YBlx0HbWh+gIc73MXGbp9cr6dFPLGYEAjhi15F5l/6NsNw57wW9me52FAFeoeUa2LeFbp6cALrmQ5VB5AdmA9Nybh+F2D9XscEg= 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=ZMJt/8df; arc=none smtp.client-ip=74.125.225.65 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="ZMJt/8df" Received: by mail-wr2-f1.google.com with SMTP id ffacd0b85a97d-47f9c6bc99eso461816f8f.0 for ; Fri, 31 Jul 2026 16:34:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785540863; x=1786145663; darn=vger.kernel.org; h=in-reply-to:references:cc:to:from:subject:message-id:date :content-type:content-transfer-encoding:mime-version:from:to:cc :subject:date:message-id:reply-to:content-type; bh=njEvB3ltRqMoxiCGEyBQLfrAODVw3BfigWN/Yf5Q8dw=; b=ZMJt/8df7hEntOCFa8HW69DC123PnyI1x1XgRZ/SxNIfSq1EuqEE4MUEMttlQSoC01 Jt8pfCWuXO9IEmz744KCrinHOSNi3ky9B2v7YebbVIrXbkiCREty3AVW6LC68MBDGUwE dxUtrFehkcVS0SqHeO1lY+UCKyYeK66jb3O+3wZE+LingdgavMeoqaD3Surer8fVmdY+ Tr+d3QiXN2LXF9vZ9FXek/V0q1ALIDkfo2r8p+N1wuhlZlzzKpkSn0mo45joBJ2dmAPF 74qqsh/J7ItPV1IIXe+ftUJLIT7frOgl4i7V+VWPLo2X4BVZZGTdyoAXGG7PD97ahaOh QVfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785540863; x=1786145663; h=in-reply-to:references:cc:to:from:subject: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=njEvB3ltRqMoxiCGEyBQLfrAODVw3BfigWN/Yf5Q8dw=; b=LECdz2Ic5d/LEm61Q+BuObC/lVW+/VRv0XdnqqozDJ2luoO0vXdL5TGN/tmYUgoX7c 1/8ZOtLu6gEkuLBHmC5VurQCUt3dBtYy/pqgH7Yu0bDPa7oUVL3wS502pq+MBuTXTLQt HzzIsaQBsuBGajtY2V5JJ+ao79EUKEEsUR6L1TNXxE5bvgia6iFrlNwX5jYMj5JqSRkt CaRgpI/f8PnQc+FnahN5tt0J4HW24He6a6YnoarUWMxT8hq/IRRrpQWTY57MzqvsY/yq 4ipL1hT+teadanbVqWttAKAiU9tmo0lKr2WdGwBgy2IMYhETXuh50gVeC5eTp6yO6Opr P/mQ== X-Forwarded-Encrypted: i=1; AHgh+RrAEn042SYimhH+M2HfCnflHnAtwB/gNCBATD/RlLIpV5ZNbH5PWEMkzGHTnhxGsJef7kb6iPkOkJnyvotZ@vger.kernel.org X-Gm-Message-State: AOJu0Yx+g+a+qIoh10RcEMiYzbSieGNJfqWj+CfEWh/8G6CfWhoxmWqN cwHAa345lVKlygnrtATMoPTqkgaFBa0WrOVJG26SYARZcwYPyZKw+DgI X-Gm-Gg: AR+sD10mRUCanDQipOAJC2ZuEw3Qd9DIuUTPfBnyolHVXqYKxqIl2PsJ5cvp3EUV4uz f4PG46d8uIUqwneZO5xth7ACtd1eCWdnXVnRBpkw9MqmWxrtJ8nTR7wAQ/dQr9l19oOLRtkflKQ 4cr9L77RRByy/i/ttyStbaXzMoCOjLfJxb3hFamolaF1YjtWr9fxkW1gSZNYX4LsS2T1DPCFplV e8CGPKclqNEwqLc9JycGw3oTCzWXBPHm+OmYPs3szqVp12TD8DU2wJ2TPEy18+ifXd/dR846nH0 5xn7MYyvgQ6k8urFoUYtOZSkuwID340V+QC/6S/rOpLLO7L9x4E3mI0osJ6zpvJtxcBHBSMEwaV SipXjFm8+wYO2QgNOi1QpGo1R0qhxW+pY9jWxSoZJvcxJ87sB9mmh6fvORmuzgH6EOva+WtwegY vfXHjUvdsXAFZbMPeN1COW9gxZrQc9DAq9Yyu/LapJ59dDfnofXuVlznudF9zjOoDJhVZm/vKGO 7rJ+4vAlyD5nagjGd1eh8UrmUqmmohHzHNKvZO4RJSeGErLqM6vU2U7RCTa8LR4OiRCYii5yccv vvt5gVBGwZy2Qb8oKxA44CJdFGE= X-Received: by 2002:a05:6000:44cc:b0:47f:6f92:84aa with SMTP id ffacd0b85a97d-47fd7312eedmr2037414f8f.53.1785540862997; Fri, 31 Jul 2026 16:34:22 -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-47fd456262bsm10337130f8f.17.2026.07.31.16.34.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2026 16:34:22 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-fsdevel@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: Sat, 01 Aug 2026 01:34:22 +0200 Message-Id: Subject: Re: [PATCH v6 bpf-next 3/4] bpf: add bpf_init_inode_xattr kfunc for atomic inode labeling From: "Kumar Kartikeya Dwivedi" To: "David Windsor" , "Paul Moore" Cc: "Alexei Starovoitov" , "Daniel Borkmann" , "Andrii Nakryiko" , "Martin KaFai Lau" , "Eduard Zingerman" , "Song Liu" , "Yonghong Song" , "John Fastabend" , "KP Singh" , "Jiri Olsa" , "Emil Tsalapatis" , "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" , , , , , , , X-Mailer: aerc 0.21.0 References: <20260730234533.1912709-1-dwindsor@gmail.com> <20260730234533.1912709-4-dwindsor@gmail.com> In-Reply-To: On Sat Aug 1, 2026 at 1:11 AM CEST, David Windsor wrote: > On Fri, Jul 31, 2026 at 6:23=E2=80=AFPM Paul Moore = wrote: >> >> On Fri, Jul 31, 2026 at 6:04=E2=80=AFPM Kumar Kartikeya Dwivedi >> wrote: >> > On Fri Jul 31, 2026 at 11:49 PM CEST, Paul Moore wrote: >> > > On Fri, Jul 31, 2026 at 5:29=E2=80=AFPM Kumar Kartikeya Dwivedi >> > > wrote: >> > >> On Fri Jul 31, 2026 at 10:48 PM CEST, Paul Moore wrote: >> > >> > On Fri, Jul 31, 2026 at 4:16=E2=80=AFPM Kumar Kartikeya Dwivedi >> > >> > wrote: >> > >> >> On Fri Jul 31, 2026 at 10:01 PM CEST, Paul Moore wrote: >> > >> >> > On Fri, Jul 31, 2026 at 3:20=E2=80=AFPM Kumar Kartikeya Dwived= i >> > >> >> > wrote: >> > >> >> >> On Fri Jul 31, 2026 at 9:05 PM CEST, Paul Moore wrote: >> > >> >> >> > On Fri, Jul 31, 2026 at 2:50=E2=80=AFPM Kumar Kartikeya Dwi= vedi >> > >> >> >> > wrote: >> > >> >> >> >> On Fri Jul 31, 2026 at 8:42 PM CEST, Paul Moore wrote: >> > >> >> >> >> > On Fri, Jul 31, 2026 at 2:18=E2=80=AFPM Kumar Kartikeya = Dwivedi >> > >> >> >> >> > wrote: >> > >> >> >> >> >> On Fri Jul 31, 2026 at 6:59 PM CEST, Paul Moore wrote: >> > >> >> >> >> >> > On Fri, Jul 31, 2026 at 12:32=E2=80=AFPM Kumar Kartik= eya Dwivedi >> > >> >> >> >> >> > wrote: >> > >> >> >> >> >> >> On Fri Jul 31, 2026 at 6:02 PM CEST, Paul Moore wrot= e: >> > >> >> >> >> >> >> > On Fri, Jul 31, 2026 at 11:44=E2=80=AFAM Kumar Kar= tikeya Dwivedi >> > >> >> >> >> >> >> > wrote: >> > >> >> >> >> >> >> >> On Fri Jul 31, 2026 at 5:30 PM CEST, David Windso= r wrote: >> > >> >> >> >> >> >> >> > On Fri, Jul 31, 2026 at 11:17=E2=80=AFAM Paul M= oore wrote: >> >> ... >> >> > As a consequence, everyone suffers because they first need to satisfy = your whims >> > on how all code and kfuncs written thus far are wrong, and need to be = moved >> > around ASAP, including the one being proposed. >> >> That's not a reasonble or truthful summary of things, I've only >> requested that David locate his proposed kfunc in >> security/bpf_lsm_kfuncs.c, I never suggested he move any others. >> > > Looking at what's left of the kfunc itself, it's basically nothing. > Everything meaningful has been moved into security/ already. > > Aside from bpf dynptr ops, what's left is: > > if (!name__str) > return -EINVAL; > You can actually lose this one, the verifier should prevent passing NULL fo= r name__str. Other functions don't check it either. Feel free to check it, or= add a negative test in case you're worried about it. > if (strncmp(name__str, XATTR_BPF_LSM_SUFFIX, sizeof(XATTR_BPF_LSM_SUFFIX)= - 1)) > return -EPERM; > > if (!xattrs->xattrs) > return -EOPNOTSUPP; > > ... then a call to security_lsmxattr_add. Why not move this chunk into > security_lsmxattr_add, and leave the remaining bits, which are pure > bpf, in fs/ for now, and litigate the total placement of all of them > once v7 lands? > I wouldn't bother, everything LSM specific is already where it belongs. Th= at said, your question is a good demonstration of the absurdity of the ask her= e. >> -- >> paul-moore.com