tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git core/rcu
head: bc72cd8dac4be9572f0cae33b096f9c23460e08a
commit: 2834aaec9e68691ed8d74bdfd3bbea47b6b3972f [31/33] x86/int3: Ensure that
poke_int3_handler() is not sanitized
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
reproduce:
git checkout 2834aaec9e68691ed8d74bdfd3bbea47b6b3972f
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/x86/include/asm/math_emu.h:5:0,
from arch/x86/include/asm/processor.h:13,
from arch/x86/include/asm/cpufeature.h:5,
from arch/x86/include/asm/thread_info.h:53,
from include/linux/thread_info.h:38,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from arch/x86/kernel/alternative.c:4:
arch/x86/kernel/alternative.c: In function 'poke_int3_handler':
arch/x86/include/asm/ptrace.h:126:28: error: inlining failed in call to always_inline
'user_mode': function attribute mismatch
static __always_inline int user_mode(struct pt_regs *regs)
^~~~~~~~~
arch/x86/kernel/alternative.c:1000:6: note: called from here
if (user_mode(regs))
^~~~~~~~~~~~~~~
> arch/x86/kernel/alternative.c:961:26: error: inlining failed in
call to always_inline 'try_get_desc': function attribute mismatch
struct
bp_patching_desc *try_get_desc(struct bp_patching_desc **descp)
^~~~~~~~~~~~
arch/x86/kernel/alternative.c:1013:7: note: called from here
desc = try_get_desc(&bp_desc);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/kernel/alternative.c:17:0:
> include/linux/bsearch.h:8:7: error: inlining failed in call to
always_inline '__bsearch': function attribute mismatch
void
*__bsearch(const void *key, const void *base, size_t num, size_t size, cmp_func_t cmp)
^~~~~~~~~
arch/x86/kernel/alternative.c:1026:6: note: called from here
tp = __bsearch(ip, desc->vec, desc->nr_entries,
~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sizeof(struct text_poke_loc),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patch_cmp);
~~~~~~~~~~
arch/x86/kernel/alternative.c:977:30: error: inlining failed in call to always_inline
'text_poke_addr': function attribute mismatch
static __always_inline void *text_poke_addr(struct text_poke_loc *tp)
^~~~~~~~~~~~~~
arch/x86/kernel/alternative.c:1033:7: note: called from here
if (text_poke_addr(tp) != ip)
^~~~~~~~~~~~~~~~~~
In file included from arch/x86/include/asm/kprobes.h:18:0,
from include/linux/kprobes.h:30,
from arch/x86/kernel/alternative.c:15:
> arch/x86/include/asm/text-patching.h:67:28: error: inlining
failed in call to always_inline 'text_opcode_size': function attribute mismatch
static __always_inline int text_opcode_size(u8 opcode)
^~~~~~~~~~~~~~~~
arch/x86/kernel/alternative.c:1037:6: note: called from here
len = text_opcode_size(tp->opcode);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/include/asm/kprobes.h:18:0,
from include/linux/kprobes.h:30,
from arch/x86/kernel/alternative.c:15:
> arch/x86/include/asm/text-patching.h:144:6: error: inlining
failed in call to always_inline 'int3_emulate_call': function attribute mismatch
void int3_emulate_call(struct pt_regs *regs, unsigned long func)
^~~~~~~~~~~~~~~~~
arch/x86/kernel/alternative.c:1049:3: note: called from here
int3_emulate_call(regs, (long)ip + tp->rel32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/include/asm/kprobes.h:18:0,
from include/linux/kprobes.h:30,
from arch/x86/kernel/alternative.c:15:
> arch/x86/include/asm/text-patching.h:122:6: error: inlining
failed in call to always_inline 'int3_emulate_jmp': function attribute mismatch
void int3_emulate_jmp(struct pt_regs *regs, unsigned long ip)
^~~~~~~~~~~~~~~~
arch/x86/kernel/alternative.c:1054:3: note: called from here
int3_emulate_jmp(regs, (long)ip + tp->rel32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/x86/kernel/alternative.c:971:29: error: inlining failed in
call to always_inline 'put_desc': function attribute mismatch
static
__always_inline void put_desc(struct bp_patching_desc *desc)
^~~~~~~~
arch/x86/kernel/alternative.c:1064:2: note: called from here
put_desc(desc);
^~~~~~~~~~~~~~
--
In file included from include/linux/preempt.h:78:0,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/context_tracking.h:5,
from arch/x86/kernel/traps.c:15:
arch/x86/kernel/traps.c: In function 'do_int3':
> arch/x86/include/asm/preempt.h:24:28: error: inlining failed in
call to always_inline 'preempt_count': function attribute mismatch
static __always_inline int preempt_count(void)
^~~~~~~~~~~~~
In file included from arch/x86/include/asm/current.h:5:0,
from include/linux/sched.h:12,
from include/linux/context_tracking.h:5,
from arch/x86/kernel/traps.c:15:
include/linux/preempt.h:102:20: note: called from here
#define in_nmi() (preempt_count() & NMI_MASK)
^~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/hardirq.h:86:3: note: in expansion of macro 'BUG_ON'
BUG_ON(in_nmi() == NMI_MASK); \
^~~~~~
include/linux/hardirq.h:86:10: note: in expansion of macro 'in_nmi'
BUG_ON(in_nmi() == NMI_MASK); \
^~~~~~
arch/x86/kernel/traps.c:521:2: note: in expansion of macro 'nmi_enter'
nmi_enter();
^~~~~~~~~
In file included from include/linux/hardirq.h:7:0,
from include/linux/interrupt.h:11,
from arch/x86/kernel/traps.c:16:
> include/linux/ftrace_irq.h:10:29: error: inlining failed in call
to always_inline 'ftrace_nmi_enter': function attribute mismatch
static
__always_inline void ftrace_nmi_enter(void)
^~~~~~~~~~~~~~~~
In file included from include/linux/interrupt.h:11:0,
from arch/x86/kernel/traps.c:16:
include/linux/hardirq.h:85:3: note: called from here
ftrace_nmi_enter(); \
^~~~~~~~~~~~~~~~~~
arch/x86/kernel/traps.c:521:2: note: in expansion of macro 'nmi_enter'
nmi_enter();
^~~~~~~~~
In file included from include/linux/sched.h:12:0,
from include/linux/context_tracking.h:5,
from arch/x86/kernel/traps.c:15:
> arch/x86/include/asm/current.h:13:44: error: inlining failed in
call to always_inline 'get_current': function attribute mismatch
static
__always_inline struct task_struct *get_current(void)
^~~~~~~~~~~
arch/x86/include/asm/current.h:18:17: note: called from here
#define current get_current()
^~~~~~~~~~~~~
include/linux/lockdep.h:304:2: note: in expansion of macro 'current'
current->lockdep_recursion += LOCKDEP_OFF; \
^~~~~~~
include/linux/hardirq.h:84:3: note: in expansion of macro 'lockdep_off'
lockdep_off(); \
^~~~~~~~~~~
arch/x86/kernel/traps.c:521:2: note: in expansion of macro 'nmi_enter'
nmi_enter();
^~~~~~~~~
> arch/x86/include/asm/current.h:13:44: error: inlining failed in
call to always_inline 'get_current': function attribute mismatch
static
__always_inline struct task_struct *get_current(void)
^~~~~~~~~~~
arch/x86/include/asm/current.h:18:17: note: called from here
#define current get_current()
^~~~~~~~~~~~~
include/linux/irqflags.h:40:2: note: in expansion of macro 'current'
current->hardirq_context++; \
^~~~~~~
include/linux/hardirq.h:89:3: note: in expansion of macro
'trace_hardirq_enter'
trace_hardirq_enter(); \
^~~~~~~~~~~~~~~~~~~
arch/x86/kernel/traps.c:521:2: note: in expansion of macro 'nmi_enter'
nmi_enter();
^~~~~~~~~
In file included from include/linux/preempt.h:78:0,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/context_tracking.h:5,
from arch/x86/kernel/traps.c:15:
arch/x86/include/asm/preempt.h:77:29: error: inlining failed in call to always_inline
'__preempt_count_add': function attribute mismatch
static __always_inline void __preempt_count_add(int val)
^~~~~~~~~~~~~~~~~~~
In file included from include/linux/interrupt.h:11:0,
from arch/x86/kernel/traps.c:16:
include/linux/hardirq.h:87:3: note: called from here
__preempt_count_add(NMI_OFFSET + HARDIRQ_OFFSET); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/traps.c:521:2: note: in expansion of macro 'nmi_enter'
nmi_enter();
^~~~~~~~~
In file included from include/linux/preempt.h:78:0,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/context_tracking.h:5,
from arch/x86/kernel/traps.c:15:
> arch/x86/include/asm/preempt.h:24:28: error: inlining failed in
call to always_inline 'preempt_count': function attribute mismatch
static __always_inline int preempt_count(void)
^~~~~~~~~~~~~
In file included from arch/x86/include/asm/current.h:5:0,
from include/linux/sched.h:12,
from include/linux/context_tracking.h:5,
from arch/x86/kernel/traps.c:15:
include/linux/preempt.h:102:20: note: called from here
#define in_nmi() (preempt_count() & NMI_MASK)
^~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/hardirq.h:96:3: note: in expansion of macro 'BUG_ON'
BUG_ON(!in_nmi()); \
^~~~~~
include/linux/hardirq.h:96:11: note: in expansion of macro 'in_nmi'
BUG_ON(!in_nmi()); \
^~~~~~
arch/x86/kernel/traps.c:543:2: note: in expansion of macro 'nmi_exit'
nmi_exit();
^~~~~~~~
In file included from include/linux/sched.h:12:0,
from include/linux/context_tracking.h:5,
from arch/x86/kernel/traps.c:15:
> arch/x86/include/asm/current.h:13:44: error: inlining failed in
call to always_inline 'get_current': function attribute mismatch
static
__always_inline struct task_struct *get_current(void)
^~~~~~~~~~~
arch/x86/include/asm/current.h:18:17: note: called from here
#define current get_current()
^~~~~~~~~~~~~
include/linux/irqflags.h:44:2: note: in expansion of macro 'current'
current->hardirq_context--; \
^~~~~~~
include/linux/hardirq.h:94:3: note: in expansion of macro 'trace_hardirq_exit'
trace_hardirq_exit(); \
^~~~~~~~~~~~~~~~~~
arch/x86/kernel/traps.c:543:2: note: in expansion of macro 'nmi_exit'
nmi_exit();
^~~~~~~~
> arch/x86/include/asm/current.h:13:44: error: inlining failed in
call to always_inline 'get_current': function attribute mismatch
static
__always_inline struct task_struct *get_current(void)
^~~~~~~~~~~
arch/x86/include/asm/current.h:18:17: note: called from here
#define current get_current()
^~~~~~~~~~~~~
include/linux/lockdep.h:309:2: note: in expansion of macro 'current'
current->lockdep_recursion -= LOCKDEP_OFF; \
^~~~~~~
include/linux/hardirq.h:99:3: note: in expansion of macro 'lockdep_on'
lockdep_on(); \
^~~~~~~~~~
arch/x86/kernel/traps.c:543:2: note: in expansion of macro 'nmi_exit'
nmi_exit();
^~~~~~~~
In file included from include/linux/hardirq.h:7:0,
from include/linux/interrupt.h:11,
from arch/x86/kernel/traps.c:16:
> include/linux/ftrace_irq.h:18:29: error: inlining failed in call
to always_inline 'ftrace_nmi_exit': function attribute mismatch
static
__always_inline void ftrace_nmi_exit(void)
^~~~~~~~~~~~~~~
In file included from include/linux/interrupt.h:11:0,
from arch/x86/kernel/traps.c:16:
include/linux/hardirq.h:98:3: note: called from here
ftrace_nmi_exit(); \
^~~~~~~~~~~~~~~~~
arch/x86/kernel/traps.c:543:2: note: in expansion of macro 'nmi_exit'
nmi_exit();
^~~~~~~~
In file included from include/linux/preempt.h:78:0,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/context_tracking.h:5,
from arch/x86/kernel/traps.c:15:
arch/x86/include/asm/preempt.h:82:29: error: inlining failed in call to always_inline
'__preempt_count_sub': function attribute mismatch
static __always_inline void __preempt_count_sub(int val)
^~~~~~~~~~~~~~~~~~~
In file included from include/linux/interrupt.h:11:0,
from arch/x86/kernel/traps.c:16:
include/linux/hardirq.h:97:3: note: called from here
__preempt_count_sub(NMI_OFFSET + HARDIRQ_OFFSET); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/traps.c:543:2: note: in expansion of macro 'nmi_exit'
nmi_exit();
^~~~~~~~
--
In file included from include/linux/preempt.h:78:0,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/context_tracking.h:5,
from arch/x86//kernel/traps.c:15:
arch/x86//kernel/traps.c: In function 'do_int3':
> arch/x86/include/asm/preempt.h:24:28: error: inlining failed in
call to always_inline 'preempt_count': function attribute mismatch
static __always_inline int preempt_count(void)
^~~~~~~~~~~~~
In file included from arch/x86/include/asm/current.h:5:0,
from include/linux/sched.h:12,
from include/linux/context_tracking.h:5,
from arch/x86//kernel/traps.c:15:
include/linux/preempt.h:102:20: note: called from here
#define in_nmi() (preempt_count() & NMI_MASK)
^~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/hardirq.h:86:3: note: in expansion of macro 'BUG_ON'
BUG_ON(in_nmi() == NMI_MASK); \
^~~~~~
include/linux/hardirq.h:86:10: note: in expansion of macro 'in_nmi'
BUG_ON(in_nmi() == NMI_MASK); \
^~~~~~
arch/x86//kernel/traps.c:521:2: note: in expansion of macro 'nmi_enter'
nmi_enter();
^~~~~~~~~
In file included from include/linux/hardirq.h:7:0,
from include/linux/interrupt.h:11,
from arch/x86//kernel/traps.c:16:
> include/linux/ftrace_irq.h:10:29: error: inlining failed in call
to always_inline 'ftrace_nmi_enter': function attribute mismatch
static
__always_inline void ftrace_nmi_enter(void)
^~~~~~~~~~~~~~~~
In file included from include/linux/interrupt.h:11:0,
from arch/x86//kernel/traps.c:16:
include/linux/hardirq.h:85:3: note: called from here
ftrace_nmi_enter(); \
^~~~~~~~~~~~~~~~~~
arch/x86//kernel/traps.c:521:2: note: in expansion of macro 'nmi_enter'
nmi_enter();
^~~~~~~~~
In file included from include/linux/sched.h:12:0,
from include/linux/context_tracking.h:5,
from arch/x86//kernel/traps.c:15:
> arch/x86/include/asm/current.h:13:44: error: inlining failed in
call to always_inline 'get_current': function attribute mismatch
static
__always_inline struct task_struct *get_current(void)
^~~~~~~~~~~
arch/x86/include/asm/current.h:18:17: note: called from here
#define current get_current()
^~~~~~~~~~~~~
include/linux/lockdep.h:304:2: note: in expansion of macro 'current'
current->lockdep_recursion += LOCKDEP_OFF; \
^~~~~~~
include/linux/hardirq.h:84:3: note: in expansion of macro 'lockdep_off'
lockdep_off(); \
^~~~~~~~~~~
arch/x86//kernel/traps.c:521:2: note: in expansion of macro 'nmi_enter'
nmi_enter();
^~~~~~~~~
> arch/x86/include/asm/current.h:13:44: error: inlining failed in
call to always_inline 'get_current': function attribute mismatch
static
__always_inline struct task_struct *get_current(void)
^~~~~~~~~~~
arch/x86/include/asm/current.h:18:17: note: called from here
#define current get_current()
^~~~~~~~~~~~~
include/linux/irqflags.h:40:2: note: in expansion of macro 'current'
current->hardirq_context++; \
^~~~~~~
include/linux/hardirq.h:89:3: note: in expansion of macro
'trace_hardirq_enter'
trace_hardirq_enter(); \
^~~~~~~~~~~~~~~~~~~
arch/x86//kernel/traps.c:521:2: note: in expansion of macro 'nmi_enter'
nmi_enter();
^~~~~~~~~
In file included from include/linux/preempt.h:78:0,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/context_tracking.h:5,
from arch/x86//kernel/traps.c:15:
arch/x86/include/asm/preempt.h:77:29: error: inlining failed in call to always_inline
'__preempt_count_add': function attribute mismatch
static __always_inline void __preempt_count_add(int val)
^~~~~~~~~~~~~~~~~~~
In file included from include/linux/interrupt.h:11:0,
from arch/x86//kernel/traps.c:16:
include/linux/hardirq.h:87:3: note: called from here
__preempt_count_add(NMI_OFFSET + HARDIRQ_OFFSET); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86//kernel/traps.c:521:2: note: in expansion of macro 'nmi_enter'
nmi_enter();
^~~~~~~~~
In file included from include/linux/preempt.h:78:0,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/context_tracking.h:5,
from arch/x86//kernel/traps.c:15:
> arch/x86/include/asm/preempt.h:24:28: error: inlining failed in
call to always_inline 'preempt_count': function attribute mismatch
static __always_inline int preempt_count(void)
^~~~~~~~~~~~~
In file included from arch/x86/include/asm/current.h:5:0,
from include/linux/sched.h:12,
from include/linux/context_tracking.h:5,
from arch/x86//kernel/traps.c:15:
include/linux/preempt.h:102:20: note: called from here
#define in_nmi() (preempt_count() & NMI_MASK)
^~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/hardirq.h:96:3: note: in expansion of macro 'BUG_ON'
BUG_ON(!in_nmi()); \
^~~~~~
include/linux/hardirq.h:96:11: note: in expansion of macro 'in_nmi'
BUG_ON(!in_nmi()); \
^~~~~~
arch/x86//kernel/traps.c:543:2: note: in expansion of macro 'nmi_exit'
nmi_exit();
^~~~~~~~
In file included from include/linux/sched.h:12:0,
from include/linux/context_tracking.h:5,
from arch/x86//kernel/traps.c:15:
> arch/x86/include/asm/current.h:13:44: error: inlining failed in
call to always_inline 'get_current': function attribute mismatch
static
__always_inline struct task_struct *get_current(void)
^~~~~~~~~~~
arch/x86/include/asm/current.h:18:17: note: called from here
#define current get_current()
^~~~~~~~~~~~~
include/linux/irqflags.h:44:2: note: in expansion of macro 'current'
current->hardirq_context--; \
^~~~~~~
include/linux/hardirq.h:94:3: note: in expansion of macro 'trace_hardirq_exit'
trace_hardirq_exit(); \
^~~~~~~~~~~~~~~~~~
arch/x86//kernel/traps.c:543:2: note: in expansion of macro 'nmi_exit'
nmi_exit();
^~~~~~~~
> arch/x86/include/asm/current.h:13:44: error: inlining failed in
call to always_inline 'get_current': function attribute mismatch
static
__always_inline struct task_struct *get_current(void)
^~~~~~~~~~~
arch/x86/include/asm/current.h:18:17: note: called from here
#define current get_current()
^~~~~~~~~~~~~
include/linux/lockdep.h:309:2: note: in expansion of macro 'current'
current->lockdep_recursion -= LOCKDEP_OFF; \
^~~~~~~
include/linux/hardirq.h:99:3: note: in expansion of macro 'lockdep_on'
lockdep_on(); \
^~~~~~~~~~
arch/x86//kernel/traps.c:543:2: note: in expansion of macro 'nmi_exit'
nmi_exit();
^~~~~~~~
In file included from include/linux/hardirq.h:7:0,
from include/linux/interrupt.h:11,
from arch/x86//kernel/traps.c:16:
> include/linux/ftrace_irq.h:18:29: error: inlining failed in call
to always_inline 'ftrace_nmi_exit': function attribute mismatch
static
__always_inline void ftrace_nmi_exit(void)
^~~~~~~~~~~~~~~
In file included from include/linux/interrupt.h:11:0,
from arch/x86//kernel/traps.c:16:
include/linux/hardirq.h:98:3: note: called from here
ftrace_nmi_exit(); \
^~~~~~~~~~~~~~~~~
arch/x86//kernel/traps.c:543:2: note: in expansion of macro 'nmi_exit'
nmi_exit();
^~~~~~~~
In file included from include/linux/preempt.h:78:0,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/context_tracking.h:5,
from arch/x86//kernel/traps.c:15:
arch/x86/include/asm/preempt.h:82:29: error: inlining failed in call to always_inline
'__preempt_count_sub': function attribute mismatch
static __always_inline void __preempt_count_sub(int val)
^~~~~~~~~~~~~~~~~~~
In file included from include/linux/interrupt.h:11:0,
from arch/x86//kernel/traps.c:16:
include/linux/hardirq.h:97:3: note: called from here
__preempt_count_sub(NMI_OFFSET + HARDIRQ_OFFSET); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86//kernel/traps.c:543:2: note: in expansion of macro 'nmi_exit'
nmi_exit();
^~~~~~~~
..
vim +/try_get_desc +961 arch/x86/kernel/alternative.c
1f676247f36a4b Peter Zijlstra 2019-12-11 959
809106a6157bce Thomas Gleixner 2020-01-21 960 static __always_inline
809106a6157bce Thomas Gleixner 2020-01-21 @961 struct bp_patching_desc
*try_get_desc(struct bp_patching_desc **descp)
1f676247f36a4b Peter Zijlstra 2019-12-11 962 {
a9d380bd4091e7 Peter Zijlstra 2020-01-24 963 struct bp_patching_desc *desc
= READ_ONCE_NOCHECK(*descp); /* rcu_dereference */
1f676247f36a4b Peter Zijlstra 2019-12-11 964
a9d380bd4091e7 Peter Zijlstra 2020-01-24 965 if (!desc ||
!arch_atomic_inc_not_zero(&desc->refs))
1f676247f36a4b Peter Zijlstra 2019-12-11 966 return NULL;
1f676247f36a4b Peter Zijlstra 2019-12-11 967
1f676247f36a4b Peter Zijlstra 2019-12-11 968 return desc;
1f676247f36a4b Peter Zijlstra 2019-12-11 969 }
1f676247f36a4b Peter Zijlstra 2019-12-11 970
809106a6157bce Thomas Gleixner 2020-01-21 @971 static __always_inline void
put_desc(struct bp_patching_desc *desc)
1f676247f36a4b Peter Zijlstra 2019-12-11 972 {
1f676247f36a4b Peter Zijlstra 2019-12-11 973 smp_mb__before_atomic();
a9d380bd4091e7 Peter Zijlstra 2020-01-24 974
arch_atomic_dec(&desc->refs);
1f676247f36a4b Peter Zijlstra 2019-12-11 975 }
c0213b0ac03cf6 Daniel Bristot de Oliveira 2019-06-12 976
:::::: The code at line 961 was first introduced by commit
:::::: 809106a6157bce0fff76bfc7864e7ce34080abe0 x86/int3: Ensure that poke_int3_handler()
is not traced
:::::: TO: Thomas Gleixner <tglx(a)linutronix.de>
:::::: CC: Peter Zijlstra <peterz(a)infradead.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org