* [REVIEW] 16704 protolist corrupts inode numbers larger than 2^31
@ 2024-08-16 20:12 Bill Sommerfeld
0 siblings, 0 replies; only message in thread
From: Bill Sommerfeld @ 2024-08-16 20:12 UTC (permalink / raw)
To: developer
Issue: https://www.illumos.org/issues/16704
CR: https://code.illumos.org/c/illumos-gate/+/3634
Diff:
https://code.illumos.org/~diff/b9ac120bc9e759ad1b83db83de3f6814432532cd
I've been experimenting with doing illumos-gate builds in /tmp, which
exposed a bug in the protolist tool used during nightly.
The output of protolist includes a column with the inode number of
each file in the proto area. The ino_t type is an unsigned long, but
but protolist passes the value through a variable of type "int" and
then formats it for output as a signed integer.
The corresponding code in protocmp which reads protolist output then
refuses to accept a negative number in the inode column, and spits out
a "bad i-node" error for each one.
This has apparently gone unnoticed because most filesystems use the
inode number to index a compact table of some sort. But tmpfs does
something different - its inode numbers are computed as a function of
the kernel virtual address of a per-file datastructure and on
large-memory machines tend to be scattered broadly between 0 and 2^32-1,
so an appreciable fraction of them turn into negative values when cast
to int.
Thanks in advance for your review.
- Bill
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-08-16 20:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-16 20:12 [REVIEW] 16704 protolist corrupts inode numbers larger than 2^31 Bill Sommerfeld
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).