From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.178 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796447071; b=lIE8aZ91w4HpESObyWaz/zOc0Kugo3nNvJkzDOR8JCvpAwA3fagokqMMpTuRHajNqOs3 XEBmb3iD/QjvQjwuPfOj9gPaD67MxOkyJZKUBIBTnob13oXA5rAcdsDpUJEFNfvIIPEzN Ap3TEpslopBZVawHMeQYaMSo4yuHdJDnNLhh+VKXqC5ZsJvIwWykarjfi0nCY579DA3fV UE5MThkMmGVmSHL+TLxG8ejhv+TKG4crb/j8tgX8Gd7gDxwLI7u6RhAU/6Vn6m6e+hTsp dm6jxl6fHIQNtM74odI83ykV1w+n3MCvQ+r96G7VyFDWnNjGn7J5gh44iGj9tX5o3eA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796447071; 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=vfxuTIsOWnKQgwrz0NpXIVMQxFM/GYSGOHEy75vPMS6akfyDqVi44Dn/L20XrBS0RSuL ulrxfvhl0tA6eZlP2CkpAbLfDXLFhuAdvVnhIy0a2kL0LW2j2/giymMAfxia84aEy0nvf WGa9cW38zTS5qFobYtHPO57OFaH4sbQsNEj9n3sJoWbX2+umL47h8l9yu47DrL8AMwLOS XTy1ra7rZ6oZfuWxF30EynbgeJx1+XyVeIt59GzFbkOzafRQifseEoHBN1sm9m7paZJGt 2FiqK9z38IsB9HPDoxDv1GUEon/BisNOkvmaxDxF6Tq9rDGPMQWdty/lNDjTI0KnBlw== 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.215.178 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) (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 8DAE5606A336 for ; Sat, 5 Dec 2026 05:04:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8DAE5606A336 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-pg1-f178.google.com with SMTP id 41be03b00d2f7-cdadf7e248aso838252a12.3 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=aOvkLGeTvG5fWP+Kqfw3/fmEW2NvvavkVvLS0dLgFlfS8At8B9ZjHaXTpOXcvbNskP Wj7bBwHg67ZSJMP+sEMm3zsJA+qtu0rzS+bBMe/0WaFGB4jfC249KZqnYoXCjJ1HwJUo XGCoemNVFxRrs2Hdk5mRFN+MsvhyJfqN6fJTr19jcWh2O4M4kdEN5XjNdMLvyL8Ujl7N 6683kCPTmg11RHA7U/2dXBHD2rEjwfMY3E6pTaJFZZ8rgIWjbzynbrCDClWW5gdWvzy4 e7Pwvy1nMG+ZfDhXrqaBH2+zTi/eeTQ7bDvR4GqnuAS48o+Sqnpvtez22qXyLTCPw3a5 b5bg== X-Forwarded-Encrypted: i=1; AL+hErG6AuDLb0mxYM6ZaoN7yy7fyTM+ztNGkc145p9ctzIcBGytWp4AiZlMvO/sPDskDNknE8L646vDgpbC0w8=@vger.kernel.org X-Gm-Message-State: AB4q+uFLzfFcQPnD2ii8+pmRLtcmF6AA9CjyFL/hdtCPHl9tsCLSi0XX QVxHCPL8dt/9MZy3Yiv+87IADl2q2eT+aQC30k+J7OLCCrXNYnu3GSpD X-Gm-Gg: AZFdTZcfMONDupyws6sPwzDSlecDUFtkFdQzFaWEMHi25h9zmVu08WS8Uoyda2QJJZ+ ExfwmM2CWDYVnmAntyl+SyOjvltSjnIXv7AWIYohaZqFUUEj1ZGilHbC5zK/IVRhhxXOEl5hnRA uLcrJbO2g01+4peiMYpsO5+1xdlZ6jK2jsBnDmiU9jmmx3x30tftvy2ZRqBqDFIMYWqsUYabWh3 nFBFmR8GJj21GScQIHAEo1PkXMXkSijPPZKfe1xTDGjnCw79B65b56eg1wmbDfxRzKiOyF9SK1k CVyqc3mHFLuYVPbCHdMF/fLoGOzD87W5oy2qszTx9MCqGHZFATmX0QhRMwLH2E/IbDpp8wU+Nc1 EkazJuBK6MevTz/b7niMy1WfG5/mAotpGtf8Cw8qXrz9YLcCzmcB6JOc7ZTHrd8hJBwvJgVuT8/ eEjy73W3EOodDKzLI+/S8g4R7QBOhKVarLBJoBb2AKfYZ+gDBcFHNJ8JF5yQRTmkzN2GvbRFIFv qLSJxD4naZv+0rsRnyzw+OYasMAKxhaqTaaTrANvBwVkfe+ZgmB28VdOb2hYHuHmh9UiFaHOiv/ 4B8zX6jmKwm+tJaS1yl7LKreG57Mgl38xaS9tEMD0NQaUGvnbdzEbJS5gtU/ZY3Hln++UjCEGZm l92uH8LdSPXJ7gpScU5abnrVbZzlJq1C9nQ== 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: linux-kernel@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?