Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2021969ybv; Fri, 21 Feb 2020 07:29:13 -0800 (PST) X-Google-Smtp-Source: APXvYqxOohyhsGLSU4MGnYmhTfn4EinTXQQPsNzro7IW+3mHYLPFEbq1bu4Qs+9sOar3AJ/40c7D X-Received: by 2002:a05:6808:a83:: with SMTP id q3mr2547681oij.0.1582298953002; Fri, 21 Feb 2020 07:29:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582298952; cv=none; d=google.com; s=arc-20160816; b=CDlltTPpGpxURTqCxg36NaBjcbc8Z52znJqPpgKZXXjAHcBobUVcRR1T61PAwZu98Q Em4s7jVKr3njwka2OHQva+X0eYJ7iN+UzJ+xNpCCzDjNLVZpz9WYsI2awgQbDIHA60Zy uZFPV6jXmE9honw55OI/iLekcdemgwL1PxHr8zw2fKpR0KcimLFbGa8toPuUs6BbUEKX kIU9ziJ7K0ukxw4W1imQVHPgrFm7yfjphL5QCS5cIE92k9bfQnqXZP1U9JFxZBdGHeEd CGVczLqDHuuALziMUNDHlcxb9HHJ6/ACCiv8IIs8cYPuRgdHjgMz04QWKjFYGY+CBNiV /hJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=L0oyMPCjL1/xnXtx63jC7du5YsH/e+nv5u2DLsdYmpI=; b=dmiPIN9BSGqLavICGqKVc0EUd8UGgJmwNh1vJrzqnL2ZPxW7Y5XdO+r4BIATwY/8HZ 47U0Nnh3pYozsH4zukSPZKpstrq3pogd56sHg4hv0vwcjkbBRzUwPijzWq5kbRCjLpYm 8RzXdBHK2vtb+sHAn4AOPuCvscsvzuti/bjfBX4oJ9GpGiW7VeGtXy+bGTiW9tWsSP4q HIGwwhlL00DY3LdkS/TQA3bwOYtGXg0xYb3hbMP3qxCvLdhRO2kgAJJizY/5VgvvEE0U hmdeBe23ofRc9W2VhIF20sVlwWX1cvQ0SNr2HipPKZY9iR8A/xqzXjngicB/KZtjkzCo HTCQ== ARC-Authentication-Results: i=1; mx.google.com; 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 y23si1562776oti.65.2020.02.21.07.29.00; Fri, 21 Feb 2020 07:29:12 -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; 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 S1729137AbgBUP2q (ORCPT + 99 others); Fri, 21 Feb 2020 10:28:46 -0500 Received: from isilmar-4.linta.de ([136.243.71.142]:43828 "EHLO isilmar-4.linta.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727851AbgBUP2p (ORCPT ); Fri, 21 Feb 2020 10:28:45 -0500 Received: by isilmar-4.linta.de (Postfix, from userid 1000) id 19552200B44; Fri, 21 Feb 2020 15:28:44 +0000 (UTC) Date: Fri, 21 Feb 2020 16:28:44 +0100 From: Dominik Brodowski To: Brian Gerst Cc: Linux Kernel Mailing List , the arch/x86 maintainers , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Andy Lutomirski Subject: Re: [PATCH 0/5] Enable pt_regs based syscalls for x86-32 native Message-ID: <20200221152843.rxz4ptfi5lh3udud@isilmar-4.linta.de> References: <20200221050934.719152-1-brgerst@gmail.com> <20200221060756.GA3368@light.dominikbrodowski.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 21, 2020 at 08:15:19AM -0500, Brian Gerst wrote: > On Fri, Feb 21, 2020 at 2:07 AM Dominik Brodowski > wrote: > > > > Brian, > > > > On Fri, Feb 21, 2020 at 12:09:29AM -0500, Brian Gerst wrote: > > > This patch series cleans up the x86 syscall wrapper code and converts > > > the 32-bit native kernel over to pt_regs based syscalls. > > > > thanks for your patchset. Could you explain a bit more what the rationale > > is. Due to asmlinkage, it doesn't leak "random user-provided register > > content down the call chain" (as was the case for x86-64). But it may be > > cleaner, and you mention in patch 5/5 that the new way is "a bit more > > efficient" -- do you have numbers? > > The main rationale for this patch set is to make the 32-bit native > kernel consistent with the 64-bit kernel. It's also slightly more > efficient because the old code pushed all 6 arguments onto the stack > whereas the new code only reads the args the syscall needs, with the > pt_regs pointer passed in through a register. By efficient I mean > that it uses fewer instructions and stack accesses, not that it will > actually have a significant difference on a benchmark. OK, could you add such an explanation to the patchset then, please? Thanks, Dominik