mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
3150a73366
294 changed files with 2604 additions and 1244 deletions
|
@ -732,6 +732,7 @@ int bpf_trampoline_unlink_prog(struct bpf_prog *prog, struct bpf_trampoline *tr)
|
|||
struct bpf_trampoline *bpf_trampoline_get(u64 key,
|
||||
struct bpf_attach_target_info *tgt_info);
|
||||
void bpf_trampoline_put(struct bpf_trampoline *tr);
|
||||
int arch_prepare_bpf_dispatcher(void *image, s64 *funcs, int num_funcs);
|
||||
#define BPF_DISPATCHER_INIT(_name) { \
|
||||
.mutex = __MUTEX_INITIALIZER(_name.mutex), \
|
||||
.func = &_name##_func, \
|
||||
|
@ -1352,28 +1353,16 @@ extern struct mutex bpf_stats_enabled_mutex;
|
|||
* kprobes, tracepoints) to prevent deadlocks on map operations as any of
|
||||
* these events can happen inside a region which holds a map bucket lock
|
||||
* and can deadlock on it.
|
||||
*
|
||||
* Use the preemption safe inc/dec variants on RT because migrate disable
|
||||
* is preemptible on RT and preemption in the middle of the RMW operation
|
||||
* might lead to inconsistent state. Use the raw variants for non RT
|
||||
* kernels as migrate_disable() maps to preempt_disable() so the slightly
|
||||
* more expensive save operation can be avoided.
|
||||
*/
|
||||
static inline void bpf_disable_instrumentation(void)
|
||||
{
|
||||
migrate_disable();
|
||||
if (IS_ENABLED(CONFIG_PREEMPT_RT))
|
||||
this_cpu_inc(bpf_prog_active);
|
||||
else
|
||||
__this_cpu_inc(bpf_prog_active);
|
||||
this_cpu_inc(bpf_prog_active);
|
||||
}
|
||||
|
||||
static inline void bpf_enable_instrumentation(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_PREEMPT_RT))
|
||||
this_cpu_dec(bpf_prog_active);
|
||||
else
|
||||
__this_cpu_dec(bpf_prog_active);
|
||||
this_cpu_dec(bpf_prog_active);
|
||||
migrate_enable();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue