Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

s390/ap/zcrypt: Revisit module param permissions

Revisit and rework module parameter permissions for AP bus and zcrypt
device drivers.

In general all sysfs permissions for AP bus and zcrypt parameters should be
0444 so that user space tools like lszcrypt can read the current value of
module parameters.

Some exceptions are only for some internal tweak parameters like
ap_msg_pool_min_items and zcrypt_mempool_threshold which should only be
readable by an administrator.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>

authored by

Harald Freudenberger and committed by
Heiko Carstens
71f9bc6f afa8fa52

+7 -7
+6 -6
drivers/s390/crypto/ap_bus.c
··· 52 52 53 53 int ap_domain_index = -1; /* Adjunct Processor Domain Index */ 54 54 static DEFINE_SPINLOCK(ap_domain_lock); 55 - module_param_named(domain, ap_domain_index, int, 0440); 55 + module_param_named(domain, ap_domain_index, int, 0444); 56 56 MODULE_PARM_DESC(domain, "domain index for ap devices"); 57 57 EXPORT_SYMBOL(ap_domain_index); 58 58 59 59 static int ap_thread_flag; 60 - module_param_named(poll_thread, ap_thread_flag, int, 0440); 60 + module_param_named(poll_thread, ap_thread_flag, int, 0444); 61 61 MODULE_PARM_DESC(poll_thread, "Turn on/off poll thread, default is 0 (off)."); 62 62 63 63 static char *apm_str; 64 - module_param_named(apmask, apm_str, charp, 0440); 64 + module_param_named(apmask, apm_str, charp, 0444); 65 65 MODULE_PARM_DESC(apmask, "AP bus adapter mask."); 66 66 67 67 static char *aqm_str; 68 - module_param_named(aqmask, aqm_str, charp, 0440); 68 + module_param_named(aqmask, aqm_str, charp, 0444); 69 69 MODULE_PARM_DESC(aqmask, "AP bus domain mask."); 70 70 71 71 static int ap_useirq = 1; 72 - module_param_named(useirq, ap_useirq, int, 0440); 72 + module_param_named(useirq, ap_useirq, int, 0444); 73 73 MODULE_PARM_DESC(useirq, "Use interrupt if available, default is 1 (on)."); 74 74 75 75 atomic_t ap_max_msg_size = ATOMIC_INIT(AP_DEFAULT_MAX_MSG_SIZE); ··· 130 130 */ 131 131 static mempool_t *ap_msg_pool; 132 132 static unsigned int ap_msg_pool_min_items = 8; 133 - module_param_named(msgpool_min_items, ap_msg_pool_min_items, uint, 0440); 133 + module_param_named(msgpool_min_items, ap_msg_pool_min_items, uint, 0400); 134 134 MODULE_PARM_DESC(msgpool_min_items, "AP message pool minimal items"); 135 135 136 136 /*
+1 -1
drivers/s390/crypto/zcrypt_api.c
··· 50 50 MODULE_LICENSE("GPL"); 51 51 52 52 unsigned int zcrypt_mempool_threshold = 5; 53 - module_param_named(mempool_threshold, zcrypt_mempool_threshold, uint, 0440); 53 + module_param_named(mempool_threshold, zcrypt_mempool_threshold, uint, 0400); 54 54 MODULE_PARM_DESC(mempool_threshold, "CCA and EP11 request/reply mempool minimal items (min: 1)"); 55 55 56 56 /*