From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by kanga.kvack.org (Postfix) with ESMTP id 7812E6B0003 for ; Thu, 19 Jul 2018 16:52:13 -0400 (EDT) Received: by mail-wr1-f72.google.com with SMTP id w2-v6so4326055wrt.13 for ; Thu, 19 Jul 2018 13:52:13 -0700 (PDT) Received: from Galois.linutronix.de (Galois.linutronix.de. [2a01:7a0:2:106d:700::1]) by mx.google.com with ESMTPS id o16-v6si94144wrp.94.2018.07.19.13.52.12 for (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 19 Jul 2018 13:52:12 -0700 (PDT) Date: Thu, 19 Jul 2018 22:52:04 +0200 (CEST) From: Thomas Gleixner 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> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: 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 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