From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62174C433B4 for ; Fri, 14 May 2021 03:18:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 278496143E for ; Fri, 14 May 2021 03:18:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231362AbhENDTv (ORCPT ); Thu, 13 May 2021 23:19:51 -0400 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:41147 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229984AbhENDTu (ORCPT ); Thu, 13 May 2021 23:19:50 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id 8E09A58129C; Thu, 13 May 2021 23:18:39 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 13 May 2021 23:18:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.luto.us; h=subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=b e7rDCROltBLN4RZPe+I3AnBxPdRYbt9l4ad1PTcfz0=; b=H5jqFKBqMEpTu2kD7 lwS3SJfSH/EoqZFaEni6P7KDSaRT9nFAX46qMQe202aUAjOT5ZLPW52RNe5O93oO YN5BKaG3MWabci6F05t0Rw/AR8Q/nRRruEgFeMih+KbpxdTO7zfxDtLOwicXaLf+ gsk7Ci1uAtajtEwM+CMJKoKGz3JhHHVJ9rfyb9orUAXN705IM4xu9rGKwQBEYHPH ne+RLyRAk8aUM7MOq3+GYcnIbKBTHhvOFYyNQPcNdNmmqoGXuq1JLyyegzRzmZj1 Hgx8OYg5VomZ24pgwr2V0ghGS1R6iKL0zlrE7fqhPw9J+w5wGD6VglxRkL5aH5aY x6s2w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=be7rDCROltBLN4RZPe+I3AnBxPdRYbt9l4ad1PTcf z0=; b=UJ1J1ysSShDrJiYbpvSSEKvZdSPdQcbz7J0IPVZYaBCD7rOHlYRctp5Xa n1kVPgButVLCgBn1eqBMiP7E8CGmQ3ZoDcAVq516Xim6My4bAvc80OD55bZj9NV6 MNtKxfs2Yb3mZjF8z63p2zKbMSAmZ+1wvswuHRqB/+v9mupwxr2IlLRWHkVOsEek 1b0bYSaJnSfiDk9ies7GWOuwTSSfdFan8jEkrwsihtTLdQshoq6owfOLdIaoWgcR 2VI6i+kDwVSeFWg3rKyRVYkxzo6FtpPazv68+C7lqxj/0dnShTafpuhG+zkRudp0 1ONUHE7roawKe+6qmvvdGdzCM53MA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdehhedgieejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheptehnugih ucfnuhhtohhmihhrshhkihcuoegrnhguhieslhhinhhugidrlhhuthhordhusheqnecugg ftrfgrthhtvghrnhepuedvtdegueejueduhffgleekvddutedvheduudetgefhhfffuefg udekgeejfeeknecukfhppeeijedrudektddrudeihedrudegieenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhguhieslhhinhhugidrlhhu thhordhush X-ME-Proxy: Received: from [192.168.0.55] (c-67-180-165-146.hsd1.ca.comcast.net [67.180.165.146]) by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 May 2021 23:18:38 -0400 (EDT) Subject: Re: [RFC v2 PATCH 7/7] x86/entry: use int for syscall number; handle all invalid syscall nrs To: "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Andy Lutomirski Cc: Linux Kernel Mailing List References: <871racf928.ffs@nanos.tec.linutronix.de> <60495dd3-ea68-4db3-47ad-b7b45796bf76@zytor.com> <87o8dfer7k.ffs@nanos.tec.linutronix.de> <87mtsz619u.ffs@nanos.tec.linutronix.de> From: Andy Lutomirski Message-ID: <57bf2ff9-11ff-0907-975e-15177df72144@linux.luto.us> Date: Thu, 13 May 2021 20:18:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/13/21 5:38 PM, H. Peter Anvin wrote: > On 5/12/21 3:22 PM, Thomas Gleixner wrote: >>> >>> As far as this being a user ABI change, this is actually a revert to the >>> original x86-64 ABI; see my message to Ingo. >> >> I'm not against that change, but it has to be well justified and the >> reasoning wants to be in the changelog. You know the drill :) >> > > FYI: > > So in the process of breaking up and better document this patch, I have > looked at the syscall_numbering_64 (and have rewritten it to be more > complete.) > > I found that running it under strace fails, as strace (possibly ptrace, > possibly the strace binary) causes %rax = 2^32 to be clobbered to zero > already... > > More motivation, I guess. > Indeed. I would love to go back in time and switch to long, but there are plenty of things that use int now. I suppose we could try to make it long for real, but seccomp has u32 baked into its ABI.