1

s390/zcrypt: remove ZCRYPT_MULTIDEVNODES kernel config option

Remove ZCRYPT_MULTIDEVNODES kernel config option and make
the dependent code always build.

The last years showed, that this option is enabled on all distros
and exploited by some features (for example CEX plugin for kubernetes).
So remove this choice as it was never used to switch off the multiple
devices support for the zcrypt device driver.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
This commit is contained in:
Harald Freudenberger 2023-06-21 16:40:41 +02:00 committed by Alexander Gordeev
parent af40322e90
commit 2b70a11955
2 changed files with 0 additions and 29 deletions

View File

@ -92,17 +92,6 @@ config ZCRYPT_DEBUG
If unsure, say N. If unsure, say N.
config ZCRYPT_MULTIDEVNODES
bool "Support for multiple zcrypt device nodes"
default y
depends on S390
depends on ZCRYPT
help
With this option enabled the zcrypt device driver can
provide multiple devices nodes in /dev. Each device
node can get customized to limit access and narrow
down the use of the available crypto hardware.
config PKEY config PKEY
tristate "Kernel API for protected key handling" tristate "Kernel API for protected key handling"
depends on S390 depends on S390

View File

@ -111,8 +111,6 @@ EXPORT_SYMBOL(zcrypt_msgtype);
* Multi device nodes extension functions. * Multi device nodes extension functions.
*/ */
#ifdef CONFIG_ZCRYPT_MULTIDEVNODES
struct zcdn_device; struct zcdn_device;
static struct class *zcrypt_class; static struct class *zcrypt_class;
@ -477,8 +475,6 @@ static void zcdn_destroy_all(void)
mutex_unlock(&ap_perms_mutex); mutex_unlock(&ap_perms_mutex);
} }
#endif
/* /*
* zcrypt_read (): Not supported beyond zcrypt 1.3.1. * zcrypt_read (): Not supported beyond zcrypt 1.3.1.
* *
@ -510,7 +506,6 @@ static int zcrypt_open(struct inode *inode, struct file *filp)
{ {
struct ap_perms *perms = &ap_perms; struct ap_perms *perms = &ap_perms;
#ifdef CONFIG_ZCRYPT_MULTIDEVNODES
if (filp->f_inode->i_cdev == &zcrypt_cdev) { if (filp->f_inode->i_cdev == &zcrypt_cdev) {
struct zcdn_device *zcdndev; struct zcdn_device *zcdndev;
@ -522,7 +517,6 @@ static int zcrypt_open(struct inode *inode, struct file *filp)
if (zcdndev) if (zcdndev)
perms = &zcdndev->perms; perms = &zcdndev->perms;
} }
#endif
filp->private_data = (void *)perms; filp->private_data = (void *)perms;
atomic_inc(&zcrypt_open_count); atomic_inc(&zcrypt_open_count);
@ -536,7 +530,6 @@ static int zcrypt_open(struct inode *inode, struct file *filp)
*/ */
static int zcrypt_release(struct inode *inode, struct file *filp) static int zcrypt_release(struct inode *inode, struct file *filp)
{ {
#ifdef CONFIG_ZCRYPT_MULTIDEVNODES
if (filp->f_inode->i_cdev == &zcrypt_cdev) { if (filp->f_inode->i_cdev == &zcrypt_cdev) {
struct zcdn_device *zcdndev; struct zcdn_device *zcdndev;
@ -549,7 +542,6 @@ static int zcrypt_release(struct inode *inode, struct file *filp)
put_device(&zcdndev->device); put_device(&zcdndev->device);
} }
} }
#endif
atomic_dec(&zcrypt_open_count); atomic_dec(&zcrypt_open_count);
return 0; return 0;
@ -2061,8 +2053,6 @@ void zcrypt_debug_exit(void)
debug_unregister(zcrypt_dbf_info); debug_unregister(zcrypt_dbf_info);
} }
#ifdef CONFIG_ZCRYPT_MULTIDEVNODES
static int __init zcdn_init(void) static int __init zcdn_init(void)
{ {
int rc; int rc;
@ -2120,8 +2110,6 @@ static void zcdn_exit(void)
class_destroy(zcrypt_class); class_destroy(zcrypt_class);
} }
#endif
/* /*
* zcrypt_api_init(): Module initialization. * zcrypt_api_init(): Module initialization.
* *
@ -2135,11 +2123,9 @@ int __init zcrypt_api_init(void)
if (rc) if (rc)
goto out; goto out;
#ifdef CONFIG_ZCRYPT_MULTIDEVNODES
rc = zcdn_init(); rc = zcdn_init();
if (rc) if (rc)
goto out; goto out;
#endif
/* Register the request sprayer. */ /* Register the request sprayer. */
rc = misc_register(&zcrypt_misc_device); rc = misc_register(&zcrypt_misc_device);
@ -2152,9 +2138,7 @@ int __init zcrypt_api_init(void)
return 0; return 0;
out_misc_register_failed: out_misc_register_failed:
#ifdef CONFIG_ZCRYPT_MULTIDEVNODES
zcdn_exit(); zcdn_exit();
#endif
zcrypt_debug_exit(); zcrypt_debug_exit();
out: out:
return rc; return rc;
@ -2167,9 +2151,7 @@ out:
*/ */
void __exit zcrypt_api_exit(void) void __exit zcrypt_api_exit(void)
{ {
#ifdef CONFIG_ZCRYPT_MULTIDEVNODES
zcdn_exit(); zcdn_exit();
#endif
misc_deregister(&zcrypt_misc_device); misc_deregister(&zcrypt_misc_device);
zcrypt_msgtype6_exit(); zcrypt_msgtype6_exit();
zcrypt_msgtype50_exit(); zcrypt_msgtype50_exit();