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=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 7499BC35242 for ; Tue, 11 Feb 2020 22:14:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4817B20842 for ; Tue, 11 Feb 2020 22:14:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581459246; bh=Tzo7oLihh6XmYdZ4fKdx4WcMxH4KEKF1Qm1JB/jwLwY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=AaQWOfmCSgD5cU2fsnOd0TAtg4tbR2KZczDmjx29gu/1FFuiGd44Fr5pdTclUTzg2 y5y2j2QrI6B5ajMRu3MMOaU9D1PJztQ8h29JCfVz6ACuY9IzmwJOj1Go1c8jltoCoi O52difaDRkZPnmSALzWfe0/S744h6cEfsds1aaTg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727429AbgBKWOF (ORCPT ); Tue, 11 Feb 2020 17:14:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:48950 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727111AbgBKWOF (ORCPT ); Tue, 11 Feb 2020 17:14:05 -0500 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 52B89214DB for ; Tue, 11 Feb 2020 22:14:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581459244; bh=Tzo7oLihh6XmYdZ4fKdx4WcMxH4KEKF1Qm1JB/jwLwY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=VpUH9q2Ld9f0sZfPeirYatwOo0AY9GNGwCayffYWwmErMNp068fBLBmJfdfSc/lE1 1KTgyuEpfu3cUeSrxuONfZouwJuPNKBDZ+9U4pgZ1McQo3gStxCp/uwgNkRzBij3/W mVANOrP5chQlopRUZpNrxR4trUkQQr/2dH+S486o= Received: by mail-wr1-f44.google.com with SMTP id m16so14476336wrx.11 for ; Tue, 11 Feb 2020 14:14:04 -0800 (PST) X-Gm-Message-State: APjAAAUfDWUVREp33ab5L56vYKrIaYcx45uvtfPu5sJQGMkmajZFRL1O z1u/LxB23dKCWfbpGtQuQfb05O5iJdc8G8znc9Dwrw== X-Google-Smtp-Source: APXvYqydo76PkEmj5PG5O27EmrWOjY3nLu09O+yXpO0pI2+Gs1e7Uz84BfjfNy+FRfjeX2dRElyHGQ0YcfBM+E5UZeM= X-Received: by 2002:a5d:5305:: with SMTP id e5mr11001033wrv.18.1581459242661; Tue, 11 Feb 2020 14:14:02 -0800 (PST) MIME-Version: 1.0 References: <20200211135256.24617-1-joro@8bytes.org> <20200211135256.24617-8-joro@8bytes.org> In-Reply-To: <20200211135256.24617-8-joro@8bytes.org> From: Andy Lutomirski Date: Tue, 11 Feb 2020 14:13:50 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 07/62] x86/boot/compressed/64: Disable red-zone usage To: Joerg Roedel Cc: X86 ML , "H. Peter Anvin" , Andy Lutomirski , Dave Hansen , Peter Zijlstra , Thomas Hellstrom , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , Kees Cook , LKML , kvm list , Linux Virtualization , Joerg Roedel Content-Type: text/plain; charset="UTF-8" Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Tue, Feb 11, 2020 at 5:53 AM Joerg Roedel wrote: > > From: Joerg Roedel > > The x86-64 ABI defines a red-zone on the stack: > > The 128-byte area beyond the location pointed to by %rsp is > considered to be reserved and shall not be modified by signal or > interrupt handlers. 10 Therefore, functions may use this area for > temporary data that is not needed across function calls. In > particular, leaf functions may use this area for their entire stack > frame, rather than adjusting the stack pointer in the prologue and > epilogue. This area is known as the red zone. > > This is not compatible with exception handling, so disable it for the > pre-decompression boot code. Acked-by: Andy Lutomirski I admit that I thought we already supported exceptions this early. At least I seem to remember writing this code. Maybe it never got upstreamed? --Andy