From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.46 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796447072; b=pHGYb+gs91t54Z1jD3ohepmftXtNMQhKVuJbbtL6GCV+oD8gmTyFj+Ms8XYAQJKRQsuk M6ournyd+//tqUlEBi/U7s8SWd0mTIJ26lWKPzQAXnCAtuF2sj0Crjha3gV+8O/QWKa7m O3odpcp49R90Aaim0ZriwsI2babFn+5HX2JAA/DLOLRCEpNPmz0BMwIn8NSL+w0lxKsZ/ luY6i0pIvKgbUF9nCQKvAl/d37tobl5hxkQX20i7iXojsIyWxYswDmFpWZZfBNJiNgWu7 dLL90IVcPWlj3sQnZW0mR3jmQMxOWdKCakaatnRxHXrKoFVtnZ39D/yD2M2VDYTZI5A== 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=tmtmkZZkN4vfRubba1rTTACpG3ZNYcjpgtwVMcCTuLaYornSNI0rcdqVKxbGJIuYl3K8 uN4pgOsNLsWNHWkFs40L9ndgG5+NfTjpeOWMvsmSR5mAALamO1hHtNNFgjkutiIZC0nLb sK2GxbRgxOWGDAD6OwNV+tTwVNM7qyxmv7mmH7OZTQrQq/io+6Tn/XOym3OoRpJ3XTKBX iAzEv6Lr3+dUwwd2WkwiLknAlONiWHqg8xG6Js62qK7xLqzL9oWsVzrmBCrDgp0/l6hC8 wHd5kCaFuSV5FIue5zr00yO19MY0NcaHG3rGrab0z72IoYKqZPWmPY4jaJ/qda2kRGw== 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.46 Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) (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 9EA2D606A33A for ; Sat, 5 Dec 2026 05:04:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9EA2D606A33A 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-f46.google.com with SMTP id 98e67ed59e1d1-3b43d30822fso1078078a91.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=ZO8FlGBCLN15Ak3b3r2br28d8TFoL5wbQuf7RrF+ls63J712EjgBkTTq4jPCgiCfzQ 8VYGLojGprEpekedy2a3cMpLtOr2ZmwM/GwH0gPw2ncM19shjZxs8Zo96JEUIfAub65P T/epoYoPqGSyX2FMTsbnrasHrIk19lcyi+r4RhVzJpVntl256eG273nEwX+T7xdfmNJx 3CPpHzYmPQQbnVRNAQSoXmz0WcmgeVlIEQt0qi830QmiE0rSnq/YP6nFey/E0AD1OjIH hVb0VxY8+pwoTGfD5U+BLsBozGhigg7jaa6VgzzmK4gVaoyxDUuLq77fbTKMrU5h4yBc i/8w== X-Forwarded-Encrypted: i=1; AL+hErGm79Pi+nUd/tS5afKN9qb6+X6Gp4LumB/fFOK7lPEuf8Rs+22lzBVke+rY1y8YgLwVfY6ydCRxqOM=@vger.kernel.org X-Gm-Message-State: AB4q+uHUpcvafb0lIB/z4zWZb/Ijw/AzEpG7+63HD6gbiXExmuqyVfSl aMQuhswL/YjPv8Mw5JMBja7lqwrXRinX3P24G+Hn2iX+wRJTmhRTiJjvW8Ga/w== X-Gm-Gg: AZFdTZfxD76EAdlwSXTDRdrrrrwH4C77k7yqNfBE+GHhDoxDZDER5ooi9LhuNOlc7OC nQFLg3uubwSyy81VmIUpZ6KdV9hRSUuntRp0SSvNUcFmPaCeYSQfJczrt4U+Lgl8okf2SctmIC5 0pRhMdPDztPVEmAMtAMXwcVsI7VZgFUJpsqUtIGSyL/e/kyxGi1DBYyJV2wSEzEKDLGMofz6P2S HEOlzNt0Oc7mdoXwX/g2T9+7VFn1maCHLUPKxy54jg9wk9q01rW+UPRqVR25wXrTMjG5VyGxcSn /4jKBaWEf7oWIDGL4kZdkjnOh4xhy8qzyBxCjklTtzV0liY9BTms0yaOpDO+GyCmDz92jBckqSs 4jOaWSkwVb7C9vFTGZiD9YJVzxbG0GHTR6w5YT7bst/elYj42YI3iBa5G2OVAzrlrlJIM1Zz0Dw 4EkkI5G4g7A7unoOPpzaQ4r74OBn58gsZqonR6v62B2ny7d06DTpKmni9HGiZdKt1UqQKFaijdz Bv2uGVDaHogMLNsAHAnWFa5kJZAEonnbKHWEdXV6P5HM8sWF4XEh+dO3imwRfYyOwha3xBEvNF3 rfqaAfo430e8q0dleIEO074uzC1zCAcJAweHv7ZXg2V73jIFWz8yZMr79qRuPBn2kRYZl9bjzh4 z6Db19IcWag9HePr92iuut5XmlkcOKAekoQ== 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-xfs@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?