Re: [PATCH 2/4] ipc/shm.c: check for overflows of shm_tot

2014-04-22 Thread Michael Kerrisk (man-pages)
On 04/21/2014 04:26 PM, Manfred Spraul wrote: > shm_tot counts the total number of pages used by shm segments. > > If SHMALL is ULONG_MAX (or nearly ULONG_MAX), then the number > can overflow. Subsequent calls to shmctl(,SHM_INFO,) would return > wrong values for shm_tot. > > The patch adds a de

RE: [PATCH 2/4] ipc/shm.c: check for overflows of shm_tot

2014-04-22 Thread Motohiro Kosaki
> > shm_tot counts the total number of pages used by shm segments. > > > > If SHMALL is ULONG_MAX (or nearly ULONG_MAX), then the number can > > overflow. Subsequent calls to shmctl(,SHM_INFO,) would return wrong > > values for shm_tot. > > > > The patch adds a detection for overflows. > > > > Sig

Re: [PATCH 2/4] ipc/shm.c: check for overflows of shm_tot

2014-04-22 Thread Davidlohr Bueso
On Mon, 2014-04-21 at 16:26 +0200, Manfred Spraul wrote: > shm_tot counts the total number of pages used by shm segments. > > If SHMALL is ULONG_MAX (or nearly ULONG_MAX), then the number > can overflow. Subsequent calls to shmctl(,SHM_INFO,) would return > wrong values for shm_tot. > > The patc