linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Repercussions of overflow in get_next_ino()
@ 2015-05-07 12:30 Nikolay Borisov
  2015-05-07 16:33 ` J. R. Okajima
  0 siblings, 1 reply; 2+ messages in thread
From: Nikolay Borisov @ 2015-05-07 12:30 UTC (permalink / raw)
  To: viro; +Cc: linux-kernel, linux-fsdevel, spender

Hello,

get_next_ino would allocate a number between 0...2^32 - 1 to be used as 
an inode number. The implementation of this mechanism relies on an 
unsigned int which is 32 bits. On one server I'm observing that every 
couple of months grsec complains that the percpu variable last_ino 
overflows (due to shared_last_ino) being incremented to the limit of a 
32 bit value and then then the machine becomes unstable due to grsec 
starting to kill processes. Now, I understand this isssue stems from the 
fact how grsec detects the overflow.

My question is what are the repercussions of get_next_ino overflowing 
and at some point having possibly multiple inodes on my system with the 
same i_ino id? And why is it safe to have the inode id's overflow and 
wrap around?

Would simply changing the inode numbering code work with 64 bit value 
remedy the situation or would it require a more involved fix?

Regards,
Nikolay

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Repercussions of overflow in get_next_ino()
  2015-05-07 12:30 Repercussions of overflow in get_next_ino() Nikolay Borisov
@ 2015-05-07 16:33 ` J. R. Okajima
  0 siblings, 0 replies; 2+ messages in thread
From: J. R. Okajima @ 2015-05-07 16:33 UTC (permalink / raw)
  To: Nikolay Borisov; +Cc: viro, linux-kernel, linux-fsdevel, spender

[-- Attachment #1: Type: text/plain, Size: 633 bytes --]

Hello,

Nikolay Borisov:
> My question is what are the repercussions of get_next_ino overflowing 
> and at some point having possibly multiple inodes on my system with the 
> same i_ino id? And why is it safe to have the inode id's overflow and 
> wrap around?

I am afraid some applications won't work correctly.
As far as I know, ls(1) and find(1) don't show the file whose inum is
zero.

See also
	Subject: [PATCH v2] vfs: get_next_ino(), never inum=0
	Date: 2014-05-28 14:06:32
	http://marc.info/?l=linux-fsdevel&m=140128600801771&w=2
and their thread.

For tmpfs, I have another patch. Just FYI, here attached.


J. R. Okajima


[-- Attachment #2: a.patch.bz2 --]
[-- Type: application/x-bzip2, Size: 2522 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-07 16:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-07 12:30 Repercussions of overflow in get_next_ino() Nikolay Borisov
2015-05-07 16:33 ` J. R. Okajima

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).