Re: [PATCH v2 07/10] x86/jump_label: Implement arch_static_assert()

2018-01-18 Thread Peter Zijlstra
On Thu, Jan 18, 2018 at 02:33:22PM +0100, Borislav Petkov wrote: > On Tue, Jan 16, 2018 at 03:28:32PM +0100, Peter Zijlstra wrote: > > Implement the static (branch) assertion. It simply emits the address > > of the next instruction into a special section which objtool will read > > and validate

Re: [PATCH v2 07/10] x86/jump_label: Implement arch_static_assert()

2018-01-18 Thread Peter Zijlstra
On Thu, Jan 18, 2018 at 02:33:22PM +0100, Borislav Petkov wrote: > On Tue, Jan 16, 2018 at 03:28:32PM +0100, Peter Zijlstra wrote: > > Implement the static (branch) assertion. It simply emits the address > > of the next instruction into a special section which objtool will read > > and validate

Re: [PATCH v2 07/10] x86/jump_label: Implement arch_static_assert()

2018-01-18 Thread Borislav Petkov
On Tue, Jan 16, 2018 at 03:28:32PM +0100, Peter Zijlstra wrote: > Implement the static (branch) assertion. It simply emits the address > of the next instruction into a special section which objtool will read > and validate against either __jump_table or .altinstructions. > > Use like: > >

Re: [PATCH v2 07/10] x86/jump_label: Implement arch_static_assert()

2018-01-18 Thread Borislav Petkov
On Tue, Jan 16, 2018 at 03:28:32PM +0100, Peter Zijlstra wrote: > Implement the static (branch) assertion. It simply emits the address > of the next instruction into a special section which objtool will read > and validate against either __jump_table or .altinstructions. > > Use like: > >

[PATCH v2 07/10] x86/jump_label: Implement arch_static_assert()

2018-01-16 Thread Peter Zijlstra
Implement the static (branch) assertion. It simply emits the address of the next instruction into a special section which objtool will read and validate against either __jump_table or .altinstructions. Use like: if (static_branch_likely(_key)) { arch_static_assert();

[PATCH v2 07/10] x86/jump_label: Implement arch_static_assert()

2018-01-16 Thread Peter Zijlstra
Implement the static (branch) assertion. It simply emits the address of the next instruction into a special section which objtool will read and validate against either __jump_table or .altinstructions. Use like: if (static_branch_likely(_key)) { arch_static_assert();