Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1759439pxj; Sun, 16 May 2021 03:22:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxX9GCjw5+pLaig4rYlXq8ZdykcBMP9Hk4/T5AnA6w1NpRQJvv57Tp3CkwsRWo9LwmKEFsi X-Received: by 2002:a17:907:1c98:: with SMTP id nb24mr56625844ejc.206.1621160523368; Sun, 16 May 2021 03:22:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621160523; cv=none; d=google.com; s=arc-20160816; b=tFumEcmcwZJ+/hXqOOqf8KPdPevwcj9qYMfyOg5hNvCOc+Ej+NkK/SZEwBmzK5oyQ0 Q8/QXSusYesL1vmYUblhunNm4DdgBvb7PGX0oKNCLHG+/5Q1RbB8RdiMlV4lDSRhES38 rSiFTLksAhmDGwigNBnPzWuM9FDBe2npLqET0s/nGrYSe2Fq4mi7xojP5EVXlOsKlapP A17ZIGgmH4AY2D8/Huw/OxfITZTOOTcDy4nmQPj52hg1V8V4Fi2jUgqnRQzQfphDKqTT /8/eZYgysdSQ2sfveya6RjCExhPRn7z/a8pg8TeiFH7V8jaXFFGroDT/aFkz++vKdb/i VtBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=h6oV9wd5kA7+2uCRYGnxwbcp91vUgplkvPfsbcp8srY=; b=AJc7AAfYHUR2LlZ9a4PvGqOImcWqArrntOC6U9eA1t4sGsb14NGYNtUSWim8EYY2f/ qImQ+XRPY2i0G371XmrGd3C/b14Os848iv4MvNmmRyNI7TJIemXIYUblmMqjOSJzFhC3 YfkuU7LoqCMvPwEc1Q1xjSq8KSUOCtVGyYaPW5sFMDJcEV+3ehNgQs8grVodCLNEgFiO /3au4/9N5mQbiYx70rx5sbhr0PLCAPbOQRzR3XizqLRxbdkEoJ7CtUsD2INLwpd+MT/2 JYaRDwyQRPTnk6ZVhfhd8OtRosQ7Rv32WEdQ8CwUpAg6FQgA139HzSUNytlmbTY6OIYc 26fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Or7C8gx2; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c24si4463193eja.751.2021.05.16.03.21.40; Sun, 16 May 2021 03:22:03 -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=Or7C8gx2; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233919AbhEPHth (ORCPT + 99 others); Sun, 16 May 2021 03:49:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232256AbhEPHth (ORCPT ); Sun, 16 May 2021 03:49:37 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEDECC061573 for ; Sun, 16 May 2021 00:48:22 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id n2so4511760ejy.7 for ; Sun, 16 May 2021 00:48:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=h6oV9wd5kA7+2uCRYGnxwbcp91vUgplkvPfsbcp8srY=; b=Or7C8gx2e0I7UuD8b4rio9s7sssLTUmnyIR4hTR7rlLFME/0QDuq9u28n9zDVVG80h BucAclKbJ4xRH4yAS0A9qnPe4/K1X/R+RpQiZ+ho4XO2TLQCBG6TPgKms5pJIWfQzPGE 8vztCJ5FOhNNzozx3Tkh5CcgeqisvNaOLhAxsDI2LW8KnNfIwlFi5/6cFTLO0IcPAtiQ fS9XfYe3R5MX+gTCuNe0DpH8iMNK/YhucgeWRG5IFqxwx4jgiEtAOOGhvu/Pe7EyMWZo N/Y7b3u0SAdib+J/MpFq+g6FXvkH/5gApg/naZrAi/0oQ2+HpZx8AVF/JGjbEZV4UOL6 N25w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=h6oV9wd5kA7+2uCRYGnxwbcp91vUgplkvPfsbcp8srY=; b=GiSOZZR8lBu0/AD7MXMLfuvbUv0UBLlmHcK0VMSMnwSZB0SLESEU7LcKS+qRs/NIel bWEkA66baIGoejhuLGuNLycMsZvVQJm2iHtQbWabkm/c32BnnxCAYn4ZZCFLL/cyjHA5 Olmsjjbyk4/E9DEcHb+ihe2QRE7KeCgveWM8xsSgdpibou+be0fMh8nr0p4wd19xwbNZ rfGHRk1jgU97zPrVn+4J0jWlrF258sAg/RJtTDreWFAGmGmmqk9lGmOluXd5Yq4ZoVEA 3pw3eJeFqCQ4w0uMcgs5cwOiVgMugqEcQnQO4Z72geVHzF+uITvWEf1x5cEOSym96KWa gScw== X-Gm-Message-State: AOAM531umeT45ArZs0VI3zejQMTvbsRK7Zugss8RV8OqdbhuZKxDejts sXK0aESPTFm5mqH4rYq9jIQ= X-Received: by 2002:a17:906:170a:: with SMTP id c10mr55285983eje.493.1621151301548; Sun, 16 May 2021 00:48:21 -0700 (PDT) Received: from gmail.com (563BBFD3.dsl.pool.telekom.hu. [86.59.191.211]) by smtp.gmail.com with ESMTPSA id a22sm8554251edu.14.2021.05.16.00.48.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 May 2021 00:48:21 -0700 (PDT) Sender: Ingo Molnar Date: Sun, 16 May 2021 09:48:19 +0200 From: Ingo Molnar To: "H. Peter Anvin" Cc: Ingo Molnar , Thomas Gleixner , Andy Lutomirski , Borislav Petkov , Linux Kernel Mailing List Subject: Re: [PATCH v3 1/4] x86/syscall: sign-extend system calls on entry to int Message-ID: References: <20210515011015.2707542-1-hpa@zytor.com> <20210515011015.2707542-2-hpa@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210515011015.2707542-2-hpa@zytor.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * H. Peter Anvin wrote: > This is an ABI change, but is in fact a revert to the original x86-64 > ABI. 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. The original x86-64 ABI as documented by AMD, as we (probably) never had this in Linux, right? Sounds sensible to do this, assuming nothing relies on the weirdness. Thanks, Ingo