Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2438537ybz; Sun, 19 Apr 2020 01:20:53 -0700 (PDT) X-Google-Smtp-Source: APiQypILW3qqh9010UUJ9I2rvwQFjg6d3kg576UHKDe2I2adBVzf2l90jXpZpInkp7iqdp6fsKVS X-Received: by 2002:aa7:d413:: with SMTP id z19mr2189850edq.80.1587284453164; Sun, 19 Apr 2020 01:20:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587284453; cv=none; d=google.com; s=arc-20160816; b=BWcYSm6Q7zvBPAaloL7FfAuHQS/r1HyXeYmrDiLiNXBS4hYaBdVaHP6Yp5064v/SLP nKAvALnEt1GA6GSyV5a6gO+Vr1P4AVXeijFJTgWz9qSM//dikqMCha7sPal3g3zEOvDY BuPVOOrN9v8GQ8wercVqLMviAim8gBzDLp2wv0c4QqPC+Yi3Nz8w/99CUEp4V/Qe2WEi EyrpbuJVCMawKJtSWHRWi03cmTyz+pzHxLPpuMhEiWs05lKpPMsnLw/Q0MS/URJ8d9KD qji8Te+TsdTVtaTxRRjnBuJ9QNAQd3hzWvh06dLjHNGzCUzU3rWlCCGtj2QxHomsa4hB rpEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=16twB8ELjEWTWpKhIG68hRWBKlA24nHFr8TioIexm5w=; b=g3a3Ltlokmg7zNti7QuLeKhgv8Q08uFbPqbs2yN86q4l0RCrjUF6EsygnFPgPCpakf QtEbCmr6as9UpO6mh4CNzI+tEM6165NDs3NmtpeSfaaaG/4ab8TquD2OdStkS0bFiXvU +tW+3ylg+315ql80B1GSqFe2EHykKV+df5IAHomlk8i9q9EZ0f5SRpzIP9A6aDjRkv2b CfEmP1HrsgA27aXJqebXMd11CtbW+NeNBiCGCXw9O0ZmoQrZyHJbIhbJ6hmaFcnINHFI 5odpf56dTFFAVvtVpnzequLpWFEVDEYOTkKQ0vbZDG65CRcq5wNlQozeCwKoeNk2s+n7 I6Hw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq7si2548179edb.319.2020.04.19.01.20.30; Sun, 19 Apr 2020 01:20:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725948AbgDSIT3 (ORCPT + 99 others); Sun, 19 Apr 2020 04:19:29 -0400 Received: from verein.lst.de ([213.95.11.211]:35777 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgDSIT3 (ORCPT ); Sun, 19 Apr 2020 04:19:29 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 5319B68BEB; Sun, 19 Apr 2020 10:19:26 +0200 (CEST) Date: Sun, 19 Apr 2020 10:19:26 +0200 From: Christoph Hellwig To: "Eric W. Biederman" Cc: Christoph Hellwig , Andrew Morton , Alexander Viro , Jeremy Kerr , Arnd Bergmann , linuxppc-dev@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: remove set_fs calls from the exec and coredump code v2 Message-ID: <20200419081926.GA12539@lst.de> References: <20200414070142.288696-1-hch@lst.de> <87r1wl68gf.fsf@x220.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87r1wl68gf.fsf@x220.int.ebiederm.org> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 17, 2020 at 05:41:52PM -0500, Eric W. Biederman wrote: > > this series gets rid of playing with the address limit in the exec and > > coredump code. Most of this was fairly trivial, the biggest changes are > > those to the spufs coredump code. > > > > Changes since v1: > > - properly spell NUL > > - properly handle the compat siginfo case in ELF coredumps > > Quick question is exec from a kernel thread within the scope of what you > are looking at? > > There is a set_fs(USER_DS) in flush_old_exec whose sole purpose appears > to be to allow exec from kernel threads. Where the kernel threads > run with set_fs(KERNEL_DS) until they call exec. This series doesn't really look at that area. But I don't think exec from a kernel thread makes any sense, and cleaning up how to set the initial USER_DS vs KERNEL_DS state is something I'll eventually get to, it seems like a major mess at the moment.