From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E987DC31E40 for ; Tue, 6 Aug 2019 05:09:17 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id 456032147A for ; Tue, 6 Aug 2019 05:09:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alien8.de header.i=@alien8.de header.b="ZLFaZvCV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 456032147A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=alien8.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernel-hardening-return-16717-kernel-hardening=archiver.kernel.org@lists.openwall.com Received: (qmail 3185 invoked by uid 550); 6 Aug 2019 05:09:09 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Received: (qmail 3165 invoked from network); 6 Aug 2019 05:09:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1565068137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=7ho8P+Fnfcvv7paRLriK5vOYhc+udgvOKe/v52tpg1A=; b=ZLFaZvCV6kq/QGOH2CtzrXfBHP+8MahErOPXRo6sVxDpnbbmw7eNCgLawyYt+Eeg0rYccV 59FojR04G6GKWUwKX/JMCTSB+/GOFxn8ygSZNpy2AS8cVr1Gl0oitZ4cpxerW/fGNupUC0 QsEfJsuJX6IRMauElhqIHg5LMfJWhtE= Date: Tue, 6 Aug 2019 07:08:51 +0200 From: Borislav Petkov To: Thomas Garnier Cc: Kernel Hardening , Kristen Carlson Accardi , Kees Cook , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , LKML Subject: Re: [PATCH v9 04/11] x86/entry/64: Adapt assembly for PIE support Message-ID: <20190806050851.GA25897@zn.tnic> References: <20190730191303.206365-1-thgarnie@chromium.org> <20190730191303.206365-5-thgarnie@chromium.org> <20190805172854.GF18785@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) On Mon, Aug 05, 2019 at 10:50:30AM -0700, Thomas Garnier wrote: > I saw that %rdx was used for temporary usage and restored before the > end so I assumed that it was not an option. PUSH_AND_CLEAR_REGS saves all regs earlier so I think you should be able to use others. Like SAVE_AND_SWITCH_TO_KERNEL_CR3/RESTORE_CR3, for example, uses %r15 and %r14. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.