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] [day] [month] [year] [list]
Message-ID: <78a983a2-d6b4-4a46-9d63-345da92f1bf4@linux.ibm.com>
Date: Wed, 5 Mar 2025 09:32:21 +0530
From: Venkat Rao Bagalkote <venkat88@...ux.ibm.com>
To: Christophe Leroy <christophe.leroy@...roup.eu>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Danny Tsen <dtsen@...ux.ibm.com>
Cc: Breno Leitao <leitao@...ian.org>, Nayna Jain <nayna@...ux.ibm.com>,
        Paulo Flabiano Smorigo <pfsmorigo@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Madhavan Srinivasan <maddy@...ux.ibm.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        Nicholas Piggin <npiggin@...il.com>, Naveen N Rao <naveen@...nel.org>,
        linux-crypto@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] crypto: powerpc: Mark ghashp8-ppc.o as an
 OBJECT_FILES_NON_STANDARD

Hello Christophe,

On 05/03/25 4:32 am, Christophe Leroy wrote:
> The following build warning has been reported:
>
>    arch/powerpc/crypto/ghashp8-ppc.o: warning: objtool: .text+0x22c: unannotated intra-function call
>
> This happens due to commit bb7f054f4de2 ("objtool/powerpc: Add support
> for decoding all types of uncond branches")
>
> Disassembly of arch/powerpc/crypto/ghashp8-ppc.o shows:
>
>   arch/powerpc/crypto/ghashp8-ppc.o:     file format elf64-powerpcle
>
>   Disassembly of section .text:
>
>   0000000000000140 <gcm_ghash_p8>:
>     140:    f8 ff 00 3c     lis     r0,-8
>   ...
>     20c:    20 00 80 4e     blr
>     210:    00 00 00 00     .long 0x0
>     214:    00 0c 14 00     .long 0x140c00
>     218:    00 00 04 00     .long 0x40000
>     21c:    00 00 00 00     .long 0x0
>     220:    47 48 41 53     rlwimi. r1,r26,9,1,3
>     224:    48 20 66 6f     xoris   r6,r27,8264
>     228:    72 20 50 6f     xoris   r16,r26,8306
>     22c:    77 65 72 49     bla     1726574 <gcm_ghash_p8+0x1726434>      <==
>   ...
>
> It corresponds to the following code in ghashp8-ppc.o :
>
>   _GLOBAL(gcm_ghash_p8)
>      lis    0,0xfff8
>   ...
>      blr
>   .long    0
>   .byte    0,12,0x14,0,0,0,4,0
>   .long    0
>   .size    gcm_ghash_p8,.-gcm_ghash_p8
>
>   .byte 71,72,65,83,72,32,102,111,114,32,80,111,119,101,114,73,83,65,32,50,46,48,55,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
>   .align    2
>   .align    2
>
> In fact this is raw data that is after the function end and that is
> not text so shouldn't be disassembled as text. But ghashp8-ppc.S is
> generated by a perl script and should have been marked as
> OBJECT_FILES_NON_STANDARD.
>
> Now that 'bla' is understood as a call instruction, that raw data
> is mis-interpreted as an infra-function call.
>
> Mark ghashp8-ppc.o as a OBJECT_FILES_NON_STANDARD to avoid this
> warning.
>
> Reported-by: Venkat Rao Bagalkote <venkat88@...ux.ibm.com>
> Closes: https://lore.kernel.org/all/8c4c3fc2-2bd7-4148-af68-2f504d6119e0@linux.ibm.com
> Cc: Danny Tsen <dtsen@...ux.ibm.com>
> Fixes: 109303336a0c ("crypto: vmx - Move to arch/powerpc/crypto")
> Signed-off-by: Christophe Leroy <christophe.leroy@...roup.eu>
> ---
>   arch/powerpc/crypto/Makefile | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/arch/powerpc/crypto/Makefile b/arch/powerpc/crypto/Makefile
> index 9b38f4a7bc15..2f00b22b0823 100644
> --- a/arch/powerpc/crypto/Makefile
> +++ b/arch/powerpc/crypto/Makefile
> @@ -51,3 +51,4 @@ $(obj)/aesp8-ppc.S $(obj)/ghashp8-ppc.S: $(obj)/%.S: $(src)/%.pl FORCE
>   OBJECT_FILES_NON_STANDARD_aesp10-ppc.o := y
>   OBJECT_FILES_NON_STANDARD_ghashp10-ppc.o := y
>   OBJECT_FILES_NON_STANDARD_aesp8-ppc.o := y
> +OBJECT_FILES_NON_STANDARD_ghashp8-ppc.o := y


Applied this patch on top of linux-next 20250303, and it fixes the below 
reported warning.

   arch/powerpc/crypto/ghashp8-ppc.o: warning: objtool: .text+0x22c: unannotated intra-function call.

Please add below tag:

Tested-By: Venkat Rao Bagalkote <venkat88@...ux.ibm.com>

Regards,
Venkat.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ