Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1915990ybt; Mon, 15 Jun 2020 12:49:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPGRy7znQdqhJCXmIt6IA8Qq83pmBxYRbV02f+CID+g1eFY254GFcsQbrNPs/m2OunAK4K X-Received: by 2002:a17:906:ae88:: with SMTP id md8mr28470959ejb.347.1592250582744; Mon, 15 Jun 2020 12:49:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592250582; cv=none; d=google.com; s=arc-20160816; b=hY4sJUhIwPbwTWW5cyb8rAWgST//jXtI2N6rXtiukb7Q/uriun3JDbgL7EzEP36G1m qXFEoybsV/ooTeIloeBhZnrDuUBraOndade6U61ZNsVCcOSwPUvVyYFgczBKzaQC/OVz ikqXCiTeZ6KUO75bVyDaun9LRTeZ3BymlRT2bob6zsMKYCe0oZPHpqHk5aNMhqpoTqF0 k6dEHBryz/UkdIcMDTYqotcKjoJnzQ0w5lTCjpVj5KMV3GBCWxrKZTVBV89WmeT1p8ux 36Yo27yIBqQWSkZfZ/D9AJFfEc4sGSOQItciLJ2mvjNIE+NRtNaYcbZxj9uWQRLtijx2 otuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=GcEsP5XHkAYWjVB1MFDssViF4cxMQLWXk2Kgbxji0hs=; b=PvEosihoYxo+eMpGFpoyZSWF23vZrw930FPuIBPSR0jw5B4qNgWRfic0jc4WcHyVk0 0GSIhG45Url7xj6RwPO1oBydzBCHJmA3Gy60bXreyPKDIpTIOgf15H+Mz7CW1PmS1Mtx nnnWytd0yi86JuVghDz2kSF/AZJHr0gNBnuor7j9pG126xLH6Z8MttjPbdbA/E2FJ84R otAHQVcBtqb2jxhxxx3ox4lzyHJq1a5j29ZVVxiCViUFEizi1BhQESDilA6NYqsYB6eE tFJBNZpUMquUH1PrfAE0JW+/bpHYphCmf8jIunHu1IUvGsFU/VEi7IldcXIZrCLwA6Kv OLnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d1N76KYX; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lx2si9800297ejb.284.2020.06.15.12.49.20; Mon, 15 Jun 2020 12:49:42 -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=pass header.i=@gmail.com header.s=20161025 header.b=d1N76KYX; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730923AbgFOTph (ORCPT + 99 others); Mon, 15 Jun 2020 15:45:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728773AbgFOTph (ORCPT ); Mon, 15 Jun 2020 15:45:37 -0400 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E851C061A0E; Mon, 15 Jun 2020 12:45:36 -0700 (PDT) Received: by mail-io1-xd41.google.com with SMTP id s18so19321344ioe.2; Mon, 15 Jun 2020 12:45:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GcEsP5XHkAYWjVB1MFDssViF4cxMQLWXk2Kgbxji0hs=; b=d1N76KYXqQ1fpaIX30dgZBqRd8wI/sojfUihP9H9n7SrJl5fw8AIM1QjJHFUie0ynn Ba7u2YUNcGPgUH5k5/xR7j1g1AD4ubDfekbuaJsUIn8tpQbEqATe7gJrtx3bqoUJmH4s 5+bquUS4RYotC8sNbFVFKTlUv9aULk2bwxwqhhxgC1NWXrZ2b3J+MnEA2epJN5YcPwJd seJUjothmBUqRpHkR2X5MhScZehYA2HegUeEnFWW4JD2VuEs9SDBgZ0eGzbMT5M7oi0/ XAULqncIPF3a7VQsBQHJiygHfxiVk4UqM7Xb3uuuIVXJb73uzIjZdrMQlG7Z9vwbj0Z+ CyHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GcEsP5XHkAYWjVB1MFDssViF4cxMQLWXk2Kgbxji0hs=; b=oD8rqe1WbSqXPeGF+kDGc8ny/y8ZwR4nKi3K9xLvoeN5cmrNEsfuIvRKjrB9b7cCiJ aDCzAMYetaJJYLn4POxwKcLWyDI6do9l4LZ0aeCbK2KLF3ogWlhDpI8t563TOxzlbiZi XsZTmklNrV1zI+xAv3WWoQcNa3ktsCTo2/rDEpvnpDmW6nmx08TKX5jQtJTPE6WEr6wT +KIDoOpMRYvPoSjcw46UA9Xq02vIsOmDgE92qyte4GfseqBE8SDPaTjV9IN2h423Pu1U Yk/lBu3IiMSLLtpuLiRGJeYlp8q905CasW9zE37EJjIJPmzDMe+v1HFJb6r1JIQDTV09 8loQ== X-Gm-Message-State: AOAM5319MNyHR3uHQK7Fo+4VDz/IfJHwZzc5RA/G6XG2nu1ijlVfVvDg SRSa0DwKOOS+q/xtbhN83gIl0E1UlgXQQZlNUA== X-Received: by 2002:a05:6602:80b:: with SMTP id z11mr29222473iow.109.1592250335524; Mon, 15 Jun 2020 12:45:35 -0700 (PDT) MIME-Version: 1.0 References: <20200615130032.931285-1-hch@lst.de> <20200615130032.931285-3-hch@lst.de> <20200615141239.GA12951@lst.de> In-Reply-To: From: Brian Gerst Date: Mon, 15 Jun 2020 15:45:24 -0400 Message-ID: Subject: Re: [PATCH 2/6] exec: simplify the compat syscall handling To: Arnd Bergmann Cc: Christoph Hellwig , Al Viro , Luis Chamberlain , Linux ARM , "the arch/x86 maintainers" , "open list:BROADCOM NVRAM DRIVER" , Parisc List , linuxppc-dev , linux-s390 , sparclinux , Linux FS-devel Mailing List , linux-arch , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 15, 2020 at 2:47 PM Arnd Bergmann wrote: > > On Mon, Jun 15, 2020 at 4:48 PM Brian Gerst wrote: > > On Mon, Jun 15, 2020 at 10:13 AM Christoph Hellwig wrote: > > > On Mon, Jun 15, 2020 at 03:31:35PM +0200, Arnd Bergmann wrote: > > > > > > > I'd rather keep it in common code as that allows all the low-level > > > exec stuff to be marked static, and avoid us growing new pointless > > > compat variants through copy and paste. > > > smart compiler to d > > > > > > > I don't really understand > > > > the comment, why can't this just use this? > > > > > > That errors out with: > > > > > > ld: arch/x86/entry/syscall_x32.o:(.rodata+0x1040): undefined reference to > > > `__x32_sys_execve' > > > ld: arch/x86/entry/syscall_x32.o:(.rodata+0x1108): undefined reference to > > > `__x32_sys_execveat' > > > make: *** [Makefile:1139: vmlinux] Error 1 > > > > I think I have a fix for this, by modifying the syscall wrappers to > > add an alias for the __x32 variant to the native __x64_sys_foo(). > > I'll get back to you with a patch. > > Do we actually need the __x32 prefix any more, or could we just > change all x32 specific calls to use __x64_compat_sys_foo()? I suppose that would work too. The prefix really describes the register mapping. -- Brian Gerst