From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.43 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796447072; b=C5EAPgja3KpcF9FZvvKYbUUecXY6zuoH5VwMAEQAQvZWxSKNue9cGb/T6BbzUpzbcyh3 jaj/J0pcpzHC+Wiu1FK64RqgBY6/sMI5GjvQ4HcEAbmnOy0HbpnE2JIEV7zB8m9jwqI1Z SRt5LIdh0jF0/7ksA2nUJAKzLpbwtVMDC9l//40ghOa0eYp+35TQnlDrLJmazqclsRjDz ZoQOQWeHfNkSoZK1/nDwBfpl6Zci8h9sdCmof2YUOFOEBZ8zwoVBZ3cDLKLOWE6vlw5GM i8UR9rW6gnGg9Fys2zLBNQgpVbD4q5XVaBaYRHE+01eyS7+l32SKhC0lSWIsjt+NRBQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796447072; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Content-Type:Date:Message-Id:Subject:From:To:Cc:In-Reply-To: References:Content-Transfer-Encoding:MIME-Version; bh=g/3wtB7bDaZucSVcUt0LK+3APOVMWj4BLmD5bHlSZMo=; b=pDXXlMPjdVhY9wa9SH20O8+9Pg0zKfbSgCAmwv/xd1610tQ4v4WkqZTz5Yt3YBhOcLuL JOYMkbnz0O6bwbUu3AsjPY+rjnYnULqdDDnYKosuXf8snWqLYrjU2B4VUdigNaHHGhHTD fYpYZUH2oN2nj4s3PXW7GkmK7J8w8S1ZB3pkljI6CX2yFAeCFD81/M353yjX+ootXCF8R fhlbsqDKNFm9yCmnDY8vElgKk19ux7aZ1Ftn+V+xC1L6nE8mSgmxVQwalWnW7eRf/JRWE ZWAK8vG4Kq3Irt0Jv8nKufCxNTKkGNADk0fs9t0HvOuto6/wEgvSbsGU9fEOwONkp5w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=sjNcLBAI; arc=none smtp.remote-ip=209.85.216.43 Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) (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 9E272606A339 for ; Sat, 5 Dec 2026 05:04:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9E272606A339 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.a=rsa-sha256 header.s=20260707 header.b=sjNcLBAI Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-3b4cd193b50so935062a91.1 for ; Fri, 04 Dec 2026 21:04:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796447071; x=1797051871; darn=vger.kernel.org; h=mime-version:content-transfer-encoding:references:in-reply-to:cc:to :from:subject:message-id:date:content-type:from:to:cc:subject:date :message-id:reply-to:content-type; bh=g/3wtB7bDaZucSVcUt0LK+3APOVMWj4BLmD5bHlSZMo=; b=sjNcLBAIP8efwgRy6zuJqHai7R1QRc6K4nBr5di7AhZAUQar5AF2KJbu3MJtPwpHBL gP1JOLh3J0JUs9gehu/HZ4x/iL5ZHcO1JjA/T95UEu5H2jKxhdbdnJXoKH/SUCYNUKO/ t24vYdq2HtgwxU19mSb+ZPgExfYC9934j1fdGe4EiZQ6O9rttdHdOBykIsnuy0QbXQrI J4sVdEKOf5CaNV117f0glxXAKnZJGRdO5taWE1CS6tnuubzBXNBQvOfKO2/9u4r1AhD3 UanMidfwNvBnauN2N4ZRHO+iECWNHKAonRx4N+0ZX+gT/x/DV+tSOMbIG/9zVxZuPsi7 QItA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796447071; x=1797051871; h=mime-version:content-transfer-encoding:references:in-reply-to:cc:to :from:subject:message-id:date:content-type:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=g/3wtB7bDaZucSVcUt0LK+3APOVMWj4BLmD5bHlSZMo=; b=CA0joE8oFDhAf6jjaMCpSXrerS8emq76amgLDjZeHrcS/E73GKhzTnC89FknGpQZ5r jWVHcq6lkxREbm8t23nezg+hzEaUGBtST1In4E+XJtnqUfJDvbVp+UCZL7u1Ig4HJiac D3mN55N4yOHvw+JytiY14K147zmtFgErrYiKgrYko6RMEwOrzR5IDvlxnbqGy7bhTqJE JqlHv1yGlwVGLG2kKVBni1gzylpp9CqSgGadJOtvCV573VLWKfHASMtk4VF4THpKoG7T P/QQt6v81xtcEqm/Q8zth5DpsKloyjxQdslMSNv+Yei7vGHxnPhzssqHBgGpTjF6Jx3Q aNtw== X-Forwarded-Encrypted: i=1; AL+hErHUr2WTM2pFFmzuMvAecT+1gYgGN1NKpo272FZrFosMB4+mOBeu2DemNpET5XT5WEAT0YA=@vger.kernel.org X-Gm-Message-State: AB4q+uGijH+Qoao0m/pf4T7AmzZtn03L7W+IH8lP1+0+n3IH43mBYmJd XjStLOZRRL0HZ/Euyhe+x/qWpXRGmYiXQj7Y9gk1eHaoDK/RA4FLfiW4 X-Gm-Gg: AZFdTZea6MzRWjuUPhj5byKsJ1k6H0uv7zJh5H9aDrTVQ0w+Q06bAP9PqJfKgWmFqg3 jnohhCHW2hivz+9r/cMsyOTmZRgi1RZE5AoxDTU71oUSH/qgOagkmQTqgDaPXutCOk5MEQ5ZaQZ W7ArTuItlsxAQ4znfZZvtZug03DoLywpQVRdiHkTY/aQta5rSLC6cXcuAexfLeVxEBhJX0WBuLA 6Qtw+CKE3mnzJy6czGSSggayQKnTPczmdynYzXYGu/Lgruf52mlPtGM7OsLmyihnC6AMwINlGID 91vRGonElaEOnl2QXof0TU1Sh9hNrYtEnxKbQYtpL03/Ciqq55AhsUZ5tcNbPqQPhhIuYtILrVr BhqHGSQJTs2C91RK5s7IlqQCCc/pxywRT5Oo0jAaC54lP2AFiCbatVkZ/9XB/KVhLRuimjL8Slq W5ahTPjOx12y9ezPJQm9Fo0c5Fgq7KPOQepDMtFiMEHXAt/TjF2gw6AEy8pDsU62dmeSeL8dtEf KRIF5UwTE7y8AWo2DJHWrKKsx/oiyFn3jcuCER4RHF5K99azRbOGFfoN0t2XdTtcvnk/wV3eb7z NsnnRwosvf7fmM/EOVs41VYT095M4aT6GqHApzwuElfmkGHTagdIyYmIU2O93rDpR8xqCI7/+Xf UnAKdmzyfuvLuTvHeQjBhDPdWL0zkCR2/0g== X-Received: by 2002:a17:90b:2e52:b0:3b5:c654:bd84 with SMTP id 98e67ed59e1d1-3b5e06bb7c4mr3704019a91.60.1796447070693; Fri, 04 Dec 2026 21:04:30 -0800 (PST) Received: from localhost ([153.61.198.253]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b5c7d486efsm12547772a91.9.2026.12.04.21.04.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Dec 2026 21:04:30 -0800 (PST) Content-Type: text/plain; charset=UTF-8 Date: Sat, 05 Dec 2026 05:04:29 +0000 Message-Id: Subject: Re: [PATCH 0/6] xfs: BPF data placement policy for zoned file systems From: "Alexei Starovoitov" To: "Christoph Hellwig" Cc: "Naohiro Aota" , , , , , , , , , , , , "Hans Holmberg" , "Anuj Gupta" , "Kanchan Joshi" In-Reply-To: <20261201091528.GA27736@lst.de> References: <20261201043452.3866039-1-naohiro.aota@wdc.com> <20261201091528.GA27736@lst.de> Content-Transfer-Encoding: 8bit X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 On Tue, Dec 01, 2026 at 01:15 AM Christoph Hellwig wrote: > On Tue, Dec 01, 2026 at 04:56:50AM +0000, Alexei Starovoitov wrote: >> Sorry, but the whole thing is an overkill if 'hint' is the only goal. >> Here is a much simpler alternative: > > I have no idea how you think this helps? The problem that you're trying to solve is the case where app doesn't call fcntl(F_SET_RW_HINT). and it happens at open() time where bpf hook is there already. The only thing that is missing is lsm prog cannot write i_write_hint, and trivial kfunc solves that. >> SEC("lsm/file_open") > > Requiring LSM privileges for hints is not helpful. What are you talking about? In this series one needs CAP_BPF + CAP_PERFMON to load and then CAP_SYS_ADMIN to attach, while bpf lsm only needs CAP_BPF + CAP_PERFMON for both. >> .dir = dentry->d_parent->d_inode->i_ino, > > FYI, ->d_parent dereferences aren't stable. Yes, but bpf infra makes them safe to read as BPF_PROBE_MEM loads. Sure, it can race and read garbage, but this is a hint anyway. And 99.9% it will be accurate. > This assumes you want to set hints on specific and not relative > path, and encodes a really bad and mostly broken ABI in a userspace > ABI due to the shared maps. But even with that you can't easily > match for cgroup ID and other bits in here. And for anything we'd > want to deploy the concept of a shared map with an implicit ABI > is just a nightmare. map was just an example. It can be anything. There is bpf_get_current_cgroup_id() to tie it to a cgroup. security_file_open() runs in the context of the task, so uid, pid, comm are also available for bpf prog to use as a key. So is there anything more than the hint?