Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2850555imu; Thu, 29 Nov 2018 11:12:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/X2RwT3AEZj+eDHVTsK5qWktK3dvAC4JKKjzMSwesBj3/bQS5zJ0YyUZH8WEHSIlUPdH86o X-Received: by 2002:a63:ae01:: with SMTP id q1mr1059300pgf.402.1543518753113; Thu, 29 Nov 2018 11:12:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543518753; cv=none; d=google.com; s=arc-20160816; b=WYDpCZW24Tzzt6C8rgbPDBx8YRO/hXDwPQVK3Jj0jwr2O/2WYD7MX037fzQnSwdlcL o+iYDdLuwLluOjM2XWZbQWIIviZaD1ISI68pnfbGAESE0OGp672DPowfDWpBMcXa27P0 +rN8h0IqKaIeXCfSm/Q73K81JBi3uGVDhWwbjuZOGHaJ7pkcbHIizP5k6rQ+7HCFVhIb 3hEBKt9GVjzTD6xeSN79KTLJpXCjBjb49hQqDcc63ezXR13HJsBXJcmFTvcd21EWP9kL L7YHat8MCpB6XFTYmFUTyEQHZTISGEZfULJ171WOSf9n8OQlThGDFfsdOi0+OVPEr03c ufuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:in-reply-to:references:subject :message-id:date:mime-version:from:content-transfer-encoding :dkim-signature; bh=sjEVMn0liqvoIHfq2mD9stZv6GAR5Xx9RFy0h3lk7r8=; b=czHwkAPz91lXcdi//o6Qa2nuHc7RRKQUV8K+NPuxifY9ebPSe13Ctlj6KWV6sicRrk 04k+g//WWMI6HbzM67/T8NX1n/qz6eVo4oIenZQfV6n5stWrlPTMn2pdHP4qi1aBsuyp nEuHIidm7japLke6dGj+O8PonPOM2lQg965BJw8wm4/aSmoFRg8Gk78HZmItnP2O3FYw XtWjjRlTSxTqrhahtix4EATCF2e3k3rNqTVocIZYd9ikPrLur5fOobax+XRvAVFR7J1S QaFLXRLgMslF25U95ATbJGTixKt88VUXJlmqqzM0OnLFPOJzwbdgDfOPTTO/PnQSbH40 o6fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=SqurfwQt; 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 v8si2896835ply.126.2018.11.29.11.12.17; Thu, 29 Nov 2018 11:12:33 -0800 (PST) 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; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=SqurfwQt; 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 S1729916AbeK3EAp (ORCPT + 99 others); Thu, 29 Nov 2018 23:00:45 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:46716 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729753AbeK3EAo (ORCPT ); Thu, 29 Nov 2018 23:00:44 -0500 Received: by mail-pl1-f195.google.com with SMTP id t13so1304427ply.13 for ; Thu, 29 Nov 2018 08:54:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:date:message-id:subject :references:in-reply-to:to:cc; bh=sjEVMn0liqvoIHfq2mD9stZv6GAR5Xx9RFy0h3lk7r8=; b=SqurfwQtjebAQti1RfLbOLm32r4VnLtr22/JoWBKa1g0tbaT5T5XTZpEQ5bU55rmHo E0NijTuUVlb/Ze0RALN2rbzbgbKjlhSMv7JbZOF+MO12XZ+J8QS6s0G0TRmFvEBCYqDw MkWid0XKSW9d/YScIcs/aYFtwnowglwDDfcNjCuMSn2UkL9+HnXwXqysrzXl59tA2HNA Q5zf6MTxipEHW0pnKXS8ZxxQopg7XmAfIclYehHMm+B+0oQSpDW4K/64Cq+UMcXKbTUC oh7JfoFMeT9ZHcCYhaUzrMkezUwMScErsnyYSWFQ42Omg0SsSfpzU+/oc7OFI7HSn39c p13g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version:date :message-id:subject:references:in-reply-to:to:cc; bh=sjEVMn0liqvoIHfq2mD9stZv6GAR5Xx9RFy0h3lk7r8=; b=GvH7hS7s8WeAGDttdAjb0GXD25SzLC7Hz5X923zPl8Mgf1kBoPK7G52rMUXi8O6TuR J5Z033WytSWWY/ErnV31eHNOSNJv6NqpYUbAJdn0MKtRlzMxIIj81eO8Arp13jI56WZd fe2iIJi5n2/XafShmmfmfsESAJgTg6QSBgFfi4/ABVKORyg8amzxdEZdELHNPADbXchp obLFmLzUzrjzsygcB+Mu3C6kYUlUhPQ/ylyDd27zVIt7yZ8nNX/3bZX3rq14IACs2BxF YbYxED+x3FlGRm6heCqw4MCDnuaXoFWeV3M9e5oF58jR0DSCnJwkRFkb6edChG8GQ+E8 FkkA== X-Gm-Message-State: AA+aEWYBqv9Xq12yBCC6rgzvMqTu6Fd1s8YA9Dl1Uko2N9C2rqtw6mQ6 Pmm9xgaYGkxnilnegZy73GbL+Q== X-Received: by 2002:a17:902:8a95:: with SMTP id p21mr2227355plo.183.1543510483898; Thu, 29 Nov 2018 08:54:43 -0800 (PST) Received: from ?IPv6:2600:1010:b054:ff26:3849:a65d:14d0:f668? ([2600:1010:b054:ff26:3849:a65d:14d0:f668]) by smtp.gmail.com with ESMTPSA id e23sm3547346pfh.68.2018.11.29.08.54.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 08:54:42 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andy Lutomirski Mime-Version: 1.0 (1.0) Date: Thu, 29 Nov 2018 08:54:18 -0800 Message-Id: <36323361-90BD-41AF-AB5B-EE0D7BA02C21@amacapital.net> Subject: Re: [PATCH v2] signal: add procfd_signal() syscall References: <20181120105124.14733-1-christian@brauner.io> <87in0g5aqo.fsf@oldenburg.str.redhat.com> In-Reply-To: <87in0g5aqo.fsf@oldenburg.str.redhat.com> To: Florian Weimer Cc: Christian Brauner , ebiederm@xmission.com, linux-kernel@vger.kernel.org, serge@hallyn.com, jannh@google.com, luto@kernel.org, akpm@linux-foundation.org, oleg@redhat.com, cyphar@cyphar.com, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, dancol@google.com, timmurray@google.com, linux-man@vger.kernel.org, Kees Cook X-Mailer: iPhone Mail (16B92) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Nov 29, 2018, at 4:28 AM, Florian Weimer wrote: >=20 > Disclaimer: I'm looking at this patch because Christian requested it. > I'm not a kernel developer. >=20 > * Christian Brauner: >=20 >> diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/sysc= alls/syscall_32.tbl >> index 3cf7b533b3d1..3f27ffd8ae87 100644 >> --- a/arch/x86/entry/syscalls/syscall_32.tbl >> +++ b/arch/x86/entry/syscalls/syscall_32.tbl >> @@ -398,3 +398,4 @@ >> 384 i386 arch_prctl sys_arch_prctl __ia32_compat_= sys_arch_prctl >> 385 i386 io_pgetevents sys_io_pgetevents __ia32_compa= t_sys_io_pgetevents >> 386 i386 rseq sys_rseq __ia32_sys_rseq >> +387 i386 procfd_signal sys_procfd_signal __ia32_comp= at_sys_procfd_signal >> diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/sysc= alls/syscall_64.tbl >> index f0b1709a5ffb..8a30cde82450 100644 >> --- a/arch/x86/entry/syscalls/syscall_64.tbl >> +++ b/arch/x86/entry/syscalls/syscall_64.tbl >> @@ -343,6 +343,7 @@ >> 332 common statx __x64_sys_statx >> 333 common io_pgetevents __x64_sys_io_pgetevents >> 334 common rseq __x64_sys_rseq >> +335 64 procfd_signal __x64_sys_procfd_signal >>=20 >> # >> # x32-specific system call numbers start at 512 to avoid cache impact >> @@ -386,3 +387,4 @@ >> 545 x32 execveat __x32_compat_sys_execveat/ptregs >> 546 x32 preadv2 __x32_compat_sys_preadv64v2 >> 547 x32 pwritev2 __x32_compat_sys_pwritev64v2 >> +548 x32 procfd_signal __x32_compat_sys_procfd_signal >=20 > Is there a reason why these numbers have to be different? >=20 > (See the recent discussion with Andy Lutomirski.) Hah, I missed this part of the patch. Let=E2=80=99s not add new x32 syscall= numbers. Also, can we perhaps rework this a bit to get rid of the compat entry point?= The easier way would be to check in_compat_syscall(). The nicer way IMO wo= uld be to use the 64-bit structure for 32-bit as well.