From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752438Ab3ATTg1 (ORCPT ); Sun, 20 Jan 2013 14:36:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:26833 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752317Ab3ATTg0 (ORCPT ); Sun, 20 Jan 2013 14:36:26 -0500 Date: Sun, 20 Jan 2013 20:35:42 +0100 From: Oleg Nesterov To: Linus Torvalds Cc: Dan Carpenter , Kernel Security , Michael Davidson , Suleiman Souhlal , Julien Tinnes , Aaron Durbin , Andrew Morton , linux-kernel@vger.kernel.org, Tejun Heo , Roland McGrath , Tony Luck , Fenghua Yu , Greg Kroah-Hartman Subject: Re: [PATCH 0/4] (Was: ptrace: prevent PTRACE_SETREGS from corrupting stack) Message-ID: <20130120193542.GA9241@redhat.com> References: <20130116181830.GA6469@redhat.com> <20130118153700.GA27915@redhat.com> <20130118172854.GA29753@redhat.com> <20130118175224.GA520@redhat.com> <20130118185559.GA3773@redhat.com> <20130120192448.GA6771@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130120192448.GA6771@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/20, Oleg Nesterov wrote: > > > And we'd need to make sure to re-set the WAKEKILL flag not just in all > > the callers of ptrace_check_attach(), but also in the failure case of > > wait_task_inactive(). I'm not sure it can actually fail if we cleared > > WAKEKILL, but it's all pretty subtle. > > Afaics it can't fail if we clear WAKEKILL... So 2/4 assumes it should > always succeed and adds the warning. Argh! It can, exactly because we can not kill may_ptrace_stop() yet. I'll update and resend 2/4. Oleg.