Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752101AbbEGMab (ORCPT ); Thu, 7 May 2015 08:30:31 -0400 Received: from mail-wg0-f43.google.com ([74.125.82.43]:33218 "EHLO mail-wg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751476AbbEGMa3 (ORCPT ); Thu, 7 May 2015 08:30:29 -0400 Message-ID: <554B5AE1.4060901@gmail.com> Date: Thu, 07 May 2015 15:30:25 +0300 From: Nikolay Borisov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: viro@zeniv.linux.org.uk CC: "linux-kernel"@vger.kernel.org, linux-fsdevel@vger.kernel.org, spender@grsecurity.net Subject: Repercussions of overflow in get_next_ino() Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1167 Lines: 26 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/