[PATCH 2/6] ipc/sem.c: Bugfix for semctl(,,GETZCNT)

2014-05-18 Thread Manfred Spraul
, this will be cleaned up in the next patch. Signed-off-by: Manfred Spraul manf...@colorfullife.com --- ipc/sem.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/ipc/sem.c b/ipc/sem.c index 5749b9c..dc648f8 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -1047,6 +1047,16 @@ static int

[PATCH 0/6] ipc/sem.c: Fix semctl(,,{GETNCNT,GETZCNT})

2014-05-18 Thread Manfred Spraul
. The series got fairly long, because I also noticed that semzcnt was calculated incorrectly. -- Manfred -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH 3/5] ipc,msg: always respect MSG_NOERROR

2014-05-17 Thread Manfred Spraul
INT_MAX; ^^ This code should handle MSG_NOERROR: If MSG_NOERROR is set, then maxsize is set to INT_MAX, therefore -E2BIG should never be returned. -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.o

Re: [PATCH 2/5] ipc,msg: move some msgq ns code around

2014-05-17 Thread Manfred Spraul
On 05/13/2014 10:27 PM, Davidlohr Bueso wrote: Nothing big and no logical changes, just get rid of some redundant function declarations. Move msg_[init/exit]_ns down the end of the file. Signed-off-by: Davidlohr Bueso Signed-off-by: Manfred Spraul --- ipc/msg.c | 132

Re: [PATCH 1/5] ipc,msg: use current->state helpers

2014-05-17 Thread Manfred Spraul
On 05/13/2014 10:27 PM, Davidlohr Bueso wrote: Call __set_current_state() instead of assigning the new state directly. Signed-off-by: Davidlohr Bueso Signed-off-by: Manfred Spraul --- ipc/msg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c

Re: [PATCH 1/5] ipc,msg: use current-state helpers

2014-05-17 Thread Manfred Spraul
On 05/13/2014 10:27 PM, Davidlohr Bueso wrote: Call __set_current_state() instead of assigning the new state directly. Signed-off-by: Davidlohr Bueso davidl...@hp.com Signed-off-by: Manfred Spraul manf...@colorfullif.com --- ipc/msg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

Re: [PATCH 2/5] ipc,msg: move some msgq ns code around

2014-05-17 Thread Manfred Spraul
On 05/13/2014 10:27 PM, Davidlohr Bueso wrote: Nothing big and no logical changes, just get rid of some redundant function declarations. Move msg_[init/exit]_ns down the end of the file. Signed-off-by: Davidlohr Bueso davidl...@hp.com Signed-off-by: Manfred Spraul manf...@colorfullife.com

Re: [PATCH 3/5] ipc,msg: always respect MSG_NOERROR

2014-05-17 Thread Manfred Spraul
; ^^ This code should handle MSG_NOERROR: If MSG_NOERROR is set, then maxsize is set to INT_MAX, therefore -E2BIG should never be returned. -- Manfred -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 6/6] ipc/sem.c: make semctl(,,{GETNCNT,GETZCNT}) standard compliant

2014-05-14 Thread Manfred Spraul
kling BUG_ONs in the kernel I'm not sure we want this. Yes, all those calls are correct from a logical pov and should never occur, however, would WARN be more suitable instead? I don't know. Well, this BUG_ON is so old that a decent approach would be to just delete the thing, if only Manfred wasn't changin

Re: [PATCH 5/5] ipc,msg: loosen check for full queue

2014-05-14 Thread Manfred Spraul
messages. Worst case scenario, we should update the msgsnd(2) manpage and document this unique Linux behavior. I would document the current behavior. -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.

Re: [PATCH 5/5] ipc,msg: loosen check for full queue

2014-05-14 Thread Manfred Spraul
that it is related to MSGTQL: http://fxr.watson.org/fxr/source/common/os/msg.c?v=OPENSOLARIS;im=bigexcerpts#L652 I.e.: We cannot remove the check unless we add another mechanism that limits the number of messages. -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-k

Re: [PATCH 5/5] ipc,msg: loosen check for full queue

2014-05-14 Thread Manfred Spraul
messages. Worst case scenario, we should update the msgsnd(2) manpage and document this unique Linux behavior. I would document the current behavior. -- Manfred -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 6/6] ipc/sem.c: make semctl(,,{GETNCNT,GETZCNT}) standard compliant

2014-05-14 Thread Manfred Spraul
BUG_ONs in the kernel I'm not sure we want this. Yes, all those calls are correct from a logical pov and should never occur, however, would WARN be more suitable instead? I don't know. Well, this BUG_ON is so old that a decent approach would be to just delete the thing, if only Manfred wasn't changing

Re: [PATCH 5/5] ipc,msg: loosen check for full queue

2014-05-14 Thread Manfred Spraul
that it is related to MSGTQL: http://fxr.watson.org/fxr/source/common/os/msg.c?v=OPENSOLARIS;im=bigexcerpts#L652 I.e.: We cannot remove the check unless we add another mechanism that limits the number of messages. -- Manfred -- To unsubscribe from this list: send the line unsubscribe linux-kernel

Re: [PATCH 2/6] ipc/sem.c: Bugfix for semctl(,,GETZCNT)

2014-05-13 Thread Manfred Spraul
Hi Davidlohr, On 05/12/2014 08:11 PM, Davidlohr Bueso wrote: On Sat, 2014-05-10 at 12:03 +0200, Manfred Spraul wrote: GETZCNT is supposed to return the number of threads that wait until a semaphore value becomes 0. The current implementation overlooks complex operations that contain both wait

Re: Re: Donate my property to a serious and honest person

2014-05-13 Thread EGGERT MANFRED
Hello, Excuse me for this way to contact you, I just saw your profile and I said you're the one I need. In short my name is Manfred EGGERT French origin and I live in Germany. I suffer from a serious illness which condemns me to certain death is throat cancer, and I have a large sum of 22.7

Linux @ google +

2014-05-13 Thread Manfred Ostermann
? Best Regards Manfred -- : Manfred Ostermann : Senior Sales & Marketing Manager : LINBIT | Your Way to High Availability : Tel: +43-1-8178292-54, Fax: +43-1-8178292-82 : : http://www.linbit.at : http://www.xing.com/profile/Manfred_Ostermann DRBD® and LINBIT® are registered trademarks of LI

Linux @ google +

2014-05-13 Thread Manfred Ostermann
you can help us? Best Regards Manfred -- : Manfred Ostermann : Senior Sales Marketing Manager : LINBIT | Your Way to High Availability : Tel: +43-1-8178292-54, Fax: +43-1-8178292-82 : : http://www.linbit.at : http://www.xing.com/profile/Manfred_Ostermann DRBD® and LINBIT® are registered

Re: Re: Donate my property to a serious and honest person

2014-05-13 Thread EGGERT MANFRED
Hello, Excuse me for this way to contact you, I just saw your profile and I said you're the one I need. In short my name is Manfred EGGERT French origin and I live in Germany. I suffer from a serious illness which condemns me to certain death is throat cancer, and I have a large sum of 22.7

Re: [PATCH 2/6] ipc/sem.c: Bugfix for semctl(,,GETZCNT)

2014-05-13 Thread Manfred Spraul
Hi Davidlohr, On 05/12/2014 08:11 PM, Davidlohr Bueso wrote: On Sat, 2014-05-10 at 12:03 +0200, Manfred Spraul wrote: GETZCNT is supposed to return the number of threads that wait until a semaphore value becomes 0. The current implementation overlooks complex operations that contain both wait

Re: [PATCH 1/6] ipc/sem.c: further whitespace cleanups

2014-05-12 Thread Manfred Spraul
Hi Davidlohr, On 05/12/2014 01:34 AM, Davidlohr Bueso wrote: On Sat, 2014-05-10 at 12:03 +0200, Manfred Spraul wrote: Somehow $ was overlooked in the last round of whitespace cleanups. Do that now, before making further changes. No big deal, but this patch could easily be included

Re: [PATCH 0/6] ipc/sem.c: Fix semctl(,,{GETNCNT,GETZCNT})

2014-05-12 Thread Manfred Spraul
Hi Michael, On 05/12/2014 10:02 AM, Michael Kerrisk (man-pages) wrote: Hi Manfred, On Sat, May 10, 2014 at 12:03 PM, Manfred Spraul wrote: Hi all, According to the man page of semop(), semzcnt or semncnt are increased exactly for the operation that couldn't proceed. Perhaps it's woth

Re: [PATCH 0/6] ipc/sem.c: Fix semctl(,,{GETNCNT,GETZCNT})

2014-05-12 Thread Manfred Spraul
Hi Michael, On 05/12/2014 10:02 AM, Michael Kerrisk (man-pages) wrote: Hi Manfred, On Sat, May 10, 2014 at 12:03 PM, Manfred Spraul manf...@colorfullife.com wrote: Hi all, According to the man page of semop(), semzcnt or semncnt are increased exactly for the operation that couldn't proceed

Re: [PATCH 1/6] ipc/sem.c: further whitespace cleanups

2014-05-12 Thread Manfred Spraul
Hi Davidlohr, On 05/12/2014 01:34 AM, Davidlohr Bueso wrote: On Sat, 2014-05-10 at 12:03 +0200, Manfred Spraul wrote: Somehow TAB$ was overlooked in the last round of whitespace cleanups. Do that now, before making further changes. No big deal, but this patch could easily be included

[PATCH 2/6] ipc/sem.c: Bugfix for semctl(,,GETZCNT)

2014-05-10 Thread Manfred Spraul
, this will be cleaned up in the next patch. Signed-off-by: Manfred Spraul --- ipc/sem.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/ipc/sem.c b/ipc/sem.c index 5749b9c..dc648f8 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -1047,6 +1047,16 @@ static int count_semzcnt(struct sem_array

[PATCH 0/6] ipc/sem.c: Fix semctl(,,{GETNCNT,GETZCNT})

2014-05-10 Thread Manfred Spraul
GETNCNT or GETZCNT? -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH 3/6] ipc/sem.c: remove code duplication

2014-05-10 Thread Manfred Spraul
count_semzcnt and count_semncnt are more of less identical. The patch creates a single function that either counts the number of tasks waiting for zero or waiting due to a decrease operation. Signed-off-by: Manfred Spraul --- ipc/sem.c | 103

[PATCH 5/6] ipc/sem.c: Store which operation blocks in perform_atomic_semop()

2014-05-10 Thread Manfred Spraul
Preparation for the next patch: In the slow-path of perform_atomic_semop(), store a pointer to the operation that caused the operation to block. Signed-off-by: Manfred Spraul --- ipc/sem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ipc/sem.c b/ipc/sem.c index 3962cca..22a4c12 100644

[PATCH 4/6] ipc/sem.c: Change perform_atomic_semop parameters

2014-05-10 Thread Manfred Spraul
Right now, perform_atomic_semop gets the content of sem_queue as individual fields. Changes that, instead pass a pointer to sem_queue. This is a preparation for the next patch: it uses sem_queue to store the reason why a task must sleep. Signed-off-by: Manfred Spraul --- ipc/sem.c | 38

[PATCH 1/6] ipc/sem.c: further whitespace cleanups

2014-05-10 Thread Manfred Spraul
Somehow $ was overlooked in the last round of whitespace cleanups. Do that now, before making further changes. Signed-off-by: Manfred Spraul --- ipc/sem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ipc/sem.c b/ipc/sem.c index bee5554..5749b9c 100644 --- a/ipc

[PATCH 6/6] ipc/sem.c: make semctl(,,{GETNCNT,GETZCNT}) standard compliant

2014-05-10 Thread Manfred Spraul
: The implementation assumes that GETNCNT and GETZCNT are rare operations, therefore the code counts them only on demand. (If they wouldn't be rare, then the non-compliance would have been found earlier) Signed-off-by: Manfred Spraul --- ipc/sem.c | 37 - 1 file

[PATCH 1/6] ipc/sem.c: further whitespace cleanups

2014-05-10 Thread Manfred Spraul
Somehow TAB$ was overlooked in the last round of whitespace cleanups. Do that now, before making further changes. Signed-off-by: Manfred Spraul manf...@colorfullife.com --- ipc/sem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ipc/sem.c b/ipc/sem.c index bee5554

[PATCH 6/6] ipc/sem.c: make semctl(,,{GETNCNT,GETZCNT}) standard compliant

2014-05-10 Thread Manfred Spraul
: The implementation assumes that GETNCNT and GETZCNT are rare operations, therefore the code counts them only on demand. (If they wouldn't be rare, then the non-compliance would have been found earlier) Signed-off-by: Manfred Spraul manf...@colorfullife.com --- ipc/sem.c | 37

[PATCH 4/6] ipc/sem.c: Change perform_atomic_semop parameters

2014-05-10 Thread Manfred Spraul
Right now, perform_atomic_semop gets the content of sem_queue as individual fields. Changes that, instead pass a pointer to sem_queue. This is a preparation for the next patch: it uses sem_queue to store the reason why a task must sleep. Signed-off-by: Manfred Spraul manf...@colorfullife.com

[PATCH 5/6] ipc/sem.c: Store which operation blocks in perform_atomic_semop()

2014-05-10 Thread Manfred Spraul
Preparation for the next patch: In the slow-path of perform_atomic_semop(), store a pointer to the operation that caused the operation to block. Signed-off-by: Manfred Spraul manf...@colorfullife.com --- ipc/sem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ipc/sem.c b/ipc/sem.c index

[PATCH 0/6] ipc/sem.c: Fix semctl(,,{GETNCNT,GETZCNT})

2014-05-10 Thread Manfred Spraul
GETNCNT or GETZCNT? -- Manfred -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH 3/6] ipc/sem.c: remove code duplication

2014-05-10 Thread Manfred Spraul
count_semzcnt and count_semncnt are more of less identical. The patch creates a single function that either counts the number of tasks waiting for zero or waiting due to a decrease operation. Signed-off-by: Manfred Spraul manf...@colorfullife.com --- ipc/sem.c | 103

[PATCH 2/6] ipc/sem.c: Bugfix for semctl(,,GETZCNT)

2014-05-10 Thread Manfred Spraul
, this will be cleaned up in the next patch. Signed-off-by: Manfred Spraul manf...@colorfullife.com --- ipc/sem.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/ipc/sem.c b/ipc/sem.c index 5749b9c..dc648f8 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -1047,6 +1047,16 @@ static int

Re: [PATCH 2/2] tty: Fix lockless tty buffer race

2014-05-06 Thread Manfred Schlaegl
of writing, which guarantees >> the commit value read is the latest value written if the head is >> advancing. This is a fine solution! I'll verify this against my previous experimental setup (3.12.x and 3.12.x-rt25), but I dont't expect any problems. >> >> Reported-by:

Re: [PATCH 2/2] tty: Fix lockless tty buffer race

2014-05-06 Thread Manfred Schlaegl
. Reported-by: Manfred Schlaegl manfred.schla...@gmx.at Cc: sta...@vger.kernel.org # 3.12.x+ The patch submitted by Manfred notes the commits which introduced the race [1], but attributes those commits to the 3.11 cycle. Those commits were merged in the 3.12 cycle. You are right. I'm sorry

Re: [PATCH] IPC initialize shmmax and shmall from the current value not the default

2014-05-04 Thread Manfred Spraul
. With regards to breaking user space, I must think about it a bit more. Right now, each new namespace starts with SEMMAX=32MB, i.e. an often unusable default. -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kerne

Re: [PATCH] IPC initialize shmmax and shmall from the current value not the default

2014-05-04 Thread Manfred Spraul
. With regards to breaking user space, I must think about it a bit more. Right now, each new namespace starts with SEMMAX=32MB, i.e. an often unusable default. -- Manfred -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 5/4] ipc,shm: minor cleanups

2014-04-23 Thread Manfred Spraul
On 04/23/2014 04:53 AM, Davidlohr Bueso wrote: - Breakup long function names/args. - Cleaup variable declaration. s/Cleaup/Cleanup/ - s/current->mm/mm Signed-off-by: Davidlohr Bueso Signed-off-by: Manfred Spraul @@ -681,7 +679,8 @@ copy_shmid_from_user(struct shmid64_ds *out, v

Re: [PATCH 5/4] ipc,shm: minor cleanups

2014-04-23 Thread Manfred Spraul
On 04/23/2014 04:53 AM, Davidlohr Bueso wrote: - Breakup long function names/args. - Cleaup variable declaration. s/Cleaup/Cleanup/ - s/current-mm/mm Signed-off-by: Davidlohr Bueso davidl...@hp.com Signed-off-by: Manfred Spraul manf...@colorfullife.com @@ -681,7 +679,8

Re: [PATCH 0/4] ipc/shm.c: increase the limits for SHMMAX, SHMALL

2014-04-21 Thread Manfred Spraul
On 04/21/2014 07:25 PM, Davidlohr Bueso wrote: On Mon, 2014-04-21 at 16:26 +0200, Manfred Spraul wrote: Hi all, the increase of SHMMAX/SHMALL is now a 4 patch series. I don't have ideas how to improve it further. Manfred, is there any difference between this set and the one you sent a couple

[PATCH 1/4] ipc/shm.c: check for ulong overflows in shmat

2014-04-21 Thread Manfred Spraul
find_vma_intersection does not work as intended if addr+size overflows. The patch adds a manual check before the call to find_vma_intersection. Signed-off-by: Manfred Spraul --- ipc/shm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ipc/shm.c b/ipc/shm.c index 7645961..382e2fb 100644

[PATCH 0/4] ipc/shm.c: increase the limits for SHMMAX, SHMALL

2014-04-21 Thread Manfred Spraul
as a magic value for infinity is even worse, because right now 0 means 0, i.e. fail all allocations. Andrew: Could you add it into -akpm and move it towards linux-next? -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a me

[PATCH 4/4] ipc/shm.c: Increase the defaults for SHMALL, SHMMAX.

2014-04-21 Thread Manfred Spraul
kernel.shmall=0 (not a new feature, also per-namespace) - The limits are intentionally set to a value slightly less than ULONG_MAX, to avoid triggering overflows in user space apps. [not unreasonable, see http://marc.info/?l=linux-mm=139638334330127] Signed-off-by: Manfred Spraul Reported

[PATCH 3/4] ipc/shm.c: check for integer overflow during shmget.

2014-04-21 Thread Manfred Spraul
SHMMAX is the upper limit for the size of a shared memory segment, counted in bytes. The actual allocation is that size, rounded up to the next full page. Add a check that prevents the creation of segments where the rounded up size causes an integer overflow. Signed-off-by: Manfred Spraul

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

2014-04-21 Thread Manfred Spraul
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. Signed-off-by: Manfred Spraul

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

2014-04-21 Thread Manfred Spraul
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. Signed-off-by: Manfred Spraul manf

[PATCH 4/4] ipc/shm.c: Increase the defaults for SHMALL, SHMMAX.

2014-04-21 Thread Manfred Spraul
kernel.shmall=0 (not a new feature, also per-namespace) - The limits are intentionally set to a value slightly less than ULONG_MAX, to avoid triggering overflows in user space apps. [not unreasonable, see http://marc.info/?l=linux-mmm=139638334330127] Signed-off-by: Manfred Spraul manf

[PATCH 3/4] ipc/shm.c: check for integer overflow during shmget.

2014-04-21 Thread Manfred Spraul
SHMMAX is the upper limit for the size of a shared memory segment, counted in bytes. The actual allocation is that size, rounded up to the next full page. Add a check that prevents the creation of segments where the rounded up size causes an integer overflow. Signed-off-by: Manfred Spraul manf

[PATCH 1/4] ipc/shm.c: check for ulong overflows in shmat

2014-04-21 Thread Manfred Spraul
find_vma_intersection does not work as intended if addr+size overflows. The patch adds a manual check before the call to find_vma_intersection. Signed-off-by: Manfred Spraul manf...@colorfullife.com --- ipc/shm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ipc/shm.c b/ipc/shm.c index

[PATCH 0/4] ipc/shm.c: increase the limits for SHMMAX, SHMALL

2014-04-21 Thread Manfred Spraul
right now 0 means 0, i.e. fail all allocations. Andrew: Could you add it into -akpm and move it towards linux-next? -- Manfred -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH 0/4] ipc/shm.c: increase the limits for SHMMAX, SHMALL

2014-04-21 Thread Manfred Spraul
On 04/21/2014 07:25 PM, Davidlohr Bueso wrote: On Mon, 2014-04-21 at 16:26 +0200, Manfred Spraul wrote: Hi all, the increase of SHMMAX/SHMALL is now a 4 patch series. I don't have ideas how to improve it further. Manfred, is there any difference between this set and the one you sent a couple

[PATCH 1/4] ipc/shm.c: check for ulong overflows in shmat

2014-04-19 Thread Manfred Spraul
find_vma_intersection does not work properly if addr+size overflows. The patch adds a manual check before the call to find_vma_intersection. Signed-off-by: Manfred Spraul --- ipc/shm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ipc/shm.c b/ipc/shm.c index 7645961..382e2fb 100644

[PATCH 0/4] ipc/shm.c: increase the limits for SHMMAX, SHMALL

2014-04-19 Thread Manfred Spraul
nt task size for current. And it seems that the task size can change based on (virtual) memory pressure (s390_mmap_check()). For new namespaces, this might have interesting effects, i.e. this must be fixed. -- Manfred -- To unsubscribe from this list: send the line "unsubscr

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

2014-04-19 Thread Manfred Spraul
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. Signed-off-by: Manfred Spraul

[PATCH 3/4] ipc/shm.c: check for integer overflow during shmget.

2014-04-19 Thread Manfred Spraul
SHMMAX is the upper limit of a shared memory segment, counted in bytes. The actual allocation is that size, rounded up to the next full page. Add a check that prevents the creation of segments where the rounded up size causes an integer overflow. Signed-off-by: Manfred Spraul --- ipc/shm.c | 3

[PATCH 4/4] ipc/shm.c: Increase the defaults for SHMALL, SHMMAX.

2014-04-19 Thread Manfred Spraul
TASK_SIZE do not make sense, because such segments can't be mapped. - The limit for the total memory is 256*TASK_SIZE. This would be 768 GB for x86-32 and 64 PB for x86-64. Values larger than that might make sense, but not in the next few weeks. Signed-off-by: Manfred Spraul Reported

Re: [PATCH] ipc/shm: Increase the defaults for SHMALL, SHMMAX to infinity

2014-04-19 Thread Manfred Spraul
On 04/19/2014 09:10 AM, Michael Kerrisk (man-pages) wrote: On Sat, Apr 19, 2014 at 8:55 AM, Davidlohr Bueso wrote: On Fri, 2014-04-18 at 11:18 +0200, Manfred Spraul wrote: Risks: - The patch breaks installations that use "take current value and increase it a bit". [seems to e

Re: [PATCH] ipc/shm: Increase the defaults for SHMALL, SHMMAX to infinity

2014-04-19 Thread Manfred Spraul
On 04/19/2014 08:55 AM, Davidlohr Bueso wrote: On Fri, 2014-04-18 at 11:18 +0200, Manfred Spraul wrote: - ULONG_MAX is not really infinity, but 18 Exabyte segment size and 75 Zettabyte total size. This should be enough for the next few weeks. (assuming a 64-bit system with 4k pages) Note

Re: [PATCH] ipc/shm: Increase the defaults for SHMALL, SHMMAX to infinity

2014-04-19 Thread Manfred Spraul
On 04/19/2014 08:55 AM, Davidlohr Bueso wrote: On Fri, 2014-04-18 at 11:18 +0200, Manfred Spraul wrote: - ULONG_MAX is not really infinity, but 18 Exabyte segment size and 75 Zettabyte total size. This should be enough for the next few weeks. (assuming a 64-bit system with 4k pages) Note

Re: [PATCH] ipc/shm: Increase the defaults for SHMALL, SHMMAX to infinity

2014-04-19 Thread Manfred Spraul
On 04/19/2014 09:10 AM, Michael Kerrisk (man-pages) wrote: On Sat, Apr 19, 2014 at 8:55 AM, Davidlohr Bueso davidl...@hp.com wrote: On Fri, 2014-04-18 at 11:18 +0200, Manfred Spraul wrote: Risks: - The patch breaks installations that use take current value and increase it a bit. [seems

[PATCH 4/4] ipc/shm.c: Increase the defaults for SHMALL, SHMMAX.

2014-04-19 Thread Manfred Spraul
than TASK_SIZE do not make sense, because such segments can't be mapped. - The limit for the total memory is 256*TASK_SIZE. This would be 768 GB for x86-32 and 64 PB for x86-64. Values larger than that might make sense, but not in the next few weeks. Signed-off-by: Manfred Spraul manf

[PATCH 0/4] ipc/shm.c: increase the limits for SHMMAX, SHMALL

2014-04-19 Thread Manfred Spraul
. And it seems that the task size can change based on (virtual) memory pressure (s390_mmap_check()). For new namespaces, this might have interesting effects, i.e. this must be fixed. -- Manfred -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message

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

2014-04-19 Thread Manfred Spraul
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. Signed-off-by: Manfred Spraul manf

[PATCH 3/4] ipc/shm.c: check for integer overflow during shmget.

2014-04-19 Thread Manfred Spraul
SHMMAX is the upper limit of a shared memory segment, counted in bytes. The actual allocation is that size, rounded up to the next full page. Add a check that prevents the creation of segments where the rounded up size causes an integer overflow. Signed-off-by: Manfred Spraul manf

[PATCH 1/4] ipc/shm.c: check for ulong overflows in shmat

2014-04-19 Thread Manfred Spraul
find_vma_intersection does not work properly if addr+size overflows. The patch adds a manual check before the call to find_vma_intersection. Signed-off-by: Manfred Spraul manf...@colorfullife.com --- ipc/shm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ipc/shm.c b/ipc/shm.c index

Re: [PATCH v3] ipc,shm: disable shmmax and shmall by default

2014-04-18 Thread Manfred Spraul
On 04/18/2014 05:36 PM, Michael Kerrisk (man-pages) wrote: On Fri, Apr 18, 2014 at 11:26 AM, Manfred Spraul wrote: Obviously my patch has the opposite problem: 64-bit wrap-arounds. I know you alluded to a case in another thread, but I couldn't quite work out from the mail you referred

Re: [PATCH v3] ipc,shm: disable shmmax and shmall by default

2014-04-18 Thread Manfred Spraul
#define SHMSEG SHMMNI /* max shared segs per process */ The "#ifndef __KERNEL__" is not required: As there is no reference to PAGE_SIZE anymore, one definition for SHMALL is sufficient. -- Manfred -- To unsubscribe from this list: send the line "un

[PATCH] ipc/shm: Increase the defaults for SHMALL, SHMMAX to infinity

2014-04-18 Thread Manfred Spraul
llocations. - There is no wrap-around protection for ns->shm_ctlall, i.e. the 75 ZB limit is not enforced. Signed-off-by: Manfred Spraul Reported-by: Davidlohr Bueso Cc: mtk.manpa...@gmail.com --- include/linux/shm.h | 1 - include/uapi/linux/shm.h | 8 +++- 2 files changed, 3 insertions(+), 6 delet

Re: [PATCH] tty: Fix race condition between __tty_buffer_request_room and flush_to_ldisc

2014-04-18 Thread Manfred Schlaegl
On 2014-04-08 14:42, Manfred Schlaegl wrote: > The race was introduced while development of linux-3.11 by > e8437d7ecbc50198705331449367d401ebb3181f and > e9975fdec0138f1b2a85b9624e41660abd9865d4. > Originally it was found and reproduced on linux-3.12.15 and > linux-3.12.15-rt25,

Re: [PATCH v3] ipc,shm: disable shmmax and shmall by default

2014-04-18 Thread Manfred Spraul
On 04/18/2014 05:36 PM, Michael Kerrisk (man-pages) wrote: On Fri, Apr 18, 2014 at 11:26 AM, Manfred Spraul manf...@colorfullife.com wrote: Obviously my patch has the opposite problem: 64-bit wrap-arounds. I know you alluded to a case in another thread, but I couldn't quite work out from

Re: [PATCH] tty: Fix race condition between __tty_buffer_request_room and flush_to_ldisc

2014-04-18 Thread Manfred Schlaegl
On 2014-04-08 14:42, Manfred Schlaegl wrote: The race was introduced while development of linux-3.11 by e8437d7ecbc50198705331449367d401ebb3181f and e9975fdec0138f1b2a85b9624e41660abd9865d4. Originally it was found and reproduced on linux-3.12.15 and linux-3.12.15-rt25, by sending 500 byte

[PATCH] ipc/shm: Increase the defaults for SHMALL, SHMMAX to infinity

2014-04-18 Thread Manfred Spraul
-around protection for ns-shm_ctlall, i.e. the 75 ZB limit is not enforced. Signed-off-by: Manfred Spraul manf...@colorfullife.com Reported-by: Davidlohr Bueso davidl...@hp.com Cc: mtk.manpa...@gmail.com --- include/linux/shm.h | 1 - include/uapi/linux/shm.h | 8 +++- 2 files changed

Re: [PATCH v3] ipc,shm: disable shmmax and shmall by default

2014-04-18 Thread Manfred Spraul
#define SHMSEG SHMMNI /* max shared segs per process */ The #ifndef __KERNEL__ is not required: As there is no reference to PAGE_SIZE anymore, one definition for SHMALL is sufficient. -- Manfred -- To unsubscribe from this list: send the line unsubscribe linux-kernel

Re: [PATCH] ipc,shm: increase default size for shmmax

2014-04-17 Thread Manfred Spraul
On 04/17/2014 12:41 PM, Michael Kerrisk wrote: On Thu, Apr 17, 2014 at 12:46 AM, Andrew Morton wrote: On Sun, 13 Apr 2014 20:05:34 +0200 Manfred Spraul wrote: Hi Andrew, On 04/02/2014 12:08 AM, Andrew Morton wrote: Well, I'm assuming 64GB==infinity. It *was* infinity in the RHEL5

Re: [PATCH v2] ipc,shm: disable shmmax and shmall by default

2014-04-17 Thread Manfred Spraul
t; /proc/sys/kernel/shmmax With my patch, shmmax would end up as 0 and all allocations fail. - My patch handles the case if some startup code/installer checks shmmax and complains if it is below the requirement of the application. -- Manfred -- To unsubscribe from this list: send

Re: [PATCH v2] ipc,shm: disable shmmax and shmall by default

2014-04-17 Thread Manfred Spraul
startup code/installer checks shmmax and complains if it is below the requirement of the application. -- Manfred -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: [PATCH] ipc,shm: increase default size for shmmax

2014-04-17 Thread Manfred Spraul
On 04/17/2014 12:41 PM, Michael Kerrisk wrote: On Thu, Apr 17, 2014 at 12:46 AM, Andrew Morton a...@linux-foundation.org wrote: On Sun, 13 Apr 2014 20:05:34 +0200 Manfred Spraul manf...@colorfullife.com wrote: Hi Andrew, On 04/02/2014 12:08 AM, Andrew Morton wrote: Well, I'm assuming 64GB

Re: [PATCH] ipc,shm: increase default size for shmmax

2014-04-13 Thread Manfred Spraul
- and Android disables sysv shm entirely. There are two patches: http://marc.info/?l=linux-kernel=139730332306185=raw http://marc.info/?l=linux-kernel=139727299800644=raw Could you apply one of them? I wrote the first one, thus I'm biased which one is better. -- Manfred -- To unsubscribe from

Re: [PATCH] ipc,shm: increase default size for shmmax

2014-04-13 Thread Manfred Spraul
- and Android disables sysv shm entirely. There are two patches: http://marc.info/?l=linux-kernelm=139730332306185q=raw http://marc.info/?l=linux-kernelm=139727299800644q=raw Could you apply one of them? I wrote the first one, thus I'm biased which one is better. -- Manfred -- To unsubscribe

[PATCH] ipc/shm: disable SHMALL, SHMMAX

2014-04-12 Thread Manfred Spraul
incompatibilities. Signed-off-by: Manfred Spraul --- include/linux/shm.h | 2 +- include/uapi/linux/shm.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/shm.h b/include/linux/shm.h index 1e2cd2e..37bf9c6 100644 --- a/include/linux/shm.h +++ b/include/linux/shm.h

Re: [PATCH] ipc,shm: disable shmmax and shmall by default

2014-04-12 Thread Manfred Spraul
On 04/11/2014 10:27 PM, Davidlohr Bueso wrote: On Fri, 2014-04-11 at 20:28 +0200, Manfred Spraul wrote: Hi Davidlohr, On 04/03/2014 02:20 AM, Davidlohr Bueso wrote: The default size for shmmax is, and always has been, 32Mb. Today, in the XXI century, it seems that this value is rather small

Re: [PATCH] ipc,shm: disable shmmax and shmall by default

2014-04-12 Thread Manfred Spraul
On 04/11/2014 10:27 PM, Davidlohr Bueso wrote: On Fri, 2014-04-11 at 20:28 +0200, Manfred Spraul wrote: Hi Davidlohr, On 04/03/2014 02:20 AM, Davidlohr Bueso wrote: The default size for shmmax is, and always has been, 32Mb. Today, in the XXI century, it seems that this value is rather small

[PATCH] ipc/shm: disable SHMALL, SHMMAX

2014-04-12 Thread Manfred Spraul
incompatibilities. Signed-off-by: Manfred Spraul manf...@colorfullife.com --- include/linux/shm.h | 2 +- include/uapi/linux/shm.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/shm.h b/include/linux/shm.h index 1e2cd2e..37bf9c6 100644 --- a/include/linux/shm.h

Re: [PATCH] ipc,shm: disable shmmax and shmall by default

2014-04-11 Thread Manfred Spraul
mmary is misleading, the impact on SHMMIN is not mentioned. -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] ipc,shm: disable shmmax and shmall by default

2014-04-11 Thread Manfred Spraul
*AND* checking for SHMMIN. a) Have you double checked that 0-sized shm segments work properly? Does the swap code handle it properly, ...? b) It's that yet another risk for user space incompatibility? c) The patch summary is misleading, the impact on SHMMIN is not mentioned. -- Manfred

[PATCH] tty: Fix race condition between __tty_buffer_request_room and flush_to_ldisc

2014-04-08 Thread Manfred Schlaegl
// ERROR: tty_buffer head freed -> 6 bytes lost continue; } }}} This patch reintroduces a spin_lock to protect this case. Perhaps later a lock-less solution could be found. Signed-off-by: Manfred Schlaegl --- drivers/tty/tty_buffer.c | 16 ++--

[PATCH] tty: Fix race condition between __tty_buffer_request_room and flush_to_ldisc

2014-04-08 Thread Manfred Schlaegl
-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH] tty: Fix race condition between __tty_buffer_request_room and flush_to_ldisc

2014-04-08 Thread Manfred Schlaegl
-- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH] tty: Fix race condition between __tty_buffer_request_room and flush_to_ldisc

2014-04-08 Thread Manfred Schlaegl
; } }}} This patch reintroduces a spin_lock to protect this case. Perhaps later a lock-less solution could be found. Signed-off-by: Manfred Schlaegl manfred.schla...@gmx.at --- drivers/tty/tty_buffer.c | 16 ++-- include/linux/tty.h |1 + 2 files changed, 15 insertions

Re: [PATCH] ipc,shm: disable shmmax and shmall by default

2014-04-06 Thread Manfred Spraul
oach. - setting shmmax by default to ULONG_MAX is the perfect workaround. What reasons are there against the one-line patch? > > -#define SHMMAX 0x200/* max shared seg size (bytes) */ > +#define SHMMAX ULONG_MAX/* max shared seg size (bytes) */ > --

Re: [PATCH] ipc,shm: disable shmmax and shmall by default

2014-04-06 Thread Manfred Spraul
shmmax by default to ULONG_MAX is the perfect workaround. What reasons are there against the one-line patch? -#define SHMMAX 0x200/* max shared seg size (bytes) */ +#define SHMMAX ULONG_MAX/* max shared seg size (bytes) */ -- Manfred -- To unsubscribe

Re: [PATCH] ipc,shm: disable shmmax and shmall by default

2014-04-03 Thread Manfred Spraul
sure that no user space apps uses shmctl(IPC_INFO) and prints a pretty error message if shmall is too small? We would break these apps. -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More

Re: [PATCH] ipc,shm: disable shmmax and shmall by default

2014-04-03 Thread Manfred Spraul
sure that no user space apps uses shmctl(IPC_INFO) and prints a pretty error message if shmall is too small? We would break these apps. -- Manfred -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info

RE: RE: Spenden mein Eigentum zu einer ernsthaften Person

2014-03-31 Thread EGGERT MANFRED
Hallo, Entschuldigen Sie mich auf diese Weise , Sie zu kontaktieren , ich sah Ihr Profil und ich sage Ihnen das , was ich brauche bist . Kurz gesagt, mein Name ist Manfred EGGERT , von Französisch Herkunft , und ich lebe in Deutschland. Ich leide an einer schweren Krankheit , die mich in den

RE: RE: Spenden mein Eigentum zu einer ernsthaften Person

2014-03-31 Thread EGGERT MANFRED
Hallo, Entschuldigen Sie mich auf diese Weise , Sie zu kontaktieren , ich sah Ihr Profil und ich sage Ihnen das , was ich brauche bist . Kurz gesagt, mein Name ist Manfred EGGERT , von Französisch Herkunft , und ich lebe in Deutschland. Ich leide an einer schweren Krankheit , die mich in den

<    2   3   4   5   6   7   8   9   10   11   >