mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Restrict kstats and print real pointers
There are several places where we use zfs_dbgmsg and %p to print pointers. In the Linux kernel, these values obfuscated to prevent information leaks which means the pointers aren't very useful for debugging crash dumps. We decided to restrict the permissions of dbgmsg (and some other kstats while we were at it) and print pointers with %px in zfs_dbgmsg as well as spl_dumpstack Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Gallagher <john.gallagher@delphix.com> Signed-off-by: sara hartse <sara.hartse@delphix.com> Closes #8467 Closes #8476
This commit is contained in:
committed by
Brian Behlendorf
parent
af65079300
commit
a887d653b3
@@ -102,7 +102,7 @@ void spl_dumpstack(void);
|
||||
if (!(_verify3_left OP _verify3_right)) \
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
"VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
|
||||
"failed (%p " #OP " %p)\n", \
|
||||
"failed (%px" #OP " %px)\n", \
|
||||
(void *) (_verify3_left), \
|
||||
(void *) (_verify3_right)); \
|
||||
} while (0)
|
||||
|
||||
@@ -196,7 +196,7 @@ extern kstat_t *__kstat_create(const char *ks_module, int ks_instance,
|
||||
extern void kstat_proc_entry_init(kstat_proc_entry_t *kpep,
|
||||
const char *module, const char *name);
|
||||
extern void kstat_proc_entry_delete(kstat_proc_entry_t *kpep);
|
||||
extern void kstat_proc_entry_install(kstat_proc_entry_t *kpep,
|
||||
extern void kstat_proc_entry_install(kstat_proc_entry_t *kpep, mode_t mode,
|
||||
const struct file_operations *file_ops, void *data);
|
||||
|
||||
extern void __kstat_install(kstat_t *ksp);
|
||||
|
||||
@@ -58,6 +58,7 @@ typedef struct procfs_list_node {
|
||||
|
||||
void procfs_list_install(const char *module,
|
||||
const char *name,
|
||||
mode_t mode,
|
||||
procfs_list_t *procfs_list,
|
||||
int (*show)(struct seq_file *f, void *p),
|
||||
int (*show_header)(struct seq_file *f),
|
||||
|
||||
Reference in New Issue
Block a user