From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm2-f7.google.com (mail-wm2-f7.google.com [74.125.225.135]) (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 64F883C2BB4 for ; Fri, 31 Jul 2026 23:14:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.135 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785539657; cv=none; b=rUA/EMEndqWA6cJNw2nljCY09mHzY6RTiD+K+z6D4CP5HG/fd4j62feEpAkpNWsUHPGEqv5PZk/3gdH+KFqdNXEEMTLkZ06R1e8ho2bB8DClpEArnOg7we9vuF/Yo1KelnFV8yuLiASGGKNaXhK/kSLy0w0g5F56wgBq5dFwGsE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785539657; c=relaxed/simple; bh=+S0UPkmId1TSZGn0c6a353pKJFNhAIT5tZF6ghKKlHI=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=kbUQnjXnr2KJP+yF8mmvBRTLw53HinaM3jUSgUsGpHqVGEcicLhhK8ytg5k68asF83IFqVmgv9rRSC14qWZq+UkSz4q59HJuBLZFVaccT4uwjQjMald1pw3JG9iTRD/cFIrDEzXfh1LLo6kEOtV1qXw0hS94++0NcB0RM+k4zws= 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=G4/QSP+j; arc=none smtp.client-ip=74.125.225.135 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="G4/QSP+j" Received: by mail-wm2-f7.google.com with SMTP id 5b1f17b1804b1-498079e98beso78025e9.1 for ; Fri, 31 Jul 2026 16:14:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785539654; x=1786144454; 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=+S0UPkmId1TSZGn0c6a353pKJFNhAIT5tZF6ghKKlHI=; b=G4/QSP+j7FfEMdPtuV+R+H08ZbGG2ieGR4LiA0ajPuzDG/88EpBTWuSV5NIptCXm8d t8NWyw2o8vK6Ob58RuiKrOemUkDE5uGCYUacLFII5MU6MNkzOhUawT0+tMbdEjB3EYLL knc5hCSFQeYyXFqYtYmSDx5cjkkAmJwROUTdEi9kZWXdyzvU4DqLWuYgjS9bN8+f+v4l PRWMnuAWsfmgO1lTM5f0lqkFh859bai7amlxSMbz/432AUOkDPM0T9AWH0mG9foVVYu6 lYHLrvfRY4PBH3E8ejTyAy2ONp21w2dPY2VPx40wgt+ccJ4ZlY4Rp/cra6Xz88c9+hkH PYWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785539654; x=1786144454; 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=+S0UPkmId1TSZGn0c6a353pKJFNhAIT5tZF6ghKKlHI=; b=UqeK0P7AqwMjXs6mYsbRfmGBCBfpnWdmdLnbKBl6E9Xs3sK8sbanlK4Ls5qTRJhonL rtJ5i6fFxPXn85tZ+zeUCiHVYA/YdCcmJQB5Baywgb9E3WHG9U5q0qSJwQ3g4gzte0k4 6ThEPrLeG8roRMwUECoCW2fT9vRoCtQJeG1hslFcojcls6zZsIJJPOt+mQkXeR97DYRN nhM5vs+BNWT6xFnBYIcq0JQgOB183qDboxRnAFqexYAO3DKnIKZ+y9d5OyQ7gv9X4zaz zvh9hj/FL5tnjL16PhN372lIkuleFfXEinMI/PMwestyvppZKCiGBJoO5l2oMcmDjgg2 o7gg== X-Forwarded-Encrypted: i=1; AHgh+RoRrUf3i26oU34HF5JH4zrycx010zXZnY0uIRPkhoKS9g4Mxl0h3D9K6tJA1iw3oH8ya07BG2UFukagKKMr5fOth98/HIg=@vger.kernel.org X-Gm-Message-State: AOJu0Yztu5DbgAkUcTMMNZulhNJ0uE4JFVa9/MBweB3J8eEO+qZW9TBq DtvpBd7goJ1wmHfiacjIYZBagSWXH1Hj4vbdXEs863YEiIVkwZyG6zqE X-Gm-Gg: AR+sD10wLoHLwAwIscFQcN6LxprayQeZTmA7OHzPQUgL5ofglebd6+Wv/MohQayj+Jf 6mAFaczKJ9nweNckKetI0jSyWf7pgxefARHYinIUdNvGH9jAvDhbpaeR/Py/imMThJd/xpdqjUv 84CvGm2VKVt39A5V94NTE8WFqRDfOoNep9l0VOS3auxfypEG2JMs5wUrAg211sz1VhGOfk6x37V IcNHq79fi4B1L86eUzyn6v+TMi+QK0tkqLWEoMmweMe8SThyxJ+On/eNmXxQhfEFBliLRL2vWUM NovdSxBxMykKNd2oHiWwqRLJMJ8jB17yvC9sGlOMUeNK2ZKIZ6RnSBp8v/wXcHzT0+TybpoyjJt eLbzF6qTicdLfcF5wgzc+OM1cvRvs7WuTAR7qEQW3rD4qUZftqvkVyl1DXKsKaAmFsl1o1Nqsph C5k1fOxbJbQQgu2xUO/w4GZkO4XyS5hrBjSdWgPqHcAQl49deqI2f9q12WSbWvctvukqBdH8PrB OtC7x/tOYsbwKBvLPGb5gh8xNhJT21PS0kKQKe+HjDRzM+Ug5s4ldEPlaPquwNzadp1z9lvylCq +z0YDVOe3vnJ/Ie+OXm/5hw1E0g= X-Received: by 2002:a05:600c:5248:b0:495:518a:d95a with SMTP id 5b1f17b1804b1-4980c6a71f7mr1306545e9.29.1785539653622; Fri, 31 Jul 2026 16:14:13 -0700 (PDT) Received: from localhost (nat-icclus-192-26-29-3.epfl.ch. [192.26.29.3]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49807ba13e9sm4158835e9.13.2026.07.31.16.14.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2026 16:14:13 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-security-module@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:14:12 +0200 Message-Id: Cc: "David Windsor" , "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" , "Stephen Smalley" , "Ondrej Mosnacek" , "Mimi Zohar" , "Roberto Sassu" , "Dmitry Kasatkin" , "Eric Snowberg" , "Alexander Viro" , "Christian Brauner" , "Jan Kara" , "Shuah Khan" , , , , , , , Subject: Re: [PATCH v6 bpf-next 3/4] bpf: add bpf_init_inode_xattr kfunc for atomic inode labeling From: "Kumar Kartikeya Dwivedi" To: "Casey Schaufler" , "Paul Moore" X-Mailer: aerc 0.21.0 References: <20260730234533.1912709-1-dwindsor@gmail.com> <45d2738f-de04-43cb-b37f-4370e6232678@schaufler-ca.com> <53a2d62c-fad0-438d-91de-a17b5921d61e@schaufler-ca.com> In-Reply-To: <53a2d62c-fad0-438d-91de-a17b5921d61e@schaufler-ca.com> On Sat Aug 1, 2026 at 1:01 AM CEST, Casey Schaufler wrote: > On 7/31/2026 3:45 PM, Kumar Kartikeya Dwivedi wrote: >> On Sat Aug 1, 2026 at 12:27 AM CEST, Casey Schaufler wrote: >>> On 7/31/2026 3:04 PM, 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 Dwivedi >>>>>>>>> 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 Dwivedi >>>>>>>>>>> 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 Dwive= di >>>>>>>>>>>>> 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 Kartikeya Dw= ivedi >>>>>>>>>>>>>>> wrote: >>>>>>>>>>>>>>>> On Fri Jul 31, 2026 at 6:02 PM CEST, Paul Moore wrote: >>>>>>>>>>>>>>>>> On Fri, Jul 31, 2026 at 11:44=E2=80=AFAM Kumar Kartikeya = Dwivedi >>>>>>>>>>>>>>>>> wrote: >>>>>>>>>>>>>>>>>> On Fri Jul 31, 2026 at 5:30 PM CEST, David Windsor wrote= : >>>>>>>>>>>>>>>>>>> On Fri, Jul 31, 2026 at 11:17=E2=80=AFAM Paul Moore wrote: >>>>> ... >>>>> >>>>>> I think you keep forgetting that you cannot unilaterally decide this= . Both VFS >>>>>> and BPF people have told you that it does not make sense. What was c= learly LSM >>>>>> specific code has been moved under security/ already. >>>>> I'm charged with doing the Right Thing for the LSM framework, and in >>>>> my opinion it is in the best interest of the LSM framework that the >>>>> kfunc being proposed lives in security/bpf_lsm_kfuncs.c, just as the >>>>> VFS kfuncs live in fs/bpf_fs_kfuncs.c. >>>>> >>>> I think the "Right Thing" would be caring about your users and the pro= ject >>>> moving forward, who want this functionality, and figuring out the best= way to >>>> make it happen while working collaboratively with others. Life is full= of >>>> tradeoffs. >>> It certainly is. Paul has taken a stance that supports the ongoing main= tenance >>> of the LSM subsystem. It does not have a stable API in support of the r= apid >>> development of Linux kernel features *outside of* the LSM infrastructur= e. That is, >>> people like you. If LSM hook implementations were spread throughout the= kernel >>> code it would be much more difficult for poor hobbyist LSM developers l= ike me >>> to track them down when making changes. Changes like the ones you requi= re. >> I would recommend reading the patches before commenting. All LSM code is= under >> security/ (patch 2), as it should be. > > Pa-lease. I have in fact read the patch. I disagree with you assessment. > >>> This is about being able to continue supporting the latest and greatest= additions >>> to the system. Like yours, io_uring and the network protocol d'jour. >>> >> I don't know what you're on about. >> >>> Please don't lecture us on collaboration and trade-offs. We live and br= eath that. >>> >> Paul is free to take a stance for LSM code, just like the BPF maintainer= s get to >> decide on where BPF related code should live. I'm sure you know that. >> >> Thus, please avoid justifying his overreach on where others maintainers = should >> keep their code. > > I have been developing kernel code since the 1970's (UNIX and Linux) and = have > a fair bit of understanding about source code organization. Without ratio= nal > layering and co-location chaos ensues. The BPF developers are newbies rel= ative > to the security maintainers, and would do well to pay some attention to t= he > wisdom of the aged. I am certainly more inexperienced than you, granted. But I don't think we resolve issues by older people forcing their opinions on younger people. We do that by providing sensibile rationale behind technical choices. I am constantly doing that and receiving unsubstantiated wisdom in response. Common sense suggests related code (all xattr kfuncs) should stay together = in one file. If they need moving, they should move together. There is disagreement on where this file should be located between Paul and= the BPF maintainers (even VFS maintainters), therefore Paul does not get to mak= e a mess of our code. Having one kfunc stay in one file (Paul's suggestion) while others are in another file is the worst option. There is no layering violation, all LSM logic resides in the LSM subsystem,= with clean APIs exported for use elsewhere. I am sure you don't consider BPF dyn= ptr as LSM logic. The hodge podge state you're arguing against is what Paul is suggesting. Thanks