Re: Build Warnings at arch/powerpc/
From: Venkat Rao Bagalkote <hidden>
Date: 2025-03-04 15:44:31
Also in:
lkml
Hello Christophe, On 04/03/25 6:43 pm, Christophe Leroy wrote:
Le 04/03/2025 à 14:03, Venkat Rao Bagalkote a écrit :quoted
[Vous ne recevez pas souvent de courriers de venkat88@linux.ibm.com. Découvrez pourquoi ceci est important à https://aka.ms/ LearnAboutSenderIdentification ] On 04/03/25 6:08 pm, Madhavan Srinivasan wrote:quoted
On 3/4/25 4:58 PM, Madhavan Srinivasan wrote:quoted
On 3/4/25 2:26 PM, Christophe Leroy wrote:quoted
Le 04/03/2025 à 07:13, Madhavan Srinivasan a écrit :quoted
On 3/4/25 10:42 AM, Venkat Rao Bagalkote wrote:quoted
Greetings!! Observing build warnings with linux-next and powerpc repo's. Issue is currently not seen on mainline yet. PPC Repo: https://eur01.safelinks.protection.outlook.com/? url=https%3A%2F%2Fgit.kernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fpowerpc%2Flinux.git&data=05%7C02%7Cchristophe.leroy%40csgroup.eu%7C6e17cc771a204b2998b508dd5b1cf2cf%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C638766902127463526%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=f0ubC0BiY%2Fw2XLfXcX955JKhJ%2BRkUmTUVO4fV%2F%2F4v2Y%3D&reserved=0 merge branch PPC Kernel Version: 6.14.0-rc4-g1304f486dbf1 next Repo: https://eur01.safelinks.protection.outlook.com/? url=https%3A%2F%2Fgit.kernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fnext%2Flinux-next.git&data=05%7C02%7Cchristophe.leroy%40csgroup.eu%7C6e17cc771a204b2998b508dd5b1cf2cf%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C638766902127477000%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=GSDtRBQ35owCeEpjMMCNiJw3iizdrUPQcHznop2BLeQ%3D&reserved=0 master branch next Kernel Version: 6.14.0-rc5-next-20250303 On linux-next kernel issue got introduced b/w next-20250227 and next-20250303 Build Warnings: arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0xe84: intra_function_call not a direct call arch/powerpc/crypto/ghashp8-ppc.o: warning: objtool: .text+0x22c: unannotated intra-function call arch/powerpc/kernel/switch.o: warning: objtool: .text+0x4: intra_function_call not a direct callCan you please specific the compiler and compiler version you found this issue withCan you also tell which defconfig you are using or provide your .config It might also be helpfull if you can provide a disassembly of the three file.o around the warned address.I could recreate the issue with gcc 11.4.1 20231218 with today's linux-next (but could not recreate with gcc 14 or gcc 11.3.0) (20d5c66e1810 (HEAD -> master, tag: next-20250304, origin/master, origin/HEAD) Add linux-next specific files for 20250304) warning for one of the switch.S file : CC arch/powerpc/kernel/syscalls.o AS arch/powerpc/kernel/switch.o arch/powerpc/kernel/switch.o: warning: objtool: .text+0x4: intra_function_call not a direct callI guess this is becos, for bl .+4, we recently added in the arch_decode_instruction (decode.c) to set the type as INSN_OTHER case 18: /* b[l][a] */ if (ins == 0x48000005) /* bl .+4 */ typ = INSN_OTHER; Which I think is the issue here, changing it to INSN_CALL from INSN_OTHER fixes the warningdiff --git a/tools/objtool/arch/powerpc/decode.cb/tools/objtool/arch/ powerpc/decode.c index 26d5050424a9..ffd63a61a585 100644--- a/tools/objtool/arch/powerpc/decode.c +++ b/tools/objtool/arch/powerpc/decode.c@@ -56,7 +56,7 @@ int arch_decode_instruction(struct objtool_file*file, const struct section *sec switch (opcode) { case 18: /* b[l][a] */ if (ins == 0x48000005) /* bl .+4 */ - typ = INSN_OTHER; + typ = INSN_CALL; else if (ins & 1) /* bl[a] */ typ = INSN_CALL; else /* b[a] */ MaddyMaddy, I changed the code manually and gave it a try. The Proposed fix, partially fixes the issue. It gets rid of two of the warnings, but below warning still persists.It fixes the issue for you but will reintroduce the issue with clang. The real fix is to remove the ANNOTATE_INTRA_FUNCTION_CALL in: arch/powerpc/kernel/switch.S:42: ANNOTATE_INTRA_FUNCTION_CALL arch/powerpc/kvm/book3s_hv_rmhandlers.S:1527: ANNOTATE_INTRA_FUNCTION_CALL arch/powerpc/kvm/book3s_hv_rmhandlers.S:1534: ANNOTATE_INTRA_FUNCTION_CALL
Removed ANNOTATE_INTRA_FUNCTION_CALL in above mentioned line, and it fixes couple of warnings. But below warning still persists. arch/powerpc/crypto/ghashp8-ppc.o: warning: objtool: .text+0x22c: unannotated intra-function call.
Can you give it a try ? For the last one, can you provide an assembly dump ? You get it with "objtool -dr arch/powerpc/crypto/ghashp8-ppc.o"
Assembly dump: objdump -dr arch/powerpc/crypto/ghashp8-ppc.o arch/powerpc/crypto/ghashp8-ppc.o: file format elf64-powerpcle Disassembly of section .text: 0000000000000000 <gcm_init_p8>: 0: f0 ff 00 3c lis r0,-16 4: 10 00 00 39 li r8,16 8: ff ff 80 39 li r12,-1 c: 20 00 20 39 li r9,32 10: 78 03 00 7c mr r0,r0 14: 30 00 40 39 li r10,48 18: 99 26 20 7d lxvd2x vs41,0,r4 1c: 78 3a e7 7c xor r7,r7,r7 20: 08 00 e7 38 addi r7,r7,8 24: 4c 38 a0 7c lvsr v5,0,r7 28: 0c 03 cf 10 vspltisb v6,15 2c: c4 34 a5 10 vxor v5,v5,v6 30: 6b 49 29 11 vperm v9,v9,v9,v5 34: 0c 03 10 11 vspltisb v8,-16 38: 0c 03 a1 10 vspltisb v5,1 3c: 00 40 08 11 vaddubm v8,v8,v8 40: c4 24 84 10 vxor v4,v4,v4 44: 84 2c 08 11 vor v8,v8,v5 48: ec 23 08 11 vsldoi v8,v8,v4,15 4c: 6c 28 c4 10 vsldoi v6,v4,v5,1 50: 00 40 08 11 vaddubm v8,v8,v8 54: 0c 03 e7 10 vspltisb v7,7 58: 84 34 08 11 vor v8,v8,v6 5c: 0c 4a c0 10 vspltb v6,v9,0 60: c4 29 29 11 vsl v9,v9,v5 64: 04 3b c6 10 vsrab v6,v6,v7 68: 04 44 c6 10 vand v6,v6,v8 6c: c4 34 29 11 vxor v9,v9,v6 70: 2c 4a 29 11 vsldoi v9,v9,v9,8 74: 2c 42 04 11 vsldoi v8,v4,v8,8 78: 2c 4a 64 11 vsldoi v11,v4,v9,8 7c: 2c 22 49 11 vsldoi v10,v9,v4,8 80: 99 1f 00 7d stxvd2x vs40,0,r3 84: 99 1f 68 7d stxvd2x vs43,r8,r3 88: 99 1f 29 7d stxvd2x vs41,r9,r3 8c: 99 1f 4a 7d stxvd2x vs42,r10,r3 90: 78 63 8c 7d mr r12,r12 94: 20 00 80 4e blr 98: 00 00 00 00 .long 0x0 9c: 00 0c 14 00 .long 0x140c00 a0: 00 00 02 00 .long 0x20000 a4: 00 00 00 00 .long 0x0 00000000000000a8 <gcm_gmult_p8>: a8: f8 ff 00 3c lis r0,-8 ac: 10 00 00 39 li r8,16 b0: ff ff 80 39 li r12,-1 b4: 20 00 20 39 li r9,32 b8: 78 03 00 7c mr r0,r0 bc: 30 00 40 39 li r10,48 c0: 99 1e 60 7c lxvd2x vs35,0,r3 c4: 99 26 68 7d lxvd2x vs43,r8,r4 c8: 0c 00 80 7d lvsl v12,0,r0 cc: 99 26 29 7d lxvd2x vs41,r9,r4 d0: 0c 03 a7 10 vspltisb v5,7 d4: 99 26 4a 7d lxvd2x vs42,r10,r4 d8: c4 2c 8c 11 vxor v12,v12,v5 dc: 99 26 00 7d lxvd2x vs40,0,r4 e0: 2b 1b 63 10 vperm v3,v3,v3,v12 e4: c4 24 84 10 vxor v4,v4,v4 e8: c8 5c 03 10 vpmsumd v0,v3,v11 ec: c8 4c 23 10 vpmsumd v1,v3,v9 f0: c8 54 43 10 vpmsumd v2,v3,v10 f4: c8 44 e0 10 vpmsumd v7,v0,v8 f8: 2c 22 a1 10 vsldoi v5,v1,v4,8 fc: 2c 0a c4 10 vsldoi v6,v4,v1,8 100: c4 2c 00 10 vxor v0,v0,v5 104: c4 34 42 10 vxor v2,v2,v6 108: 2c 02 00 10 vsldoi v0,v0,v0,8 10c: c4 3c 00 10 vxor v0,v0,v7 110: 2c 02 c0 10 vsldoi v6,v0,v0,8 114: c8 44 00 10 vpmsumd v0,v0,v8 118: c4 14 c6 10 vxor v6,v6,v2 11c: c4 34 00 10 vxor v0,v0,v6 120: 2b 03 00 10 vperm v0,v0,v0,v12 124: 99 1f 00 7c stxvd2x vs32,0,r3 128: 78 63 8c 7d mr r12,r12 12c: 20 00 80 4e blr 130: 00 00 00 00 .long 0x0 134: 00 0c 14 00 .long 0x140c00 138: 00 00 02 00 .long 0x20000 13c: 00 00 00 00 .long 0x0 0000000000000140 <gcm_ghash_p8>: 140: f8 ff 00 3c lis r0,-8 144: 10 00 00 39 li r8,16 148: ff ff 80 39 li r12,-1 14c: 20 00 20 39 li r9,32 150: 78 03 00 7c mr r0,r0 154: 30 00 40 39 li r10,48 158: 99 1e 00 7c lxvd2x vs32,0,r3 15c: 99 26 68 7d lxvd2x vs43,r8,r4 160: 0c 00 80 7d lvsl v12,0,r0 164: 99 26 29 7d lxvd2x vs41,r9,r4 168: 0c 03 a7 10 vspltisb v5,7 16c: 99 26 4a 7d lxvd2x vs42,r10,r4 170: c4 2c 8c 11 vxor v12,v12,v5 174: 99 26 00 7d lxvd2x vs40,0,r4 178: 2b 03 00 10 vperm v0,v0,v0,v12 17c: c4 24 84 10 vxor v4,v4,v4 180: 99 2e 60 7c lxvd2x vs35,0,r5 184: 10 00 a5 38 addi r5,r5,16 188: f0 ff c6 38 addi r6,r6,-16 18c: 2b 1b 63 10 vperm v3,v3,v3,v12 190: c4 04 63 10 vxor v3,v3,v0 194: 0c 00 00 48 b 1a0 <gcm_ghash_p8+0x60> 198: 00 00 00 60 nop 19c: 00 00 00 60 nop 1a0: f0 ff c6 30 addic r6,r6,-16 1a4: c8 5c 03 10 vpmsumd v0,v3,v11 1a8: 11 01 00 7c subfe. r0,r0,r0 1ac: c8 4c 23 10 vpmsumd v1,v3,v9 1b0: 38 30 00 7c and r0,r0,r6 1b4: c8 54 43 10 vpmsumd v2,v3,v10 1b8: 14 02 a5 7c add r5,r5,r0 1bc: c8 44 e0 10 vpmsumd v7,v0,v8 1c0: 2c 22 a1 10 vsldoi v5,v1,v4,8 1c4: 2c 0a c4 10 vsldoi v6,v4,v1,8 1c8: c4 2c 00 10 vxor v0,v0,v5 1cc: c4 34 42 10 vxor v2,v2,v6 1d0: 2c 02 00 10 vsldoi v0,v0,v0,8 1d4: c4 3c 00 10 vxor v0,v0,v7 1d8: 99 2e 60 7c lxvd2x vs35,0,r5 1dc: 10 00 a5 38 addi r5,r5,16 1e0: 2c 02 c0 10 vsldoi v6,v0,v0,8 1e4: c8 44 00 10 vpmsumd v0,v0,v8 1e8: 2b 1b 63 10 vperm v3,v3,v3,v12 1ec: c4 14 c6 10 vxor v6,v6,v2 1f0: c4 34 63 10 vxor v3,v3,v6 1f4: c4 04 63 10 vxor v3,v3,v0 1f8: a8 ff 82 41 beq 1a0 <gcm_ghash_p8+0x60> 1fc: c4 34 00 10 vxor v0,v0,v6 200: 2b 03 00 10 vperm v0,v0,v0,v12 204: 99 1f 00 7c stxvd2x vs32,0,r3 208: 78 63 8c 7d mr r12,r12 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> 230: 53 41 20 32 addic r17,r0,16723 234: 2e 30 37 2c cmpdi r23,12334 238: 20 43 52 59 rlmi r18,r10,r8,12,16 23c: 50 54 4f 47 .long 0x474f5450 240: 41 4d 53 20 subfic r2,r19,19777 244: 62 79 20 3c lis r1,31074 248: 61 70 70 72 andi. r16,r19,28769 24c: 6f 40 6f 70 andi. r15,r3,16495 250: 65 6e 73 73 andi. r19,r27,28261 254: 6c 2e 6f 72 andi. r15,r19,11884 258: 67 3e 00 00 .long 0x3e67
Also can you tell which defconfig you use or provide your .config if not standard one ?
Attached is .config file used.
Christophequoted
arch/powerpc/crypto/ghashp8-ppc.o: warning: objtool: .text+0x22c: unannotated intra-function callquoted
quoted
CC arch/powerpc/kernel/irq.o CC arch/powerpc/kernel/align.o CC arch/powerpc/kernel/signal_64.o Objdump of switch.o: arch/powerpc/kernel/switch.o: file format elf64-powerpcle Disassembly of section .text: 0000000000000000 <flush_branch_caches>: 0: a6 02 28 7d mflr r9 4: 05 00 00 48 bl 8 <flush_branch_caches+0x8> 8: 05 00 00 48 bl c <flush_branch_caches+0xc> c: 05 00 00 48 bl 10 <flush_branch_caches+0x10> 10: 05 00 00 48 bl 14 <flush_branch_caches+0x14> 14: 05 00 00 48 bl 18 <flush_branch_caches+0x18> 18: 05 00 00 48 bl 1c <flush_branch_caches+0x1c> 1c: 05 00 00 48 bl 20 <flush_branch_caches+0x20> 20: 05 00 00 48 bl 24 <flush_branch_caches+0x24> 24: 05 00 00 48 bl 28 <flush_branch_caches+0x28> 28: 05 00 00 48 bl 2c <flush_branch_caches+0x2c> arch/powerpc/kernel/switch.S failing src section: .balign 32 .global flush_branch_caches flush_branch_caches: /* Save LR into r9 */ mflr r9 // Flush the link stack .rept 64 ANNOTATE_INTRA_FUNCTION_CALL bl .+4 .endr b 1f nops 6 Maddyquoted
ChristopheRegards, Venkat.
Attachments
- ZZ-VM-config [text/plain] 170342 bytes · preview