Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bpf: Copy map value using copy_map_value_long for percpu_cgroup_storage maps

Copy map value using 'copy_map_value_long()'. It's to keep consistent
style with the way of other percpu maps.

No functional change intended.

Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Link: https://lore.kernel.org/r/20260107022022.12843-5-leon.hwang@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Leon Hwang and committed by
Alexei Starovoitov
8526397c c6936161

+2 -4
+2 -4
kernel/bpf/local_storage.c
··· 200 200 */ 201 201 size = round_up(_map->value_size, 8); 202 202 for_each_possible_cpu(cpu) { 203 - bpf_long_memcpy(value + off, 204 - per_cpu_ptr(storage->percpu_buf, cpu), size); 203 + copy_map_value_long(_map, value + off, per_cpu_ptr(storage->percpu_buf, cpu)); 205 204 off += size; 206 205 } 207 206 rcu_read_unlock(); ··· 233 234 */ 234 235 size = round_up(_map->value_size, 8); 235 236 for_each_possible_cpu(cpu) { 236 - bpf_long_memcpy(per_cpu_ptr(storage->percpu_buf, cpu), 237 - value + off, size); 237 + copy_map_value_long(_map, per_cpu_ptr(storage->percpu_buf, cpu), value + off); 238 238 off += size; 239 239 } 240 240 rcu_read_unlock();