Actions
Bug #2060
opentmpfs can have distinct files with the same inode number
Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2012-02-02
Due date:
% Done:
0%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
Description
http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/fs/tmpfs/tmp_tnode.c#172
t->tn_nodeid = (ino64_t)(uint32_t)((uintptr_t)t >> 3);
So if there are two tmpfs nodes in the kernel heap a multiple 1<<35 of bytes apart, generating a hard link to one might instead get you a link to the other.
Updated by Rich Lowe over 10 years ago
No amount of logic and thought I can apply suggests why the uint32_t cast is there.
All I can come up with is an attempt to keep the inodes in 32bit on a 64bit system with the kernel heap high. Perhaps that combined with poor foresight?
Actions