Re: [PATCH v2 004/110] net: change sock.sk_ino and sock_i_ino() to u64

Marc Kleine-Budde <[email protected]> Tue, 3 Mar 2026 11:03:42 +0100
Newsgroups gmane.linux.file-systems,gmane.linux.kernel,gmane.linux.kernel.mm,gmane.comp.file-systems.ext4,gmane.linux.file-systems.f2fs,gmane.linux.nfs,gmane.linux.kernel.cifs,gmane.network.samba.internals,gmane.comp.file-systems.nilfs.user,gmane.linux.kernel.autofs,gmane.comp.file-systems.ceph.devel,gmane.comp.file-systems.coda.general,gmane.comp.file-systems.ecryptfs.general,gmane.linux.drivers.mtd,gmane.linux.file-systems.union,gmane.comp.security.apparmor,gmane.linux.kernel.lsm,gmane.comp.freedesktop.amd-gfx,gmane.comp.video.dri.devel,gmane.linux.drivers.video-input-infrastructure,gmane.linux.network,gmane.linux.kernel.perf.user,gmane.linux.hams,gmane.linux.x25,gmane.linux.bluez.kernel,gmane.linux.can,gmane.linux.kernel.bpf
Message-ID <[email protected]>
--w7xntzjnabubqe7a
Content-Type: text/plain; protected-headers=v1; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Subject: Re: [PATCH v2 004/110] net: change sock.sk_ino and sock_i_ino() to
 u64
MIME-Version: 1.0

On 02.03.2026 15:23:48, Jeff Layton wrote:
> inode->i_ino is being converted to a u64. sock.sk_ino (which caches the
> inode number) must also be widened to avoid truncation on 32-bit
> architectures where unsigned long is only 32 bits.
>
> Change sk_ino from unsigned long to u64, and update the return type
> of sock_i_ino() to match. Fix all format strings that print the
> result of sock_i_ino() (%lu -> %llu), and widen the intermediate
> variables and function parameters in the diag modules that were
> using int to hold the inode number.
>
> Note that the UAPI socket diag structures (inet_diag_msg.idiag_inode,
> unix_diag_msg.udiag_ino, etc.) are all __u32 and cannot be changed
> without breaking the ABI. The assignments to those fields will
> silently truncate, which is the existing behavior.
>
> Signed-off-by: Jeff Layton <[email protected]>
> ---
>  net/can/bcm.c                | 2 +-

Acked-by: Marc Kleine-Budde <[email protected]> # for net/can

regards,
Marc

--=20
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung N=C3=BCrnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

--w7xntzjnabubqe7a
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQSl+MghEFFAdY3pYJLMOmT6rpmt0gUCaaax+QAKCRDMOmT6rpmt
0hl7AQCzPgPTWe6ol8KwtKBDfHnqkx4Ku1cIiwlQY4Hnx5jz1wD5ASVd5abGOb50
lF4hQNIazRvyjJwKRF+va5JwX/SN2go=
=y8vr
-----END PGP SIGNATURE-----

--w7xntzjnabubqe7a--