Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2133983imm; Thu, 19 Jul 2018 13:53:00 -0700 (PDT) X-Google-Smtp-Source: AAOMgpciwwbfCf1HHQ43NRit/Ax3vTlhHnzvjhUxupreFtO06Z7amKShti9wUDTCH9vgxWHdLIX/ X-Received: by 2002:a63:3e0a:: with SMTP id l10-v6mr11642051pga.355.1532033580564; Thu, 19 Jul 2018 13:53:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532033580; cv=none; d=google.com; s=arc-20160816; b=tkQqc0BJUsb8Vdhsmp1V19UGRPbd9PZT1nFmUbJyYCVkYY3szbx7FNnqQTdb2Y9UuJ EhYMjPjg0k5NG78o+DiUApgxS4l1GGYpkyNp5zb6fZWK5z8W/xHcgUxatwnZGGL0kqe5 vRulELaqSfbAMlxr6iOyQAUvo0COaD2nicEddEXn4soyI3hnHI9K1zVarZzuJEnzCB2u GBfosgBB0VMMu/rQSNapQShOpQT0Cyp4HhiU15t+WacDdR3LEa7xQttfd8riiWFD7IWj bqx/kuvGIwe/VEh6CVb8Mt+vytIJdkF2SDMNmcuibXDM3cEpGPrnAhUvPi1C5vsndBLq Rcdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=7E3lmqfyv3NlwgYeuskcET9s5jaGK8N+8na0NlN261U=; b=c8TNBPy2fzQqprjUNgkBs/yObspo2bZXXEqIxjRrZRgB7D/2UOlmbCN67jdaCgXgb8 TZt2XZnLHJ2/RErLU8TaZad4WNdsD2Wl2XprLXHmhsTv4rS+vTjhRIi1usOFqBat+DjI JTIfl8rG3kGcyswRVVr5sh5yYQBdFlR4xe2WETlKMALiMQR1ssf2jSTGg5QljPVzA/og POzFk5/Iy/cgYABJzVhK0+Uevf3oCx+dS/Le+I98eO/xzASPDLxFv7gSDSmtdEnBAYaS ZvIdFzo8b9u5APf3L880GrkuQ8+q4kqW8fycsmdC6s+Z9sOqeTRfWkOSaYLC7qohGkM7 y6XQ== 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 p3-v6si90405plr.131.2018.07.19.13.52.44; Thu, 19 Jul 2018 13:53:00 -0700 (PDT) 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 S1729925AbeGSVhA (ORCPT + 99 others); Thu, 19 Jul 2018 17:37:00 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:34200 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727609AbeGSVhA (ORCPT ); Thu, 19 Jul 2018 17:37:00 -0400 Received: from p4fea5a5a.dip0.t-ipconnect.de ([79.234.90.90] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fgFu9-0006CY-Bf; Thu, 19 Jul 2018 22:52:05 +0200 Date: Thu, 19 Jul 2018 22:52:04 +0200 (CEST) From: Thomas Gleixner To: Brian Gerst cc: Joerg Roedel , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , Linux Kernel Mailing List , Linux-MM , Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , David Laight , Denys Vlasenko , Eduardo Valentin , Greg Kroah-Hartman , Will Deacon , "Liguori, Anthony" , Daniel Gruss , Hugh Dickins , Kees Cook , Andrea Arcangeli , Waiman Long , Pavel Machek , dhgutteridge@sympatico.ca, Joerg Roedel Subject: Re: [PATCH 07/39] x86/entry/32: Enter the kernel via trampoline stack In-Reply-To: Message-ID: References: <1531906876-13451-1-git-send-email-joro@8bytes.org> <1531906876-13451-8-git-send-email-joro@8bytes.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 18 Jul 2018, Brian Gerst wrote: > > +.Lcopy_pt_regs_\@: > > +#endif > > + > > + /* Allocate frame on task-stack */ > > + subl %ecx, %edi > > + > > + /* Switch to task-stack */ > > + movl %edi, %esp > > + > > + /* > > + * We are now on the task-stack and can safely copy over the > > + * stack-frame > > + */ > > + shrl $2, %ecx > > This shift can be removed if you divide the constants by 4 above. > Ditto on the exit path in the next patch. No, the > > + /* Allocate frame on task-stack */ > > + subl %ecx, %edi needs the full value in bytes .... Thanks, tglx