Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1646825ybt; Mon, 15 Jun 2020 06:03:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5AMUGpVMZBmN6Wv/4zV7LbpvKerXApdvey0RerL4xIxZrIz618OkwHWBDEkPZbZj7867A X-Received: by 2002:a17:906:1e92:: with SMTP id e18mr26622920ejj.254.1592226208829; Mon, 15 Jun 2020 06:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592226208; cv=none; d=google.com; s=arc-20160816; b=0Iv3mDfJsxU0GOPTNJVoBRnUQ33Y4rji3C/19RdeOPKYAExqeNez25/o+ItLVs6Vki u+QdtBpz0bBYnK+WOBqUJoZ1Qb/GxzQBoAcWzUwqLPmQCpfUpnPqVwDBLpR5ENoD0CgZ XMTRsWo9/8zcW9fJqF+uCCuwBwsZAftvYEXLiaD07f+Zb7SJ4x6x3vZ/03Wey0FAuQiU 2BqVY6RWWlyTIpvSyxW2z9aLh9cNSA9AT75FfxBo+9zdnpP346czGWN76cSyh1juzucQ yjuQ8ENAq5KVxQrBUGMx+yvPPNcss4rJcc7L0rdORi3pRbaRLXIBFsgupfestiQNq+jd Fd0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=KEBwjnYUxfYhJTwez4F4fZnZA29JFLpBE55ailzCXvU=; b=aaWorH+Ipo+YdZQtlqKq5aiiGGGeUo161awePc6qXtJqPkb5eJRSgLW8xbO30+O41n zj74PD2u83iwLZO6LIo5vjsm0FThZivxejzY2Z57G1VDD6GR1zhe1UQp244Qaxtlx4tA J+dmRxnAjDrJhhxBpIiNjKzDYSWi53OQRjsmAHDla0mjHfZnpvdN2jbOJrbYBwyEOGtg sXv6G82S0ZC4RkYZRPHp85qgA7tR2LZ1fyWSrY3/uvh7KqPhTor+t++hBRQgrSa5xQiO 0S2axNJkEK8gziYu1lADplZedjozVxI3A3Oi+UtXCkpYUiWzGxq8pPK106lKSx+iw24q CiSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=DgNA8zNj; 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 t22si4804509edt.28.2020.06.15.06.02.53; Mon, 15 Jun 2020 06:03:28 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=DgNA8zNj; 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 S1730229AbgFONAk (ORCPT + 99 others); Mon, 15 Jun 2020 09:00:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729977AbgFONAh (ORCPT ); Mon, 15 Jun 2020 09:00:37 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2023C061A0E; Mon, 15 Jun 2020 06:00:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=KEBwjnYUxfYhJTwez4F4fZnZA29JFLpBE55ailzCXvU=; b=DgNA8zNjg31fURBe4MXNxzAOhB NK3HSZHgIza8gTjAdkipWM3Ym6khB8DZ1Ua2lKEqsk4tChR51Rv6Nj5tQjHuqiwguPR1MTqqOvvVn ATtNL2LZr+Fd8c2w/Zj7gjJH5p4xd42seDJ5bXqk5d2VCQMt91YWdE22Y+ATPBXjMmnbBTqWS0Dd0 WC9a5c+5d0BUckpT8EBBuMnD6ZAGG8RnlfP6N+x8oECvP3pxtIr9pT9jH+TUIZfKlbL5tKsxJA+6t 4OnNPShuVQndS1ghp/bJMSINGJuiWu3E2lGr+9nhQG8ntYFYHPcdmIj4F16cvC9IPe1XdgSVWewgZ aNIELFwg==; Received: from 195-192-102-148.dyn.cablelink.at ([195.192.102.148] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jkoj4-0007nP-Cw; Mon, 15 Jun 2020 13:00:34 +0000 From: Christoph Hellwig To: Al Viro Cc: Arnd Bergmann , Luis Chamberlain , linux-arm-kernel@lists.infradead.org, x86@kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: properly support exec and wait with kernel pointers Date: Mon, 15 Jun 2020 15:00:26 +0200 Message-Id: <20200615130032.931285-1-hch@lst.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, this series first cleans up the exec code and then adds proper kernel_execveat and kernel_wait callers instead of relying on the fact that the early init code and kernel threads implicitly run with the address limit set to KERNEL_DS. Note that the cleanup removes the compat execve(at) handlers (almost) entirely, as we can handle the compat difference very nicely in a unified codebase. The only exception is x86 where this would list the handlers twice in the same syscall table due to the messed up x32 design. I had to add an extra compat handler just for that case, but maybe someone has a better idea.