Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1902672ybt; Mon, 15 Jun 2020 12:24:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqhX8E7dR00C6zY+wMWObMPGhbzrQSVhg4jNRrZsk4Y7E6xvojuFtcXR+SnPWx1Qsqlgsj X-Received: by 2002:a05:6402:3106:: with SMTP id dc6mr6816975edb.375.1592249095258; Mon, 15 Jun 2020 12:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592249095; cv=none; d=google.com; s=arc-20160816; b=TxcGh/TvGWoEsUWBwP5ENzvU7JSdo5Y/mlkE4i3WhefihpvQXtFxj8Zf2yjdWX1fcv fD/0rX87KUgaL5OtZSV4FyzrZJjyQIwyz1ZVnNe5F3szmeFpXFWXPifWgqsAkcG5V3cz uvRqSiFdPvGA7yaCyaNkh3jv+pmVZYqVojx7uCAmsDi6M6o9015B/M55kpTVTWbFaTIE FEZDD0F2C+Ak/JNN41jFnjSQ2FqoYmrjNcboinPjByBIzAcFHnMTKcMWc/0RdmI6Mxwf Tmd0hXf/R4hSXkqazY4AIwJKl/qHtXpHSko/IlkLpCOX9tHN2658JIBKjH4GlmcTqC9j OJCw== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=HwRsf1wA8NUSGSOKG/QxGcXlEzglL7CjJxi7J6vRu78=; b=nkEJLqtnjDeH6KNtDSp/dJykHlMYC5KuLGCA12ptlNo4lctCOKtEtZet1EMeu8SXcD +Qqsh/fGzHt+nQFmqPxMAC9kWL1T1QzbiL1h8/HHUMJkBSEPwQNx89z2o+fDWhxCeQ1R AfEB5joq9bPdP6ZNfjS4iTkj0WvwtHGrWfS0jBSZEH6o7aZSSSfRzqljpAzJmEwRPFXc aIS4Rw+MofuL66J03mrudb8Kv6wAaOIbyzyKqyCdlS5kequzRXTV4Iw5fgrnTs5ErYGk jDoyfNx5IAT/7lyVLl7BbVZBd/hmLDfc8N5R+ES7hL1Ej6/D9cDM75nxDrNyNeYeVwZR uZBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MammdyoU; 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 f9si9531367edx.175.2020.06.15.12.24.33; Mon, 15 Jun 2020 12:24:55 -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=MammdyoU; 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 S1730722AbgFOPeC (ORCPT + 99 others); Mon, 15 Jun 2020 11:34:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729973AbgFOPeB (ORCPT ); Mon, 15 Jun 2020 11:34:01 -0400 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 435F2C061A0E; Mon, 15 Jun 2020 08:34:01 -0700 (PDT) Received: by mail-io1-xd42.google.com with SMTP id p20so18275452iop.11; Mon, 15 Jun 2020 08:34:01 -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:content-transfer-encoding; bh=HwRsf1wA8NUSGSOKG/QxGcXlEzglL7CjJxi7J6vRu78=; b=MammdyoUIwR0+8BMgOGo8Ubv1yDldOm8IhUp/SS/QLenCF/Ac02/4NFoTzA7MpVeOG PywyXf2yodud/GMNwOmMun5Z75iDu2ePtvDN0RNYETMBZGlmVSsaYThp1uqO+hnjAaUu k1nKEDoM10jrt4ec36o/fgZIpnxf94zjtdoyldYfJqLIGNTK8nsWW/EGQwqzjh/cqbs0 kkUJdOKz99T3BY7UJDY4ovGrm93fkjR7sC9BXi8sE6/iXyyLXx/lWtDDd8KNSO3OcIHn K8uin7wx8uMtjoKgq5/bZWyjEprNfaEw1Vvu9Miic4S3OLY3oB5/SfKJwzviYr1NUq8c DDWA== 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:content-transfer-encoding; bh=HwRsf1wA8NUSGSOKG/QxGcXlEzglL7CjJxi7J6vRu78=; b=U4+gQXrUahNLcOK3XeuNa0X5PKDiHlf/nPIFBYJD4n9aRvyLUMteLRjIu8x+CVoYQQ zeUMiN6aud2XA4mFoR00Fka5m2zooFkA5adS/iw4+xgwlme46elqJ1nir1dtvo2WjsqH clk50B/ARKKsRqe5iDjNsstY3IZRhiXxYp2Gcr3Dns7BXGWpxZPz3QyLfNskgtkKzXcG EQikbisUnIrUGST8Q9mUkkpNrseP4Qh1M3bp4ovsVS81Kq/99ASQjhMtU5tkNflRwpgB +dSzYSQMx8/HWUYKSxVcu0eIQagmAb6BDVLWykUav0lcaJYTpNYUqd+Sh93XoufNKA2z B68Q== X-Gm-Message-State: AOAM5325KuVwFMdxEcyBSrXMGVEICuPVgI6oHjzPd7AIkkH+0KbuLtoK xy7gYLJV2E9uNJnOI+0XBmr2yPgu02iJLcu6bQ== X-Received: by 2002:a02:896:: with SMTP id 144mr10534416jac.126.1592235240683; Mon, 15 Jun 2020 08:34:00 -0700 (PDT) MIME-Version: 1.0 References: <20200615130032.931285-1-hch@lst.de> <20200615130032.931285-3-hch@lst.de> <20200615141239.GA12951@lst.de> <20200615144310.GA15101@lst.de> <20200615150926.GA17108@lst.de> In-Reply-To: <20200615150926.GA17108@lst.de> From: Brian Gerst Date: Mon, 15 Jun 2020 11:33:49 -0400 Message-ID: Subject: Re: [PATCH 2/6] exec: simplify the compat syscall handling To: Christoph Hellwig Cc: Arnd Bergmann , 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" Content-Transfer-Encoding: quoted-printable 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 11:10 AM Christoph Hellwig wrote: > > On Mon, Jun 15, 2020 at 04:46:15PM +0200, Arnd Bergmann wrote: > > How about this one: > > > > diff --git a/arch/x86/entry/syscall_x32.c b/arch/x86/entry/syscall_x32.= c > > index 3d8d70d3896c..0ce15807cf54 100644 > > --- a/arch/x86/entry/syscall_x32.c > > +++ b/arch/x86/entry/syscall_x32.c > > @@ -16,6 +16,9 @@ > > #undef __SYSCALL_X32 > > #undef __SYSCALL_COMMON > > > > +#define __x32_sys_execve __x64_sys_execve > > +#define __x32_sys_execveat __x64_sys_execveat > > + > > > arch/x86/entry/syscall_x32.c:19:26: error: =E2=80=98__x64_sys_execve=E2= =80=99 undeclared here (not in a function); did you mean =E2=80=98__x32_sys= _execve=E2=80=99? > 19 | #define __x32_sys_execve __x64_sys_execve > | ^~~~~~~~~~~~~~~~ > arch/x86/entry/syscall_x32.c:22:39: note: in expansion of macro =E2=80=98= __x32_sys_execve=E2=80=99 > 22 | #define __SYSCALL_X32(nr, sym) [nr] =3D __x32_##sym, > | ^~~~~~ > ./arch/x86/include/generated/asm/syscalls_64.h:344:1: note: in expansion = of macro =E2=80=98__SYSCALL_X32=E2=80=99 > 344 | __SYSCALL_X32(520, sys_execve) > | ^~~~~~~~~~~~~ > arch/x86/entry/syscall_x32.c:20:28: error: =E2=80=98__x64_sys_execveat=E2= =80=99 undeclared here (not in a function); did you mean =E2=80=98__x32_sys= _execveat=E2=80=99? > 20 | #define __x32_sys_execveat __x64_sys_execveat > | ^~~~~~~~~~~~~~~~~~ > arch/x86/entry/syscall_x32.c:22:39: note: in expansion of macro =E2=80=98= __x32_sys_execveat=E2=80=99 > 22 | #define __SYSCALL_X32(nr, sym) [nr] =3D __x32_##sym, > | ^~~~~~ > ./arch/x86/include/generated/asm/syscalls_64.h:369:1: note: in expansion = of macro =E2=80=98__SYSCALL_X32=E2=80=99 > 369 | __SYSCALL_X32(545, sys_execveat) > | ^~~~~~~~~~~~~ > make[2]: *** [scripts/Makefile.build:281: arch/x86/entry/syscall_x32.o] E= rror 1 > make[1]: *** [scripts/Makefile.build:497: arch/x86/entry] Error 2 > make[1]: *** Waiting for unfinished jobs.... > kernel/exit.o: warning: objtool: __x64_sys_exit_group()+0x14: unreachable= instruction > make: *** [Makefile:1764: arch/x86] Error 2 > make: *** Waiting for unfinished jobs.... If you move those aliases above all the __SYSCALL_* defines it will work, since that will get the forward declaration too. This would be the simplest workaround. -- Brian Gerst