From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 20C623857C73; Tue, 28 Jul 2020 03:41:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20C623857C73 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1595907664; bh=8H3mcZmtAe9PFAnzh71OmbyJHhsFrpIW9laSHnuddyY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AHRIEyuqMQwKqkMLyCh4u1cKivZhEhSTMRnoYDK2muiPvJoM+lxGtZR5+7duuFw6s 3rES2msM/bPPn1GPU/LhkUbNHUEChCs98QA/IbWSMpIwtrpiQ1seesvgMnpm+w0AsZ +AdoDOlFX6MMI0INWJbnFqizgM0JKazMjsGB45M0= From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/96350] [cet] For ENDBR immediate, the binary would include a gadget that starts with a fake ENDBR64 opcode. Date: Tue, 28 Jul 2020 03:41:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2020 03:41:04 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96350 --- Comment #2 from H.J. Lu --- We can force 0xfa1e0ff3 into memory with [hjl@gnu-snb-1 tmp]$ cat bar.s .text .p2align 4 .globl foo .type foo, @function foo: movl .LC0(%rip), %eax ret .section .rodata.cst4,"aM",@progbits,4 .align 4 .LC0: .long 0xfa1e0ff3 .section .note.GNU-stack,"",@progbits [hjl@gnu-snb-1 tmp]$ gcc -c bar.s [hjl@gnu-snb-1 tmp]$ objdump -dwr bar.o bar.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 : 0: 8b 05 00 00 00 00 mov 0x0(%rip),%eax # 6 = =20=20=20=20=20 2: R_X86_64_PC32 .LC0-0x4 6: c3 ret=20=20=20=20 [hjl@gnu-snb-1 tmp]$=