Skip to content

Commit 6efcdad

Browse files
committed
Daniel Borkmann says: ==================== bpf 2021-12-08 We've added 12 non-merge commits during the last 22 day(s) which contain a total of 29 files changed, 659 insertions(+), 80 deletions(-). The main changes are: 1) Fix an off-by-two error in packet range markings and also add a batch of new tests for coverage of these corner cases, from Maxim Mikityanskiy. 2) Fix a compilation issue on MIPS JIT for R10000 CPUs, from Johan Almbladh. 3) Fix two functional regressions and a build warning related to BTF kfunc for modules, from Kumar Kartikeya Dwivedi. 4) Fix outdated code and docs regarding BPF's migrate_disable() use on non- PREEMPT_RT kernels, from Sebastian Andrzej Siewior. 5) Add missing includes in order to be able to detangle cgroup vs bpf header dependencies, from Jakub Kicinski. 6) Fix regression in BPF sockmap tests caused by missing detachment of progs from sockets when they are removed from the map, from John Fastabend. 7) Fix a missing "no previous prototype" warning in x86 JIT caused by BPF dispatcher, from Björn Töpel. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf: Add selftests to cover packet access corner cases bpf: Fix the off-by-two error in range markings treewide: Add missing includes masked by cgroup -> bpf dependency tools/resolve_btfids: Skip unresolved symbol warning for empty BTF sets bpf: Fix bpf_check_mod_kfunc_call for built-in modules bpf: Make CONFIG_DEBUG_INFO_BTF depend upon CONFIG_BPF_SYSCALL mips, bpf: Fix reference to non-existing Kconfig symbol bpf: Make sure bpf_disable_instrumentation() is safe vs preemption. Documentation/locking/locktypes: Update migrate_disable() bits. bpf, sockmap: Re-evaluate proto ops when psock is removed from sockmap bpf, sockmap: Attach map progs to psock early for feature probes bpf, x86: Fix "no previous prototype" warning ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 2b29cb9 + b560b21 commit 6efcdad

File tree

29 files changed

+659
-80
lines changed

29 files changed

+659
-80
lines changed

Documentation/locking/locktypes.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -439,11 +439,9 @@ preemption. The following substitution works on both kernels::
439439
spin_lock(&p->lock);
440440
p->count += this_cpu_read(var2);
441441

442-
On a non-PREEMPT_RT kernel migrate_disable() maps to preempt_disable()
443-
which makes the above code fully equivalent. On a PREEMPT_RT kernel
444442
migrate_disable() ensures that the task is pinned on the current CPU which
445443
in turn guarantees that the per-CPU access to var1 and var2 are staying on
446-
the same CPU.
444+
the same CPU while the task remains preemptible.
447445

448446
The migrate_disable() substitution is not valid for the following
449447
scenario::
@@ -456,9 +454,8 @@ scenario::
456454
p = this_cpu_ptr(&var1);
457455
p->val = func2();
458456

459-
While correct on a non-PREEMPT_RT kernel, this breaks on PREEMPT_RT because
460-
here migrate_disable() does not protect against reentrancy from a
461-
preempting task. A correct substitution for this case is::
457+
This breaks because migrate_disable() does not protect against reentrancy from
458+
a preempting task. A correct substitution for this case is::
462459

463460
func()
464461
{

arch/mips/net/bpf_jit_comp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ do { \
9898
#define emit(...) __emit(__VA_ARGS__)
9999

100100
/* Workaround for R10000 ll/sc errata */
101-
#ifdef CONFIG_WAR_R10000
101+
#ifdef CONFIG_WAR_R10000_LLSC
102102
#define LLSC_beqz beqzl
103103
#else
104104
#define LLSC_beqz beqz

block/fops.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/falloc.h>
1616
#include <linux/suspend.h>
1717
#include <linux/fs.h>
18+
#include <linux/module.h>
1819
#include "blk.h"
1920

2021
static inline struct inode *bdev_file_inode(struct file *file)

drivers/gpu/drm/drm_gem_shmem_helper.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <linux/shmem_fs.h>
1010
#include <linux/slab.h>
1111
#include <linux/vmalloc.h>
12+
#include <linux/module.h>
1213

1314
#ifdef CONFIG_X86
1415
#include <asm/set_memory.h>

drivers/gpu/drm/i915/gt/intel_gtt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <linux/slab.h> /* fault-inject.h is not standalone! */
77

88
#include <linux/fault-inject.h>
9+
#include <linux/sched/mm.h>
910

1011
#include "gem/i915_gem_lmem.h"
1112
#include "i915_trace.h"

drivers/gpu/drm/i915/i915_request.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <linux/sched.h>
3030
#include <linux/sched/clock.h>
3131
#include <linux/sched/signal.h>
32+
#include <linux/sched/mm.h>
3233

3334
#include "gem/i915_gem_context.h"
3435
#include "gt/intel_breadcrumbs.h"

drivers/gpu/drm/lima/lima_device.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <linux/regulator/consumer.h>
55
#include <linux/reset.h>
66
#include <linux/clk.h>
7+
#include <linux/slab.h>
78
#include <linux/dma-mapping.h>
89
#include <linux/platform_device.h>
910

drivers/gpu/drm/msm/msm_gem_shrinker.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
#include <linux/vmalloc.h>
8+
#include <linux/sched/mm.h>
89

910
#include "msm_drv.h"
1011
#include "msm_gem.h"

drivers/gpu/drm/ttm/ttm_tt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <linux/sched.h>
3535
#include <linux/shmem_fs.h>
3636
#include <linux/file.h>
37+
#include <linux/module.h>
3738
#include <drm/drm_cache.h>
3839
#include <drm/ttm/ttm_bo_driver.h>
3940

drivers/net/ethernet/huawei/hinic/hinic_sriov.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <linux/interrupt.h>
99
#include <linux/etherdevice.h>
1010
#include <linux/netdevice.h>
11+
#include <linux/module.h>
1112

1213
#include "hinic_hw_dev.h"
1314
#include "hinic_dev.h"

0 commit comments

Comments
 (0)