Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp74734rwi; Tue, 18 Oct 2022 14:19:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6KHByFxaO/vhT4r6kNrEPuuWq1mJtKZfB45AmkDa8kpj9uGnBZHPRRcpr615PGZkkaBILD X-Received: by 2002:a17:907:720e:b0:78e:2b59:fdf1 with SMTP id dr14-20020a170907720e00b0078e2b59fdf1mr4191197ejc.659.1666127994284; Tue, 18 Oct 2022 14:19:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666127994; cv=none; d=google.com; s=arc-20160816; b=DtntxJxIK+SkdQ6pQcmfG5rCpbSY8UzVbRYzQpPbj6zQuHVh+qlRuH4IpPTB+7qs6h oGTdC9iTP+J+LkFBj+LDadK4SS/jkqnRgaWZBtYdvg5h9vU69+nwA4zV0mkQfCu9N9qQ BJsZfjAMc/m7O3nK5bB+lxGiPA9u8o8mEr10vQl2gCrEsph2US2zXzpd0tCONaGVsEjQ Q6VucCjxHFbsDqeFDfpn5HG/55+GAAJsg2ruUDpOpnRWjio4aeuNPq2aA98TJ5Ny6BHL haLkDqkQh73g9d8a1viFYpElPgoj2KGbssZNcUQpgWan6FuNX0szyyIlwJdzFAFZFiHn blcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=kUAo3dL9hhBdy5lWB8FHvKsjCOg7DiowFZ/MAPIKBRo=; b=MsLr+pcZ/MxV28EN7q1mUgZHSZ/7G7GeWOqV6klU0g8g48+VwHP4rPERVkFb5M26EX 2YspPcd6qwFLJgNPXTiSQM1xbdSoXZhrBTjL9272gsNa3iRFhMOgMqb6xgI9tzdid7V/ STgEYhGhs/cZ2PmhCwyC6QocMQ4PbpMDYee1Pc0pmNOVGyZWx//EyUcLFHG2P6a9jBi4 Z4b2VuRuiGLXva67BRakGd8WWpqF4RYnXN/5HWuXX7e+TuqxocC/K4NWomwiEVV8kOHF 9AY9qg2lLIrPdgjw319EqvwCq9vwS1dB73kzSrehumMRjw9eG6zXImFkbkS/tacn3NkV j23A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KlrKh1km; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t9-20020a1709060c4900b007317756bc04si9993030ejf.1006.2022.10.18.14.19.28; Tue, 18 Oct 2022 14:19:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KlrKh1km; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230000AbiJRVGT (ORCPT + 99 others); Tue, 18 Oct 2022 17:06:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbiJRVGS (ORCPT ); Tue, 18 Oct 2022 17:06:18 -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 3FFC59A2BB for ; Tue, 18 Oct 2022 14:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666127176; 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=KlrKh1kmeIPiIeOjBAQNgUA31XBGgP4tlt8wEcnkML2d+AtJ2+gHQsHVBBoSJdNdDwdmGs hnsRy0ttxErt6rOI1Kf6n1rJxYIINWT3BBv0YkLLyWHqUbpVA5k/0sveiEI4C+oSeTgxXc 3iIn3XoZKenEqmdhtpAzQM7BHyLeVLc= 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 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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