From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yu-cheng Yu Subject: Re: [PATCH v8 01/27] Documentation/x86: Add CET description Date: Wed, 14 Aug 2019 08:57:19 -0700 Message-ID: <84fc1b3bb2dbcf52ca79cb1141a431e087f082b5.camel@intel.com> References: <20190813205225.12032-1-yu-cheng.yu@intel.com> <20190813205225.12032-2-yu-cheng.yu@intel.com> <87tvakgofi.fsf@oldenburg2.str.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <87tvakgofi.fsf@oldenburg2.str.redhat.com> Sender: linux-kernel-owner@vger.kernel.org To: Florian Weimer Cc: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel List-Id: linux-arch.vger.kernel.org On Wed, 2019-08-14 at 10:07 +0200, Florian Weimer wrote: > * Yu-cheng Yu: > > > +ENDBR > > + The compiler inserts an ENDBR at all valid branch targets. Any > > + CALL/JMP to a target without an ENDBR triggers a control > > + protection fault. > > Is this really correct? I think ENDBR is needed only for indirect > branch targets where the jump/call does not have a NOTRACK prefix. You are right. I will fix the wording. Yu-cheng From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com ([192.55.52.151]:38992 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbfHNQG7 (ORCPT ); Wed, 14 Aug 2019 12:06:59 -0400 Message-ID: <84fc1b3bb2dbcf52ca79cb1141a431e087f082b5.camel@intel.com> Subject: Re: [PATCH v8 01/27] Documentation/x86: Add CET description From: Yu-cheng Yu Date: Wed, 14 Aug 2019 08:57:19 -0700 In-Reply-To: <87tvakgofi.fsf@oldenburg2.str.redhat.com> References: <20190813205225.12032-1-yu-cheng.yu@intel.com> <20190813205225.12032-2-yu-cheng.yu@intel.com> <87tvakgofi.fsf@oldenburg2.str.redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Florian Weimer Cc: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin Message-ID: <20190814155719.qf-u6v6aqQcLqxcNffw5O6x0osW_7tpsc0blojIZitA@z> On Wed, 2019-08-14 at 10:07 +0200, Florian Weimer wrote: > * Yu-cheng Yu: > > > +ENDBR > > + The compiler inserts an ENDBR at all valid branch targets. Any > > + CALL/JMP to a target without an ENDBR triggers a control > > + protection fault. > > Is this really correct? I think ENDBR is needed only for indirect > branch targets where the jump/call does not have a NOTRACK prefix. You are right. I will fix the wording. Yu-cheng