mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
Revert "ANDROID: Revert "module: Do not expose section addresses to non-CAP_SYSLOG""
This reverts commit d837f090a6 as the
ramdump tooling is now fixed.
Bug: 163100336
Cc: Saravana Kannan <saravanak@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4d0917beb848563270343515c49e0d6ad055c917
This commit is contained in:
parent
94f8e7236d
commit
44c13f4537
1 changed files with 3 additions and 3 deletions
|
|
@ -1526,8 +1526,8 @@ static ssize_t module_sect_read(struct file *file, struct kobject *kobj,
|
|||
if (pos != 0)
|
||||
return -EINVAL;
|
||||
|
||||
return sprintf(buf, "0x%px\n", kptr_restrict < 2 ?
|
||||
(void *)sattr->address : NULL);
|
||||
return sprintf(buf, "0x%px\n",
|
||||
kallsyms_show_value(file->f_cred) ? (void *)sattr->address : NULL);
|
||||
}
|
||||
|
||||
static void free_sect_attrs(struct module_sect_attrs *sect_attrs)
|
||||
|
|
@ -4420,7 +4420,7 @@ static int modules_open(struct inode *inode, struct file *file)
|
|||
|
||||
if (!err) {
|
||||
struct seq_file *m = file->private_data;
|
||||
m->private = kallsyms_show_value(current_cred()) ? NULL : (void *)8ul;
|
||||
m->private = kallsyms_show_value(file->f_cred) ? NULL : (void *)8ul;
|
||||
}
|
||||
|
||||
return err;
|
||||
|
|
|
|||
Loading…
Reference in a new issue