lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e28ce5943937225517d460dabda6f8e5@ispras.ru>
Date:   Wed, 14 Dec 2022 01:16:13 +0300
From:   Evgeniy Baskov <baskov@...ras.ru>
To:     Peter Jones <pjones@...hat.com>
Cc:     Ard Biesheuvel <ardb@...nel.org>, Borislav Petkov <bp@...en8.de>,
        Andy Lutomirski <luto@...nel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Alexey Khoroshilov <khoroshilov@...ras.ru>,
        "Limonciello, Mario" <mario.limonciello@....com>,
        joeyli <jlee@...e.com>, lvc-project@...uxtesting.org,
        x86@...nel.org, linux-efi@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH v3 00/24] x86_64: Improvements at compressed kernel stage

On 2022-12-13 21:13, Peter Jones wrote:
> On Tue, Dec 13, 2022 at 01:03:17PM -0500, Peter Jones wrote:
>> On Tue, Nov 22, 2022 at 02:12:09PM +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 patch set on hardware and QEMU+MU firmware, and it
>> works for me with a couple of minor issues:
>> 
>> - on one machine that has the DXE protocol but not the EFI one, we get
>>   an error because the firmware doesn't support EFI_MEMORY_RP
>> - on QEMU I'm seeing the size of "(unsigned long)_head - image_base"
>>   wind up as 0, which leads to an EFI_INVALID_PARAMETER on the
>>   clear_memory_attributes() call.
>> 
>> In both cases the system winds up working, but with unnecessary 
>> console
>> output.
> 
> I just realized I've overstated here - I haven't actually hit the first
> problem on x86, only on ARM, where we don't currently use this code.  I
> discovered it in grub, and checked your patch set to see if you had the
> same issue I did.  That said, "in both cases the system winds up
> working" is probably still true - in that the edk2 code supports
> EFI_MEMORY_RP on x86 but not ARM, so x86 won't hit the issue when using
> DXE unless someone cooks up another implementation.  Nevertheless I
> believe the patch to fix it is correct and should be applied.
> 
> Thanks!

Hi,

Thank you for testing and fixes!

I have also discovered one issue with v3, that can only be hit when
booting with grub -- there's one kernel_add_identity_map() missing in
the get_acpi_srat_table() function, before header->length is read.
So I'll prepare the v4 soon and include your new patches there.

Thanks,
Evgeniy Baskov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ