Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2646992ybz; Mon, 27 Apr 2020 01:35:09 -0700 (PDT) X-Google-Smtp-Source: APiQypIb9FzNChMZsM7KlpDyEMAM+/tLjvU/ILVDu6BrSUuqchnpMjBpCSAQvNz/Bt9MezQvnigq X-Received: by 2002:a05:6402:b2e:: with SMTP id bo14mr18194350edb.90.1587976509254; Mon, 27 Apr 2020 01:35:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587976509; cv=none; d=google.com; s=arc-20160816; b=Zi086yEpqc9gOswBSl5O/h4SM0KpRVlFRr9TInHd+gyjLmvtnHUvjNuP0Jq/6R2idE Csjj9tnOYI7PYVr/WsvsRdn0LCsW5xjBYH27pKuqwC1KRPzKwA5lKnSV39XazTuIoYtN B6caXj/aMrglEuW1cf6RCbue+Hno7Ob1e3qHDSg7/s7ltGCMGONAb7j/hoM47JyWcyam LC9OCEkSwEaxnchwZaHGzITUTV0dfhQDAq0DjnfVdePO+5jXIa6CdTAJn5r14UJoqjkD pO9nlIse+WlYsJ8qDYlRvnaF1FfCq7gPpVq340upwc5DB73+FcDMVLPHZZFdbJ7wxLgJ /t7A== 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; bh=aD4fl6rdOhDrlGKKp16Xh7RVibkwXi+u7yBtPovHra8=; b=Njn4qh2QabJWZMnQO56du1c8sFGuRGG1uhzkoTEnshUgVfBvjODue2mOZxPTzCGOit Oao+GgJz0S/XcyrqWsu2TUxvTHUimzW8jMjse1NbPbgkPj+WKXaKSROiBRybgkgOSNZl IKwPy68fFDCBopihwIRvllXuv9Rh5ucYVpwZaIjFQ0vNUY0ftl/DUYXI7y6NFwelavzy sMcWU6zLWH6xDnNKLiyh4ufcVcEydxHMiWJMiIKl8VTQMkH9j6FYUueXtaO+IVLkPC6x ORKX3qAF3mbmX5PQ5mL5IbBwUcYLrt8VnVIOTngKwEl+hNYhEfTXP1lSCLW+uyEHyWkW Y1fA== ARC-Authentication-Results: i=1; mx.google.com; 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 gy15si8333675ejb.71.2020.04.27.01.34.45; Mon, 27 Apr 2020 01:35:09 -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; 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 S1726812AbgD0IbS (ORCPT + 99 others); Mon, 27 Apr 2020 04:31:18 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:37097 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726003AbgD0IbS (ORCPT ); Mon, 27 Apr 2020 04:31:18 -0400 Received: from mail-lj1-f172.google.com ([209.85.208.172]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPSA (Nemesis) id 1MofLl-1irjgI1R1N-00p50y; Mon, 27 Apr 2020 10:31:15 +0200 Received: by mail-lj1-f172.google.com with SMTP id u15so16648780ljd.3; Mon, 27 Apr 2020 01:31:15 -0700 (PDT) X-Gm-Message-State: AGi0Pub4gB4bImFEreZ0CJ+ic2dvZsupwqTelv3PMwzXMr7hnhDIrHRI Y6R+GqDFIoOypwCRV88g72Vbm+23GYE2J3L3rZU= X-Received: by 2002:a2e:6a08:: with SMTP id f8mr14221730ljc.8.1587976274762; Mon, 27 Apr 2020 01:31:14 -0700 (PDT) MIME-Version: 1.0 References: <20200426130100.306246-1-hagen@jauu.net> <20200426163430.22743-1-hagen@jauu.net> In-Reply-To: <20200426163430.22743-1-hagen@jauu.net> From: Arnd Bergmann Date: Mon, 27 Apr 2020 10:30:58 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC v2] ptrace, pidfd: add pidfd_ptrace syscall To: Hagen Paul Pfeifer Cc: "linux-kernel@vger.kernel.org" , Florian Weimer , Al Viro , Christian Brauner , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Brian Gerst , Sami Tolvanen , David Howells , Aleksa Sarai , Andy Lutomirski , Oleg Nesterov , "Eric W . Biederman" , Arnaldo Carvalho de Melo , Sargun Dhillon , Linux API , linux-arch Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:Ka4Wm7MWpM+RNPW+QnUrj+KN1kAsR6elSC0XDqoA8soDzQb/X2T dc1KNnKCX6vkbXFfCf7GobHBRU/cUMboiRMV9FMH36/GOXLfVHehc+7+/8Q8oPQDvrKa6yZ VQINi3VyZoNwOyNfG8w8SP4ACuniR/EhrwMEYocsMkquHI5A7WOtTbess1zDtq7uDRKWUJQ +ij/uUTavuJaNjTPnVRlQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:jeH6gxgpOBQ=:WSbGomqreVARHjUgq/R0V0 bnDjO/HUhOTfQraVzrZRbsDwiKi9NziWBZ0CinMa7Wp6/VVMNrY493GNIthT9TVTAyrnMlvsx 8frDniMbLeXi+3E05XY4LUJOXgholG09R4xgWMT+WgOAYmExIdssUDyn+xAqgFBHQzCvtyspY fLuJaSOHA/bNrYZ9CFiwV1Uf/+k74ynyZVTegwiMBV7ic0RzFJvDnBazzhbxrAypXeOE3N27E QeVKBCWl5HSMrL8lOXdEEvUiGz7tGo1KWzy16dQJUEmOCsvQRx7B9XDcRbeM2kTrWUbLFh1tF /2NiHQvUWml3d9pE2Wh8CTyZnefedZsbcSaYGH+4bOv2e2Z31iJ4rSUElfTUlPkDv7ajdK59C SYL2n/aNeQ/h2AU1J0mYsLM90aCYBDPxuc3TJVTa9GNJ8zvyvBLc8IapHcY6kuK6ne4tz0+bI LUvJhhlDsRFku7HtWBchhfG9TQsUrLk9RQXq6G3vN0xVmeoWndJVzjL3hMa7q4KQkkflt2oDU MUS7KnJV53QjM9XcQQq6Gf/Tph/ob+nfq4rYcvz30JP3H3EPnTD1yQv+X3H4GLGSwhqzNhX2A bZFPvz3nhLNNS3dN4zoJIrKRy3CdPa1PD9l8qLsiGVJ68RnniVj0N9+tp18OyfC7hbZd94VsB xLwRmN6/r7kCHUVS0OyjjabDTazp1whdfmQsWm/Wrg1Uka9zdXd462IUhZeIlIU/G9AtUdOw7 2VHMbilcLqeki9Qu7+VTzGomlwPBT09WPTKE53GHwG6xPksnN88yuxgQJJprVavqbY5eKRA0v sCwoMe/XUmN+P1S7WBLusxB/KXdHjJf0qGCrC+3AHCCf0ntX3Y= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > arch/x86/entry/syscalls/syscall_32.tbl | 1 + > arch/x86/entry/syscalls/syscall_64.tbl | 1 + > include/linux/syscalls.h | 2 + > include/uapi/asm-generic/unistd.h | 4 +- When you add a new system call, please add it to all architectures. See the patches for the last few additions on how to do it, in particular the bit around adding the arm64 compat entry that is a bit tricky. It may be best to split out the patch changing all architectures from the one adding the new syscall. > +SYSCALL_DEFINE5(pidfd_ptrace, int, pidfd, long, request, unsigned long, addr, > + unsigned long, data, unsigned int, flags) > +{ When you add a new variant of ptrace, there also needs to be the corresponding COMPAT_SYSCLAL_DEFINE5(...) calling compat_ptrace_request(). If you want, you could unify the native and compat code paths more by merging compat_ptrace_request() into ptrace_request() and using in_compat_syscall() checks for the ones that are different. This also would best be done as a separate cleanup patch upfront. Arnd