Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44c13f45 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Revert "ANDROID: Revert "module: Do not expose section addresses to non-CAP_SYSLOG""



This reverts commit d837f090  as the
ramdump tooling is now fixed.

Bug: 163100336
Cc: Saravana Kannan <saravanak@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I4d0917beb848563270343515c49e0d6ad055c917
parent 94f8e723
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;