From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 82E4E3858D35; Wed, 3 Nov 2021 14:07:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 82E4E3858D35 From: "msc at linux dot ibm.com" To: glibc-bugs@sourceware.org Subject: [Bug libc/28532] New: powerpc64[le]: CFI for assembly templated syscalls is incorrect Date: Wed, 03 Nov 2021 14:07:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.35 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: msc at linux dot ibm.com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Nov 2021 14:07:21 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28532 Bug ID: 28532 Summary: powerpc64[le]: CFI for assembly templated syscalls is incorrect Product: glibc Version: 2.35 Status: NEW Severity: normal Priority: P2 Component: libc Assignee: unassigned at sourceware dot org Reporter: msc at linux dot ibm.com CC: drepper.fsp at gmail dot com Target Milestone: --- Syscalls based on the ASM templates have missing CFI for r31 and info for L= R is innacurate. Example for kill: $ readelf -wF libc.so.6 | grep 0004b9d4.. -A 7 && objdump --disassemble=3Dk= ill libc.so.6=20 00004a48 000000000000001c 00004a4c FDE cie=3D00000000 pc=3D000000000004b9d4..000000000004ba3c LOC CFA ra=20=20=20=20 000000000004b9d4 r1+0 u <------ Missing information for r31 000000000004b9e8 r1+48 u <------ Wrong LOC 000000000004b9fc r1+48 c+16 <------ Wrong offset, should be c-32 000000000004ba08 r1+48=20=20=20=20 000000000004ba1c r1+0=20=20=20=20=20 00004a68 000000000000001c 00004a6c FDE cie=3D00000000 pc=3D000000000004ba80..000000000004bb10 LOC CFA ra=20=20=20=20 libc.so.6: file format elf64-powerpcle Disassembly of section .text: 000000000004b9d4 : 4b9d4: 1f 00 4c 3c addis r2,r12,31 4b9d8: 2c c3 42 38 addi r2,r2,-15572 4b9dc: 25 00 00 38 li r0,37 4b9e0: d1 ff 21 f8 stdu r1,-48(r1) 4b9e4: 20 00 e1 fb std r31,32(r1) 4b9e8: 98 8f ed eb ld r31,-28776(r13) 4b9ec: 10 00 ff 77 andis. r31,r31,16 4b9f0: 1c 00 82 41 beq 4ba0c 4b9f4: a6 02 28 7d mflr r9 4b9f8: 10 00 21 f9 std r9,16(r1) 4b9fc: 01 00 00 44 scv 0 4ba00: 10 00 21 e9 ld r9,16(r1) 4ba04: a6 03 28 7d mtlr r9 4ba08: 08 00 00 48 b 4ba10 4ba0c: 02 00 00 44 sc 4ba10: 00 00 bf 2e cmpdi cr5,r31,0 4ba14: 20 00 e1 eb ld r31,32(r1) 4ba18: 30 00 21 38 addi r1,r1,48 4ba1c: 18 00 96 41 beq cr5,4ba34 4ba20: 01 f0 20 39 li r9,-4095 4ba24: 40 48 23 7c cmpld r3,r9 4ba28: 20 00 e0 4d bltlr+ 4ba2c: d0 00 63 7c neg r3,r3 4ba30: 08 00 00 48 b 4ba38 4ba34: 20 00 e3 4c bnslr+ 4ba38: c8 32 fe 4b b 2ed00 <__syscall_error> ... 4ba44: 40 20 0c 00 .long 0xc2040 4ba48: 68 00 00 00 .long 0x68 4ba4c: 06 00 5f 5f rlwnm r31,r26,r0,0,3 4ba50: 6b 69 6c 6c xoris r12,r3,26987 Disassembly of section __libc_freeres_fn: --=20 You are receiving this mail because: You are on the CC list for the bug.=