lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200103100628.GA16577@redhat.com>
Date:   Fri, 3 Jan 2020 11:06:28 +0100
From:   Oleg Nesterov <oleg@...hat.com>
To:     akpm@...ux-foundation.org
Cc:     arnd@...db.de, christian.brauner@...ntu.com,
        deepa.kernel@...il.com, ebiederm@...ssion.com, guro@...com,
        linux-kernel@...r.kernel.org, trix@...hat.com
Subject: Re: + signal-move-print_dropped_signal.patch added to -mm tree

> From: Tom Rix <trix@...hat.com>
> Subject: kernel/signal.c: move print_dropped_signal
>
> If the allocation of 'q' fails, the signal will be dropped.

Well, not necessarily... See the comment above TRACE_SIGNAL_LOSE_INFO
in __send_signal().

> To ensure
> that this is reported, move print_dropped_signal to be inside the '(q ==
> NULL)' if-check.

OK, but print_dropped_signal() says "reached RLIMIT_SIGPENDING", this
is misleading if kmem_cache_alloc() fails.

> Link: http://lkml.kernel.org/r/20191203180221.7038-1-trix@redhat.com
> Signed-off-by: Tom Rix <trix@...hat.com>
> Reviewed-by: Andrew Morton <akpm@...ux-foundation.org>
> Cc: "Eric W. Biederman" <ebiederm@...ssion.com>
> Cc: Christian Brauner <christian.brauner@...ntu.com>
> Cc: Arnd Bergmann <arnd@...db.de>
> Cc: Roman Gushchin <guro@...com>
> Cc: Deepa Dinamani <deepa.kernel@...il.com>
> Cc: Oleg Nesterov <oleg@...hat.com>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> ---
> 
>  kernel/signal.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> --- a/kernel/signal.c~signal-move-print_dropped_signal
> +++ a/kernel/signal.c
> @@ -427,11 +427,10 @@ __sigqueue_alloc(int sig, struct task_st
>  	    atomic_read(&user->sigpending) <=
>  			task_rlimit(t, RLIMIT_SIGPENDING)) {
>  		q = kmem_cache_alloc(sigqueue_cachep, flags);
> -	} else {
> -		print_dropped_signal(sig);
>  	}
>  
>  	if (unlikely(q == NULL)) {
> +		print_dropped_signal(sig);
>  		atomic_dec(&user->sigpending);
>  		free_uid(user);
>  	} else {
> _
> 
> Patches currently in -mm which might be from trix@...hat.com are
> 
> signal-move-print_dropped_signal.patch
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ