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: <CAMj1kXFtx0OZozwedDsUJotfPi8Ugrcy2J+ee_YH4nb=36W2dQ@mail.gmail.com>
Date:   Thu, 22 Sep 2022 15:17:07 +0200
From:   Ard Biesheuvel <ardb@...nel.org>
To:     Chen Zhongjin <chenzhongjin@...wei.com>
Cc:     linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, herbert@...dor.apana.org.au,
        davem@...emloft.net, catalin.marinas@....com, will@...nel.org,
        broonie@...nel.org, maz@...nel.org, mark.rutland@....com,
        anshuman.khandual@....com
Subject: Re: [PATCH -next 2/3] arm64: head: Mark constants as data

On Thu, 22 Sept 2022 at 15:08, Chen Zhongjin <chenzhongjin@...wei.com> wrote:
>
> Add data annotations to constants part of the image header.
>
> Signed-off-by: Julien Thierry <jthierry@...hat.com>
> Signed-off-by: Chen Zhongjin <chenzhongjin@...wei.com>
> Reviewed-by: Mark Brown <broonie@...nel.org>
> ---
>  arch/arm64/kernel/head.S | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
> index 814b6587ccb7..f298e88e2d23 100644
> --- a/arch/arm64/kernel/head.S
> +++ b/arch/arm64/kernel/head.S
> @@ -57,9 +57,10 @@
>         /*
>          * DO NOT MODIFY. Image header expected by Linux boot-loaders.
>          */
> -       efi_signature_nop                       // special NOP to identity as PE/COFF executable
> +SYM_DATA_LOCAL(efi_nop, efi_signature_nop)     // special NOP to identity as PE/COFF executable

This is an instruction not data

>         b       primary_entry                   // branch to kernel start, magic
> -       .quad   0                               // Image load offset from start of RAM, little-endian
> +SYM_DATA_LOCAL(_zero_reserved, .quad   0)      // Image load offset from start of RAM, little-endian

Why convert this quad? And why does it need a symbol?

> +SYM_DATA_START_LOCAL(_arm64_common_header)
>         le64sym _kernel_size_le                 // Effective size of kernel image, little-endian
>         le64sym _kernel_flags_le                // Informative flags, little-endian
>         .quad   0                               // reserved

But not this one?

> @@ -67,6 +68,7 @@
>         .quad   0                               // reserved
>         .ascii  ARM64_IMAGE_MAGIC               // Magic number
>         .long   .Lpe_header_offset              // Offset to the PE header.
> +SYM_DATA_END(_arm64_common_header)
>
>         __EFI_PE_HEADER
>
> --
> 2.17.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ