Skip to content
  • Waiman Long's avatar
    ipc: conserve sequence numbers in extended IPCMNI mode · 85714e5d
    Waiman Long authored
    The mixing in of a sequence number into the IPC IDs is probably to avoid
    ID reuse in userspace as much as possible.  With extended IPCMNI mode, the
    number of usable sequence numbers is greatly reduced leading to higher
    chance of ID reuse.
    
    To address this issue, we need to conserve the sequence number space as
    much as possible.  Right now, the sequence number is incremented for every
    new ID created.  In reality, we only need to increment the sequence number
    when one or more IDs have been removed previously to make sure that those
    IDs will not be reused when a new one is built.  This is being done only
    in the new extended IPCMNI mode.
    
    Link: http://lkml.kernel.org/r/1536352137-12003-5-git-send-email-longman@redhat.com
    
    
    Signed-off-by: default avatarWaiman Long <longman@redhat.com>
    Cc: Davidlohr Bueso <dave@stgolabs.net>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Luis R. Rodriguez <mcgrof@kernel.org>
    Cc: Matthew Wilcox <willy@infradead.org>
    Cc: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
    85714e5d