From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.45 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796447071; b=gq1/52kYysTvYecAi8SMQ7g3nF7aiCjlEIudi3BMzdTErOEQfFJ4lxt93gjRpK0HvNO7 P509C7v3XUi5b6eyUpagCn1ZZHp0VK9g4IuKx2NzvJLCNaiE00w9/pl+jaZv7Jum+7Peb V/PHu7PSq+wFspTHVeVkYEnNCP7LYqG7PiMiLHfpthW+1vhIM7WB6ZkYKioyRJEPFRR0f iR4B0L6cTln+z89Gr2AyzPm1GxojxaClUqDeIWa9gqTXiIMVM9grmkMHSZjHSSVC/09vK 2cRXw8h4E0e72nfktQ/IslApMNt5ZNKZTmS8TRqbgu59pqxOtF+J6Wc2AzMoQvDl73A== 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=ewWn7bW2EBFNwXHO87fYfvFic+U0yNqb3BoVYwbjfLEMdYeBozEH7wv9yxm77fvr/22j Q32FmIKughTxAXKrfV5zhYAyhkoHDBFmpim9UlfbBlx+67WVMdZ7KY+Z1DN3XoLo9IPWx ExEni7zXuoru/+/Vw8WNLcRb5PlQGa5gyancO2ahbW/m2ToQX0EhQ7fk0zB/thhvDT9zz 1lZiZ0xNj9FbOzTXY9p3Bzbhf7AmD2f8xps59A57cDy2eK+xhjux1dKu58ZWFU+qCR+jO n8intHx4d8mFuBCnDokKK2DcjGm7l1gQu6bokMDSHZ82ykpgzJRcLuyOXvsYMcxPxyg== 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.45 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) (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 91301606A337 for ; Sat, 5 Dec 2026 05:04:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 91301606A337 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-f45.google.com with SMTP id 98e67ed59e1d1-3b567ae3c66so840843a91.0 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=BXY2sEkxNgw2MwtBrKllP0GrsHQvTGwSsIVXZfN/3/f3t+eesutVZy1YMWJ1CL8rL5 3JrShIAXpX5lRwfksHMkAIy8JF+rFtaskSBnffLt6pbhxo+qBMftLnQY7E+3+k60M144 6FW2mdWQiZrjSq3OLC7FpWAZMQ80XenuwqHhWCGR3E0mCXbwgAmgaJ/4N25G0mCyR8OF bC+T36A2RUl4CwZnhTP/iP1okFIGo1fcJ1WNFLsGVR5HCXZPykmPRAkZ1BSwJRZrvlWW YIYcZc+PdEPD4rhSi9kMSauoOJyNUPXX7SyxsUhJqhddAlY2rlJeEfEgKAEYt9ZW30c2 wpSQ== X-Forwarded-Encrypted: i=1; AL+hErGaqR+WApXNMGhhWEwIT/dm0o3dQdnmDgvnyXkNLSS72cOTHeXAa442ZE97zaNOmINYKZLfY47y+IzNzqHf@vger.kernel.org X-Gm-Message-State: AB4q+uEqzM8iQHhXjKfMLmIoqJLkXSKiYlDi7hn/QKV1Z7kGS0EIMLf6 o3NSt04w+CMJjIXozOO0+nEnGLuSanshBMle59BfV8XrOD89SMU7asxT X-Gm-Gg: AZFdTZePSzAGHu81Li1Wl5wWFl9HBHQVo4aQcq8ZFqWQicwnMztfXn1mU25O3bQZgZC +xDH7HbQNOll3b3Tl9zV9SXXQJ6UOAVWWScfX4H1irEyqmkAsh2HpF4Dz5RBgcs9GlDanDlkhtV 262J785WVllMFCGZGXzimUHaUJ0Os+q5wDQIJa7ICTBdbIm3SPHzrL1dmN97YWfFsanpdZgTLc5 XSm0idmZb6LGvle1SNX+chXYi3fNzOJTYMW6+1fc1n/ISLoEgtCgJdjzu/WlVXvdQZcof32KOVB GBhVmNowPeYdG73n4SifgrTp7CCJojdOZJ65Sc8TZzvlbrIjKWquzF5xxraN6ZjrPKBUY3Z9pBQ omayxEu8nQtcxoxVmPQ1r4KVxKrCwsS+HYo4cYMIfrHKtOl+SPQUj/Z+dkEpaNDE+CbqFKZx0dY OnhbjR7r79XYzm0VDpguYWTeiLOyGsKZdQuX4n6bDWXbilthLCcGv66+ysCzq4DokDcjCL56Fle rF1wrwMxvpl/Le9RmUDTa/BZY2+VanWGkHdsVl8fdrr6jSwEpgsxglYp5UswLkodTk0QDdeFejW acSK3SKviKDpKfosU7MaS2ddCMDvSrCuVYUNvfAIpu6FJ2gqm04LKZTDp1me+FdqZWQ2DYNHvaf FVUmIg7GkuBcDqTz8diZ0Vt0bg8ybzpdbIg== 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-fsdevel@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?