[Bug 219226] New: Invalid BPF_MAP_TYPE_PERCPU_ARRAY value size limits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=219226

            Bug ID: 219226
           Summary: Invalid BPF_MAP_TYPE_PERCPU_ARRAY value size limits
           Product: Documentation
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: man-pages
          Assignee: documentation_man-pages@xxxxxxxxxxxxxxxxxxxx
          Reporter: kernel@dimka.rocks
        Regression: No

Not a man page but I'm not sure where else to submit, it's part of the docs.

In Documentation/bpf/map_array.rst in the end of the first paragraph

> The value stored can be of any size, however, all array elements are aligned
> to 8 bytes.

should be changed to:

> The value stored can be of any size for BPF_MAP_TYPE_ARRAY and not more than
> PCPU_MIN_UNIT_SIZE (currently 32 kB) for BPF_MAP_TYPE_PERCPU_ARRAY. All array
> elements are aligned to 8 bytes.



The limitation is in linux/mm/percpu.c

        if (unlikely(!size || size > PCPU_MIN_UNIT_SIZE || align > PAGE_SIZE ||
                     !is_power_of_2(align))) {
                WARN(do_warn, "illegal size (%zu) or align (%zu) for percpu
allocation\n",
                     size, align);
                return NULL;
        }


PCPU_MIN_UNIT_SIZE defined in include/linux/percpu.h as "PFN_ALIGN(32 << 10)"

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux