From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sea.source.kernel.org ([172.234.252.31]) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1vxSTr-0008Br-AG for apparmor@lists.ubuntu.com; Tue, 03 Mar 2026 16:20:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772554348; bh=DHwb1w4rbyjffvv/2dbDWAHJ7e/mef+KxqtMj51rARA=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=DAmilg92EMM5p+oBAiJod0pyfJNnnEgeo/FHI7Mt2tLqRb5btdUmLaBqveM9jVjLi Rs1bZ9VXqnLLBPtsKjZiGU65p9YwK2O90hnrBBB5IbBGxbV5fsqsFCL5BPjNoFktRM 9pbG4QDyP022c1s8Z36onUYV0x0hfc5XlTzhqulI2XOKQGvhykIef5J78h7gEF8HAr vrL1Kdx04gNh7dqXDuFHHcf6i6Nln3Le9QC/xXvIfu2MMc08R/9VQf0UWHcDryW4zP wt4aUnI0TUpn7Jgy6RntsLOuNDb3tu0L/3jw/oOf46o04Iv9Xc1ksw8iqkEfgP4p7Y l/HlE10Zw24ow== Message-ID: From: Jeff Layton Date: Tue, 03 Mar 2026 11:12:12 -0500 In-Reply-To: References: <20260302-iino-u64-v2-0-e5388800dae0@kernel.org> <20260302-iino-u64-v2-3-e5388800dae0@kernel.org> <7a0165fe39e82a1effd8cce5c2c4e82d6a42cb3a.camel@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [apparmor] [PATCH v2 003/110] audit: widen ino fields to u64 List-Id: AppArmor discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Moore Cc: Alexander Viro , Christian Brauner , Jan Kara , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Dan Williams , Matthew Wilcox , Eric Biggers , "Theodore Y. Ts'o" , Muchun Song , Oscar Salvador , David Hildenbrand , David Howells , Paulo Alcantara , Andreas Dilger , Jan Kara , Jaegeuk Kim , Chao Yu , Trond Myklebust , Anna Schumaker , Chuck Lever , NeilBrown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Steve French , Ronnie Sahlberg , Shyam Prasad N , Bharath SM , Alexander Aring , Ryusuke Konishi , Viacheslav Dubeyko , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , David Sterba , Marc Dionne , Ian Kent , Luis de Bethencourt , Salah Triki , "Tigran A. Aivazian" , Ilya Dryomov , Alex Markuze , Jan Harkes , coda@cs.cmu.edu, Nicolas Pitre , Tyler Hicks , Amir Goldstein , Christoph Hellwig , John Paul Adrian Glaubitz , Yangtao Li , Mikulas Patocka , David Woodhouse , Richard Weinberger , Dave Kleikamp , Konstantin Komarov , Mark Fasheh , Joel Becker , Joseph Qi , Mike Marshall , Martin Brandenburg , Miklos Szeredi , Anders Larsen , Zhihao Cheng , Damien Le Moal , Naohiro Aota , Johannes Thumshirn , John Johansen , James Morris , "Serge E. Hallyn" , Mimi Zohar , Roberto Sassu , Dmitry Kasatkin , Eric Snowberg , Fan Wu , Stephen Smalley , Ondrej Mosnacek , Casey Schaufler , Alex Deucher , Christian =?ISO-8859-1?Q?K=F6nig?= , David Airlie , Simona Vetter , Sumit Semwal , Eric Dumazet , Kuniyuki Iwashima , Paolo Abeni , Willem de Bruijn , "David S. Miller" , Jakub Kicinski , Simon Horman , Oleg Nesterov , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , James Clark , "Darrick J. Wong" , Martin Schiller , Eric Paris , Joerg Reuter , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Oliver Hartkopp , Marc Kleine-Budde , David Ahern , Neal Cardwell , Steffen Klassert , Herbert Xu , Remi Denis-Courmont , Marcelo Ricardo Leitner , Xin Long , Magnus Karlsson , Maciej Fijalkowski , Stanislav Fomichev , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, nvdimm@lists.linux.dev, fsverity@lists.linux.dev, linux-mm@kvack.org, netfs@lists.linux.dev, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-nilfs@vger.kernel.org, v9fs@lists.linux.dev, linux-afs@lists.infradead.org, autofs@vger.kernel.org, ceph-devel@vger.kernel.org, codalist@coda.cs.cmu.edu, ecryptfs@vger.kernel.org, linux-mtd@lists.infradead.org, jfs-discussion@lists.sourceforge.net, ntfs3@lists.linux.dev, ocfs2-devel@lists.linux.dev, devel@lists.orangefs.org, linux-unionfs@vger.kernel.org, apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org, linux-integrity@vger.kernel.org, selinux@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, netdev@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-xfs@vger.kernel.org, linux-hams@vger.kernel.org, linux-x25@vger.kernel.org, audit@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-can@vger.kernel.org, linux-sctp@vger.kernel.org, bpf@vger.kernel.org On Tue, 2026-03-03 at 11:03 -0500, Paul Moore wrote: > On Tue, Mar 3, 2026 at 6:05=E2=80=AFAM Jeff Layton w= rote: > > On Mon, 2026-03-02 at 18:44 -0500, Paul Moore wrote: > > > On Mon, Mar 2, 2026 at 3:25=E2=80=AFPM Jeff Layton wrote: > > > >=20 > > > > inode->i_ino is being widened from unsigned long to u64. The audit > > > > subsystem uses unsigned long ino in struct fields, function paramet= ers, > > > > and local variables that store inode numbers from arbitrary filesys= tems. > > > > On 32-bit platforms this truncates inode numbers that exceed 32 bit= s, > > > > which will cause incorrect audit log entries and broken watch/mark > > > > comparisons. > > > >=20 > > > > Widen all audit ino fields, parameters, and locals to u64, and upda= te > > > > the inode format string from %lu to %llu to match. > > > >=20 > > > > Signed-off-by: Jeff Layton > > > > --- > > > > include/linux/audit.h | 2 +- > > > > kernel/audit.h | 9 ++++----- > > > > kernel/audit_fsnotify.c | 4 ++-- > > > > kernel/audit_watch.c | 8 ++++---- > > > > kernel/auditsc.c | 2 +- > > > > 5 files changed, 12 insertions(+), 13 deletions(-) > > >=20 > > > We should also update audit_hash_ino() in kernel/audit.h. It is a > > > *very* basic hash function, so I think leaving the function as-is and > > > just changing the inode parameter from u32 to u64 should be fine. >=20 > ... >=20 > > It doesn't look like changing the argument type will make any material > > difference. Given that it should still work without that change, can we > > leave this cleanup for you to do in a follow-on patchset? >=20 > I would prefer if you made the change as part of the patch, mainly to > keep a patch record of this being related. >=20 Ok, I'll see about factoring that in. > Ideally I'd really like to see kino_t used in the audit code instead > of u64, but perhaps that is done in a later patch that I didn't see. I think I didn't make this clear enough in the cover letter, but kino_t is removed at the end of the series. It's just there to support the change during the interim. If HCH gets his way to do the changes as one big patch, it'll go away entirely. --=20 Jeff Layton