Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4540090ybb; Tue, 7 Apr 2020 09:24:29 -0700 (PDT) X-Google-Smtp-Source: APiQypJ9mFBHu8anWGZ+qlvwP3mR7tSTEeFZXQDwdjHLHGqtXE8p3E/uNX7UmRXO7J2YgHpMn00j X-Received: by 2002:aca:8ce:: with SMTP id 197mr75935oii.35.1586276669834; Tue, 07 Apr 2020 09:24:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586276669; cv=none; d=google.com; s=arc-20160816; b=bHP/RNm0ASrcvbMd3eMERGyJEyB32bLp2kbavpd83JyORORLqLiwImraxHLISGMRgm SfAWENOd28YXDoFIANmFKrHFyqxJjHZ0oTcij2qLsTPbOcgZsqFAb5UkCg0PPF95aI6v f3O9u0dqEfqcQbn5W00U6Ed8q1inKn9FP5LaGi0CPtLFc/dnwJcj1Ci5f8EC1BRTfrQN Yzw+RTTCWR5KRy0zI/AsatpZClBhc1qYCcmFOo/aUwkOvfEYXMkSnWDb7CcF6GZoCT+R c/5R9VtVb8D9FXf8JU/jI9I4N4sq1BqB8TOki30KrXi3jBPN33LWxefzJ1QYl4qwS6FG EsNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=yv0LxUpmiEKePLuk8nlZBk2TNBUDpgS9yaRiM7OgQTg=; b=lV1k3jKMnEROYLO/qIyDunq4lsBij7GnZjN9mKy8DgryrswTdDnROml8C0GnXBQDjG WGcv1g9IuK6fpYx8tWhgiEDpBHWIcup9KG/EdtCQLnNHFHTI8tj0wQIOSFU1sJqc0Q8g amLC1ss8ajbTsWp7ewQIO1KDv2JJLbWxgnfsxJS5PmgZwOKbtnpwDus+QDxziILSLqkn TIQgbP7Tzyo+ZcM1jgyEME+R1daZG2TtopZ4QiUCFZX1dqxFOwbinYoVw2/VpHcYAxEx UCGZxRraAwJLHjOWW+zH24ddOh2EWPIbKaFZJwkOL8Bvz6Xw0kK53v9uOQ/3nHWI4zM0 allQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k201si881925oib.94.2020.04.07.09.24.17; Tue, 07 Apr 2020 09:24:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728338AbgDGQWR (ORCPT + 99 others); Tue, 7 Apr 2020 12:22:17 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:56038 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727582AbgDGQWR (ORCPT ); Tue, 7 Apr 2020 12:22:17 -0400 Received: from ip5f5bf7ec.dynamic.kabel-deutschland.de ([95.91.247.236] helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jLqzN-0007M8-Uz; Tue, 07 Apr 2020 16:22:14 +0000 Date: Tue, 7 Apr 2020 18:22:13 +0200 From: Christian Brauner To: "Eric W. Biederman" Cc: Linus Torvalds , Bernd Edlinger , Linux Kernel Mailing List , Alexey Gladkov , Oleg Nesterov , Kees Cook , Jann Horn Subject: Re: [RFC][PATCH 0/3] exec_update_mutex related cleanups Message-ID: <20200407162213.tgdjzgzwrebqxchc@wittgenstein> References: <87blobnq02.fsf@x220.int.ebiederm.org> <87lfnda3w3.fsf@x220.int.ebiederm.org> <87wo6s3wxd.fsf_-_@x220.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87wo6s3wxd.fsf_-_@x220.int.ebiederm.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 06, 2020 at 08:29:50PM -0500, Eric W. Biederman wrote: > > Linus, > > Since you rightly pointed out the code in fs/exec.c is less readable > than it should be right now. Here is where I currently sit on making > that code static where possible and as obvious as possible. > > I will resend this after the merge window for a proper review when > people are less likely to be distrcacted but I figured I might as well > send this out now so I can see if anyone runs screaming from this code. > > Eric W. Biederman (3): > binfmt: Move install_exec_creds after setup_new_exec to match binfmt_elf > exec: Make unlocking exec_update_mutex explict > exec: Rename the flag called_exec_mmap point_of_no_return Under the assumption that we go forward with this approach this seems like a good cleanup. Acked-by: Christian Brauner