Fix unsuitable attributes of mce debugfs.
PATCH 1/3 Fix unsuitable attributes of mce debugfs.
The debug interfaces of mce should be desired to do following operations
- Write operation as root user
- Read operation as all users
for debugging mce functionality.
But the real attributes of interfaces of mce are 0444. Though the attributes of interfaces do not give any impact to debug mce functionality, I still think that the attributes of interfaces should be changed from 0444 to 0644.
I tested this patch on Intel64 next-tree.
Signed-off-by Jin Dongming <[email protected]>
--- arch/x86/kernel/cpu/mcheck/mce-severity.c | 2 +- arch/x86/kernel/cpu/mcheck/mce.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/mcheck/mce-severity.c +1 -1
@@ -203,7 +203,7 @@ static int __init severities_debugfs_init(void)if (dmce ==NULL ) goto err_out; fseverities_coverage =debugfs_create_file ("severities-coverage" , -0444 , dmce,NULL , +0644 , dmce,NULL , &severities_coverage_fops);if (fseverities_coverage ==NULL ) goto err_out;
arch/x86/kernel/cpu/mcheck/mce.c +1 -1
@@ -2200,7 +2200,7 @@ static int __init mcheck_debugfs_init(void) dmce =mce_get_debugfs_dir ();if (!dmce)return -ENOMEM ; - ffake_panic =debugfs_create_file ("fake_panic" ,0444 , dmce,NULL , + ffake_panic =debugfs_create_file ("fake_panic" ,0644 , dmce,NULL , &fake_panic_fops);if (!ffake_panic)return -ENOMEM ;
Signature · 1 line
1.7.2.2