Skip to content

Commit 2b70a11

Browse files
hfreudeAlexander Gordeev
authored andcommitted
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>
1 parent af40322 commit 2b70a11

2 files changed

Lines changed: 0 additions & 29 deletions

File tree

drivers/crypto/Kconfig

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,6 @@ config ZCRYPT_DEBUG
9292

9393
If unsure, say N.
9494

95-
config ZCRYPT_MULTIDEVNODES
96-
bool "Support for multiple zcrypt device nodes"
97-
default y
98-
depends on S390
99-
depends on ZCRYPT
100-
help
101-
With this option enabled the zcrypt device driver can
102-
provide multiple devices nodes in /dev. Each device
103-
node can get customized to limit access and narrow
104-
down the use of the available crypto hardware.
105-
10695
config PKEY
10796
tristate "Kernel API for protected key handling"
10897
depends on S390

drivers/s390/crypto/zcrypt_api.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ EXPORT_SYMBOL(zcrypt_msgtype);
111111
* Multi device nodes extension functions.
112112
*/
113113

114-
#ifdef CONFIG_ZCRYPT_MULTIDEVNODES
115-
116114
struct zcdn_device;
117115

118116
static struct class *zcrypt_class;
@@ -477,8 +475,6 @@ static void zcdn_destroy_all(void)
477475
mutex_unlock(&ap_perms_mutex);
478476
}
479477

480-
#endif
481-
482478
/*
483479
* zcrypt_read (): Not supported beyond zcrypt 1.3.1.
484480
*
@@ -510,7 +506,6 @@ static int zcrypt_open(struct inode *inode, struct file *filp)
510506
{
511507
struct ap_perms *perms = &ap_perms;
512508

513-
#ifdef CONFIG_ZCRYPT_MULTIDEVNODES
514509
if (filp->f_inode->i_cdev == &zcrypt_cdev) {
515510
struct zcdn_device *zcdndev;
516511

@@ -522,7 +517,6 @@ static int zcrypt_open(struct inode *inode, struct file *filp)
522517
if (zcdndev)
523518
perms = &zcdndev->perms;
524519
}
525-
#endif
526520
filp->private_data = (void *)perms;
527521

528522
atomic_inc(&zcrypt_open_count);
@@ -536,7 +530,6 @@ static int zcrypt_open(struct inode *inode, struct file *filp)
536530
*/
537531
static int zcrypt_release(struct inode *inode, struct file *filp)
538532
{
539-
#ifdef CONFIG_ZCRYPT_MULTIDEVNODES
540533
if (filp->f_inode->i_cdev == &zcrypt_cdev) {
541534
struct zcdn_device *zcdndev;
542535

@@ -549,7 +542,6 @@ static int zcrypt_release(struct inode *inode, struct file *filp)
549542
put_device(&zcdndev->device);
550543
}
551544
}
552-
#endif
553545

554546
atomic_dec(&zcrypt_open_count);
555547
return 0;
@@ -2061,8 +2053,6 @@ void zcrypt_debug_exit(void)
20612053
debug_unregister(zcrypt_dbf_info);
20622054
}
20632055

2064-
#ifdef CONFIG_ZCRYPT_MULTIDEVNODES
2065-
20662056
static int __init zcdn_init(void)
20672057
{
20682058
int rc;
@@ -2120,8 +2110,6 @@ static void zcdn_exit(void)
21202110
class_destroy(zcrypt_class);
21212111
}
21222112

2123-
#endif
2124-
21252113
/*
21262114
* zcrypt_api_init(): Module initialization.
21272115
*
@@ -2135,11 +2123,9 @@ int __init zcrypt_api_init(void)
21352123
if (rc)
21362124
goto out;
21372125

2138-
#ifdef CONFIG_ZCRYPT_MULTIDEVNODES
21392126
rc = zcdn_init();
21402127
if (rc)
21412128
goto out;
2142-
#endif
21432129

21442130
/* Register the request sprayer. */
21452131
rc = misc_register(&zcrypt_misc_device);
@@ -2152,9 +2138,7 @@ int __init zcrypt_api_init(void)
21522138
return 0;
21532139

21542140
out_misc_register_failed:
2155-
#ifdef CONFIG_ZCRYPT_MULTIDEVNODES
21562141
zcdn_exit();
2157-
#endif
21582142
zcrypt_debug_exit();
21592143
out:
21602144
return rc;
@@ -2167,9 +2151,7 @@ int __init zcrypt_api_init(void)
21672151
*/
21682152
void __exit zcrypt_api_exit(void)
21692153
{
2170-
#ifdef CONFIG_ZCRYPT_MULTIDEVNODES
21712154
zcdn_exit();
2172-
#endif
21732155
misc_deregister(&zcrypt_misc_device);
21742156
zcrypt_msgtype6_exit();
21752157
zcrypt_msgtype50_exit();

0 commit comments

Comments
 (0)