From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BD41C2BA2B for ; Sun, 19 Apr 2020 08:19:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 70CD92145D for ; Sun, 19 Apr 2020 08:19:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725963AbgDSIT3 (ORCPT ); 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64209C2BA2B for ; Sun, 19 Apr 2020 08:23:17 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DDE5B2145D for ; Sun, 19 Apr 2020 08:23:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DDE5B2145D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 494jWk2cKyzDqW2 for ; Sun, 19 Apr 2020 18:23:14 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lst.de (client-ip=213.95.11.211; helo=verein.lst.de; envelope-from=hch@lst.de; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=lst.de Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 494jRQ3vkBzDqbC for ; Sun, 19 Apr 2020 18:19:30 +1000 (AEST) 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" 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) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, Jeremy Kerr , linux-fsdevel@vger.kernel.org, Andrew Morton , linuxppc-dev@lists.ozlabs.org, Christoph Hellwig , Alexander Viro Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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.