Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1214371pxj; Wed, 19 May 2021 00:36:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPdCHWCPKtrLq5lUQXIwQYGnjVtgKqsdM3BRd9plU8Tci3BgCAtQwZf4+crvOrNy7cKl7v X-Received: by 2002:a17:906:591:: with SMTP id 17mr11196245ejn.347.1621409797951; Wed, 19 May 2021 00:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621409797; cv=none; d=google.com; s=arc-20160816; b=UfOPNDdRQessLy4PAR5p5PEiuR25rXfVxF3GpDqoGEPrTVWxyxxtvfR5NK3mAGl87w zmre/gT9Cn3Tpom4QUky+qVis7hFQOvu6Q3fqT/+TMfAE4mEuk35Keyuw+JQ+jGYdWIA sIBFpoFJdVHR+fHD6KY1E4Ip1ri5ISxphgIcUwInbJXXopNwfiCFFNH9N9QZt6JFQ4/f VskNt+7WV6iryeSmjWLoYJu6txzRktCyjBdKNHpZzc71qN36Nn5wESI5u/o5VVRoXuhK tK7duThX8QT7HbI07+bfMelKhhhFh6ZD9PXtWHh6MD8qFrQqNtNja/AuwKSrQGSSGzva I6Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:dkim-signature:dkim-filter; bh=aTYSqhCKxLgX68/2PoXpp4s/LEOV3rjxKcfUXJ3LzYk=; b=tfKXjIQqb8TuTpzdoTfyQtm5qOhDu9c/KZTpLlkDJpG2TLb1xwQwc6b4fVikH1ngY6 sJ7xO5cYOyJFt+nz5qe6sZOymU8wxXKt1B6JjXgCM3NThgK76506JwzHz4B2p+AS0kkI odLDKAl1ydqt7KA5jbN+yaDouqZ8hDtpEroIHXyURjL+jUdC2d4wjhfU27QSxO5FTQS8 +G1mhxTn5UsB4tpK0rFe1hBrn87dl7KkwTnI/HwE7WX6oh3MyN/kQbzWIjwMQkTua1EN 5q0Jws7+kXhg+JW8OAoCSO1UfFAkq3M8yADPuF/SKiAkR0nq6Hpe7CEhpXlmEH6KK5AX l0Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@zytor.com header.s=2021042801 header.b=Byk55k+y; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nb17si3352182ejc.226.2021.05.19.00.36.10; Wed, 19 May 2021 00:36:37 -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=fail header.i=@zytor.com header.s=2021042801 header.b=Byk55k+y; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242411AbhEQUZ5 (ORCPT + 99 others); Mon, 17 May 2021 16:25:57 -0400 Received: from terminus.zytor.com ([198.137.202.136]:59263 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239459AbhEQUZx (ORCPT ); Mon, 17 May 2021 16:25:53 -0400 Received: from [IPv6:2601:646:8602:8be1:c569:1cd0:3c83:3a98] ([IPv6:2601:646:8602:8be1:c569:1cd0:3c83:3a98]) (authenticated bits=0) by mail.zytor.com (8.16.1/8.15.2) with ESMTPSA id 14HKO82p3798008 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Mon, 17 May 2021 13:24:12 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 14HKO82p3798008 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2021042801; t=1621283052; bh=aTYSqhCKxLgX68/2PoXpp4s/LEOV3rjxKcfUXJ3LzYk=; h=Date:In-Reply-To:References:Subject:To:CC:From:From; b=Byk55k+ywBwqDv/QZTAuLYM2fNPKX6CfkKinvB4Uij4G2DoECnoicoDBYXITADva3 c0TDd9gYGGa+JQHIYexlcwIXfl7mlkxt+I5tjH+O9IPOd8KRwIt6DZbIxqFKpV2iQJ AeBOdoGXwgKl9myuEckARqAYkwshwTKbm22g5EjY0AB216uE1IMzePjKvBvnMpyUMS nwNDqbP9f01PKmA4cbfDWcfgYGTcpnb74y4VY3d2x+S3lcvJYIEi9BHBNhjDIThcZe ViY0YokJjrhriow39NKlMITJngXq+woqEzQWf2o0KtZ91FE7w6KaTukcMSGGfEFyVK WF5BIaE4h4mtQ== Date: Mon, 17 May 2021 13:23:59 -0700 User-Agent: K-9 Mail for Android In-Reply-To: References: <20210515011015.2707542-1-hpa@zytor.com> <20210515011015.2707542-2-hpa@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v3 1/4] x86/syscall: sign-extend system calls on entry to int To: Ingo Molnar CC: Ingo Molnar , Thomas Gleixner , Andy Lutomirski , Borislav Petkov , Linux Kernel Mailing List From: "H. Peter Anvin" Message-ID: <4127D74A-A110-4EAB-9745-46997B1B031C@zytor.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No, this is what the Linux kernel did for a very long time=2E On May 16, 2021 12:48:19 AM PDT, Ingo Molnar wrote: > >* H=2E Peter Anvin wrote: > >> This is an ABI change, but is in fact a revert to the original x86-64 >> ABI=2E The original assembly entry code would zero-extend the system >> call number; this patch uses sign extend to be explicit that this is >> treated as a signed number (although in practice it makes no >> difference, of course) and to avoid people getting the idea of >> "optimizing" it, as has happened on at least two(!) separate >> occasions=2E > >The original x86-64 ABI as documented by AMD, as we (probably) never >had=20 >this in Linux, right? > >Sounds sensible to do this, assuming nothing relies on the weirdness=2E > >Thanks, > > Ingo --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E