Merge tag 'hardening-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull hardening update from Kees Cook: - Fix kheaders array declaration to avoid tripping FORTIFY_SOURCE * tag 'hardening-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: kheaders: Use array declaration instead of char
This commit is contained in:
@@ -26,15 +26,15 @@ asm (
|
||||
" .popsection \n"
|
||||
);
|
||||
|
||||
extern char kernel_headers_data;
|
||||
extern char kernel_headers_data_end;
|
||||
extern char kernel_headers_data[];
|
||||
extern char kernel_headers_data_end[];
|
||||
|
||||
static ssize_t
|
||||
ikheaders_read(struct file *file, struct kobject *kobj,
|
||||
struct bin_attribute *bin_attr,
|
||||
char *buf, loff_t off, size_t len)
|
||||
{
|
||||
memcpy(buf, &kernel_headers_data + off, len);
|
||||
memcpy(buf, &kernel_headers_data[off], len);
|
||||
return len;
|
||||
}
|
||||
|
||||
@@ -48,8 +48,8 @@ static struct bin_attribute kheaders_attr __ro_after_init = {
|
||||
|
||||
static int __init ikheaders_init(void)
|
||||
{
|
||||
kheaders_attr.size = (&kernel_headers_data_end -
|
||||
&kernel_headers_data);
|
||||
kheaders_attr.size = (kernel_headers_data_end -
|
||||
kernel_headers_data);
|
||||
return sysfs_create_bin_file(kernel_kobj, &kheaders_attr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user