Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9385C433F5 for ; Wed, 5 Jan 2022 04:25:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237343AbiAEEZg (ORCPT ); Tue, 4 Jan 2022 23:25:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237052AbiAEEZe (ORCPT ); Tue, 4 Jan 2022 23:25:34 -0500 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F283C061761; Tue, 4 Jan 2022 20:25:34 -0800 (PST) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4xre-00HNOY-55; Wed, 05 Jan 2022 04:25:30 +0000 Date: Wed, 5 Jan 2022 04:25:30 +0000 From: Al Viro To: Heiko Carstens Cc: "Eric W. Biederman" , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Linus Torvalds , Alexey Gladkov , Kyle Huey , Oleg Nesterov , Kees Cook , Vasily Gorbik , Christian Borntraeger , Alexander Gordeev Subject: Re: [PATCH 01/10] exit/s390: Remove dead reference to do_exit from copy_thread Message-ID: References: <87a6ha4zsd.fsf@email.froward.int.ebiederm.org> <20211208202532.16409-1-ebiederm@xmission.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 12, 2021 at 06:48:56PM +0100, Heiko Carstens wrote: > On Wed, Dec 08, 2021 at 02:25:23PM -0600, Eric W. Biederman wrote: > > My s390 assembly is not particularly good so I have read the history > > of the reference to do_exit copy_thread and have been able to > > verify that do_exit is not used. > > > > The general argument is that s390 has been changed to use the generic > > kernel_thread and kernel_execve and the generic versions do not call > > do_exit. So it is strange to see a do_exit reference sitting there. > > > > The history of the do_exit reference in s390's version of copy_thread > > seems conclusive that the do_exit reference is something that lingers > > and should have been removed several years ago. > ... > > Remove this dead reference to do_exit to make it clear that s390 is > > not doing anything with do_exit in copy_thread. > > > > Signed-off-by: "Eric W. Biederman" > > --- > > arch/s390/kernel/process.c | 1 - > > 1 file changed, 1 deletion(-) > > Applied to s390 tree. Just in case you want to apply this to your tree too: > Acked-by: Heiko Carstens FWIW, this frame->childregs.psw.addr = (unsigned long)__ret_from_fork; is also pointless. We do want psw.mask (if nothing else, __ret_from_fork() that is called by ret_from_fork() will, in effect, check user_mode(task_pt_regs()). But psw.addr is, AFAICS, pointless - the only way the callback is allowed to return is after successful kernel_execve(), which would set psw.addr; moreover, psw.addr is meaningless until that happens.