Merge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf

Pull bpf fixes from Alexei Starovoitov:
"Two small fixes to selftests"

* tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
selftests/bpf: Fix selftest btf_tag/btf_type_tag_percpu_vmlinux_helper failure
selftests/bpf: Fix bpf selftest build error

+6 -6
+3 -3
tools/testing/selftests/bpf/progs/btf_type_tag_percpu.c
··· 57 SEC("tp_btf/cgroup_mkdir") 58 int BPF_PROG(test_percpu_helper, struct cgroup *cgrp, const char *path) 59 { 60 - struct cgroup_rstat_cpu *rstat; 61 __u32 cpu; 62 63 cpu = bpf_get_smp_processor_id(); 64 - rstat = (struct cgroup_rstat_cpu *)bpf_per_cpu_ptr( 65 cgrp->self.rstat_cpu, cpu); 66 if (rstat) { 67 /* READ_ONCE */ 68 - *(volatile int *)rstat; 69 } 70 71 return 0;
··· 57 SEC("tp_btf/cgroup_mkdir") 58 int BPF_PROG(test_percpu_helper, struct cgroup *cgrp, const char *path) 59 { 60 + struct css_rstat_cpu *rstat; 61 __u32 cpu; 62 63 cpu = bpf_get_smp_processor_id(); 64 + rstat = (struct css_rstat_cpu *)bpf_per_cpu_ptr( 65 cgrp->self.rstat_cpu, cpu); 66 if (rstat) { 67 /* READ_ONCE */ 68 + *(volatile long *)rstat; 69 } 70 71 return 0;
+3 -3
tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
··· 385 386 noinline ssize_t 387 bpf_testmod_test_read(struct file *file, struct kobject *kobj, 388 - struct bin_attribute *bin_attr, 389 char *buf, loff_t off, size_t len) 390 { 391 struct bpf_testmod_test_read_ctx ctx = { ··· 465 466 noinline ssize_t 467 bpf_testmod_test_write(struct file *file, struct kobject *kobj, 468 - struct bin_attribute *bin_attr, 469 char *buf, loff_t off, size_t len) 470 { 471 struct bpf_testmod_test_write_ctx ctx = { ··· 567 568 static ssize_t 569 bpf_testmod_uprobe_write(struct file *file, struct kobject *kobj, 570 - struct bin_attribute *bin_attr, 571 char *buf, loff_t off, size_t len) 572 { 573 unsigned long offset = 0;
··· 385 386 noinline ssize_t 387 bpf_testmod_test_read(struct file *file, struct kobject *kobj, 388 + const struct bin_attribute *bin_attr, 389 char *buf, loff_t off, size_t len) 390 { 391 struct bpf_testmod_test_read_ctx ctx = { ··· 465 466 noinline ssize_t 467 bpf_testmod_test_write(struct file *file, struct kobject *kobj, 468 + const struct bin_attribute *bin_attr, 469 char *buf, loff_t off, size_t len) 470 { 471 struct bpf_testmod_test_write_ctx ctx = { ··· 567 568 static ssize_t 569 bpf_testmod_uprobe_write(struct file *file, struct kobject *kobj, 570 + const struct bin_attribute *bin_attr, 571 char *buf, loff_t off, size_t len) 572 { 573 unsigned long offset = 0;