From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9D07D385840D; Wed, 27 Oct 2021 19:59:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D07D385840D From: "peterz at infradead dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/102952] New code-gen options for retpolines and straight line speculation Date: Wed, 27 Oct 2021 19:59:21 +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: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: peterz at infradead dot org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: hjl.tools at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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: Wed, 27 Oct 2021 19:59:21 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102952 peterz at infradead dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |peterz at infradead dot org --- Comment #7 from peterz at infradead dot org --- (In reply to H.J. Lu from comment #3) > Created attachment 51678 [details] > A patch to add -mharden-sls=3D >=20 > x86: Add -mharden-sls=3D[none|all|return|indirect-branch] >=20 > Generate code to mitigate against straight line speculation. I'm getting (a lot) spurious int3 instructions with this, for example: 0000000000000280 : 280: 48 81 8f 90 00 00 00 00 02 00 00 orq $0x200,0x90(%rdi) 28b: 48 8b 47 20 mov 0x20(%rdi),%rax 28f: 48 89 87 98 00 00 00 mov %rax,0x98(%rdi) 296: e9 75 ff ff ff jmp 210 29b: cc int3 That's not an *indirect* jump there.=