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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE60EC4332F for ; Tue, 18 Oct 2022 21:06:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229665AbiJRVGO (ORCPT ); Tue, 18 Oct 2022 17:06:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbiJRVGN (ORCPT ); Tue, 18 Oct 2022 17:06:13 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C35D9A9E5 for ; Tue, 18 Oct 2022 14:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666127171; 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: in-reply-to:in-reply-to:references:references; bh=kUAo3dL9hhBdy5lWB8FHvKsjCOg7DiowFZ/MAPIKBRo=; b=AX9oq+gw5t3tGvTIuSUq/vq7gDnB24YKcl+tSXs5LCXnYDPCDlgL5sHjId/4qJPjhlb44J bxlN+NudfzAM6TEU8VBql1i1s0oGS8wMKNRWYAeUbrO9nEQ1VfvdArOH3gXEnwy7E8/rkl TKiv7JereKKK8KnSX5stTyrvB1JbCmk= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-3-s4HuxjnEOT2bgY5OaJH7oA-1; Tue, 18 Oct 2022 17:04:52 -0400 X-MC-Unique: s4HuxjnEOT2bgY5OaJH7oA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1D2E93814580; Tue, 18 Oct 2022 21:04:49 +0000 (UTC) Received: from redhat.com (unknown [10.2.17.157]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9095B2166BAD; Tue, 18 Oct 2022 21:04:48 +0000 (UTC) Date: Tue, 18 Oct 2022 17:04:47 -0400 From: Peter Jones To: Evgeniy Baskov Cc: Ard Biesheuvel , Borislav Petkov , Andy Lutomirski , Dave Hansen , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Alexey Khoroshilov , lvc-project@linuxtesting.org, x86@kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH 00/16] x86_64: Improvements at compressed kernel stage Message-ID: <20221018210447.sg3tddaujre6orgc@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Precedence: bulk List-ID: X-Mailing-List: linux-hardening@vger.kernel.org On Tue, Sep 06, 2022 at 01:41:04PM +0300, Evgeniy Baskov wrote: > This patchset is aimed > * to improve UEFI compatibility of compressed kernel code for x86_64 > * to setup proper memory access attributes for code and rodata sections > * to implement W^X protection policy throughout the whole execution > of compressed kernel for EFISTUB code path. Hi Evgeniy, I've tested this set of patches with the Mu firmware that supports the W^X feature and a modified bootloader to also support it, and also with an existing firmware and the grub2 build in fedora 36. On the firmware without W^X support, this all works for me. With W^X support, it works so long as I use CONFIG_EFI_STUB_EXTRACT_DIRECT, though I still need some changes in grub's loader. IMO that's a big step forward. I can't currently make it work with W^X enabled but without direct extraction, and I'm still investigating why not, but I figured I'd give you a heads up. -- Peter