kallsyms: avoid hardcoding the buffer size
maillist inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5J75G CVE: NA Reference: https://lore.kernel.org/rust-for-linux/CANiq72nDcJLSB3pLhkdqGdLitfmqqCUVVfkY5EjP9AcwVv9B4A@mail.gmail.com/T/#t -------------------------------- This makes it easier to update the size later on. Furthermore, a static assert is added to ensure both are updated when that happens. The relationship used is one that keeps the new size (512+1) close to the original buffer size (500). Reviewed-by: NKees Cook <keescook@chromium.org> Signed-off-by: NBoqun Feng <boqun.feng@gmail.com> Co-developed-by: NMiguel Ojeda <ojeda@kernel.org> Signed-off-by: NMiguel Ojeda <ojeda@kernel.org> Signed-off-by: NWeilong Chen <chenweilong@huawei.com>
Showing
想要评论请 注册 或 登录