Received: by 10.223.176.5 with SMTP id f5csp1022921wra; Fri, 9 Feb 2018 11:03:27 -0800 (PST) X-Google-Smtp-Source: AH8x225lHjtcwqU6ilVPWa3klGfBqirYV/1IrvP3tXI+HPDVjSEgXxROTf05Xet/nOHgE/IajBSl X-Received: by 10.101.77.67 with SMTP id j3mr3124146pgt.76.1518203007182; Fri, 09 Feb 2018 11:03:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518203007; cv=none; d=google.com; s=arc-20160816; b=cjQkzsSV5ctyX+i+H0Not1tJDy4tjFIH74Y8/W7NsDHUyGoFss8aQOqZu9n1cR9z7s Qg/wsoaxgP+IVBFrENr7WuXJSy6OBtZLgHLsSaBFGym6tHuT3FD4Kh/2TIqnxI+qWwsB hNs9/nWzpT9S52ZKKjgGWoAe3BQasjBF8X0VwC+DK/CUio3oDXQXMBEFTIrcuB5XdLxi xqJDa9xygb6IcG3C3nxxcyHK299ZkflhiZyJcOaHZXqoRh4pLKNsemYFySxb7GRKp2Fp l5EG0ITyMIntGIxIAYgUfXWXCuLtfuBhBKHpxDZv+sxAWlfJkViThvWO5thiPRlQ45t8 3l9g== 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:arc-authentication-results; bh=fH+cy3t31i3Dkxm/+r8yWAn0O5AHgUeFZFT6foFNEj8=; b=DUuqHMW3dUBnFN7Xl+ld4KQwF/7Um99NdvNqNZLWWlN6l7Nu01DMy/Dir+EtRiJHr2 d4NAaqmdAQ9xa9Ir2h4TzPDgIyWne375XIMbXgUwCbs+E2rNtpIekJskef7TZhxWI38g +JJfwTKjBAA4d3dFfiYnVODWEzBUZrhN7ptPHYrve2xGzNPnltnIxuZcUTYn7MfnxvNM ZmtHHAGStm+Qc9k5ivQwMVxJA/odRqh4zrH7IlKWR8epB81Fl6gRe+LADx4FwG3pPHi3 AJ5XFur7jhSo6xVyqgabPbfVd6PR9cEZEyLH0ox0spMo3YaRwqOO2aJpgtEBoAjYS2+4 Yy0w== 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 z11si2058881pfj.351.2018.02.09.11.03.13; Fri, 09 Feb 2018 11:03:27 -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 S1752218AbeBITCe (ORCPT + 99 others); Fri, 9 Feb 2018 14:02:34 -0500 Received: from mx2.suse.de ([195.135.220.15]:53214 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750810AbeBITCd (ORCPT ); Fri, 9 Feb 2018 14:02:33 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9F93CACA0; Fri, 9 Feb 2018 19:02:31 +0000 (UTC) Date: Fri, 9 Feb 2018 20:02:26 +0100 From: Joerg Roedel To: Linus Torvalds Cc: Joerg Roedel , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , the arch/x86 maintainers , Linux Kernel Mailing List , linux-mm , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , "Liguori, Anthony" , Daniel Gruss , Hugh Dickins , Kees Cook , Andrea Arcangeli , Waiman Long , Pavel Machek Subject: Re: [PATCH 09/31] x86/entry/32: Leave the kernel via trampoline stack Message-ID: <20180209190226.lqh6twf7thfg52cq@suse.de> References: <1518168340-9392-1-git-send-email-joro@8bytes.org> <1518168340-9392-10-git-send-email-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 09, 2018 at 09:05:02AM -0800, Linus Torvalds wrote: > On Fri, Feb 9, 2018 at 1:25 AM, Joerg Roedel wrote: > > + > > + /* Copy over the stack-frame */ > > + cld > > + rep movsb > > Ugh. This is going to be horrendous. Maybe not noticeable on modern > CPU's, but the whole 32-bit code is kind of pointless on a modern CPU. > > At least use "rep movsl". If the kernel stack isn't 4-byte aligned, > you have issues. Okay, I used movsb because I remembered that being the recommendation for the most efficient memcpy, and it safes me an instruction. But that is probably only true on modern CPUs. I'll change it to use movsl here and in the other patches. Thanks, Joerg