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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150204104843.GD2896@worktop.programming.kicks-ass.net>
Date:	Wed, 4 Feb 2015 11:48:43 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Darren Hart <darren@...art.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Jerome Marchand <jmarchan@...hat.com>,
	Larry Woodman <lwoodman@...hat.com>,
	Mateusz Guzik <mguzik@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] futex: check PF_KTHREAD rather than !p->mm to filter
 out kthreads

On Mon, Feb 02, 2015 at 03:05:36PM +0100, Oleg Nesterov wrote:
> attach_to_pi_owner() checks p->mm to prevent attaching to kthreads and
> this looks doubly wrong:
> 
> 1. It should actually check PF_KTHREAD, kthread can do use_mm().
> 
> 2. If this task is not kthread and it is actually the lock owner we can
>    wrongly return -EPERM instead of -ESRCH or retry-if-EAGAIN.
> 
>    And note that this wrong EPERM is the likely case unless the exiting
>    task is (auto)reaped quickly, we check ->mm before PF_EXITING.
> 
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>

Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ