2019-05-19 13:07:45 +01:00
|
|
|
|
2007-07-15 23:39:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2007-08-18 12:56:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-15 23:39:36 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-10-23 22:05:03 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-05-18 13:17:22 +10:00
|
|
|
|
2009-04-22 13:00:15 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-06 22:46:20 +10:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-08-06 22:50:30 +10:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-06 22:46:20 +10:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2019-07-02 21:41:25 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-06 22:46:20 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-05 00:44:53 +02:00
|
|
|
|
2006-08-06 22:46:20 +10:00
|
|
|
|
2006-07-12 12:29:38 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-11 18:16:16 +08:00
|
|
|
|
2006-07-12 12:29:38 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-05 00:44:53 +02:00
|
|
|
|
2006-07-12 12:29:38 +10:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
2007-05-02 22:08:26 +10:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
2007-05-09 07:12:20 +02:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-10 15:46:00 +02:00
|
|
|
|
2017-02-20 16:09:51 +01:00
|
|
|
|
2007-05-10 15:46:00 +02:00
|
|
|
|
2008-04-17 07:46:15 +02:00
|
|
|
|
2007-05-10 15:46:00 +02:00
|
|
|
|
2017-02-20 16:09:51 +01:00
|
|
|
|
|
|
|
|
|
2020-09-23 09:18:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-10 15:46:00 +02:00
|
|
|
|
s390/zcrypt: multiple zcrypt device nodes support
This patch is an extension to the zcrypt device driver to provide,
support and maintain multiple zcrypt device nodes. The individual
zcrypt device nodes can be restricted in terms of crypto cards,
domains and available ioctls. Such a device node can be used as a
base for container solutions like docker to control and restrict
the access to crypto resources.
The handling is done with a new sysfs subdir /sys/class/zcrypt.
Echoing a name (or an empty sting) into the attribute "create" creates
a new zcrypt device node. In /sys/class/zcrypt a new link will appear
which points to the sysfs device tree of this new device. The
attribute files "ioctlmask", "apmask" and "aqmask" in this directory
are used to customize this new zcrypt device node instance. Finally
the zcrypt device node can be destroyed by echoing the name into
/sys/class/zcrypt/destroy. The internal structs holding the device
info are reference counted - so a destroy will not hard remove a
device but only marks it as removable when the reference counter drops
to zero.
The mask values are bitmaps in big endian order starting with bit 0.
So adapter number 0 is the leftmost bit, mask is 0x8000... The sysfs
attributes accept 2 different formats:
* Absolute hex string starting with 0x like "0x12345678" does set
the mask starting from left to right. If the given string is shorter
than the mask it is padded with 0s on the right. If the string is
longer than the mask an error comes back (EINVAL).
* Relative format - a concatenation (done with ',') of the
terms +<bitnr>[-<bitnr>] or -<bitnr>[-<bitnr>]. <bitnr> may be any
valid number (hex, decimal or octal) in the range 0...255. Here are
some examples:
"+0-15,+32,-128,-0xFF"
"-0-255,+1-16,+0x128"
"+1,+2,+3,+4,-5,-7-10"
A simple usage examples:
# create new zcrypt device 'my_zcrypt':
echo "my_zcrypt" >/sys/class/zcrypt/create
# go into the device dir of this new device
echo "my_zcrypt" >create
cd my_zcrypt/
ls -l
total 0
-rw-r--r-- 1 root root 4096 Jul 20 15:23 apmask
-rw-r--r-- 1 root root 4096 Jul 20 15:23 aqmask
-r--r--r-- 1 root root 4096 Jul 20 15:23 dev
-rw-r--r-- 1 root root 4096 Jul 20 15:23 ioctlmask
lrwxrwxrwx 1 root root 0 Jul 20 15:23 subsystem -> ../../../../class/zcrypt
...
# customize this zcrypt node clone
# enable only adapter 0 and 2
echo "0xa0" >apmask
# enable only domain 6
echo "+6" >aqmask
# enable all 256 ioctls
echo "+0-255" >ioctls
# now the /dev/my_zcrypt may be used
# finally destroy it
echo "my_zcrypt" >/sys/class/zcrypt/destroy
Please note that a very similar 'filtering behavior' also applies to
the parent z90crypt device. The two mask attributes apmask and aqmask
in /sys/bus/ap act the very same for the z90crypt device node. However
the implementation here is totally different as the ap bus acts on
bind/unbind of queue devices and associated drivers but the effect is
still the same. So there are two filters active for each additional
zcrypt device node: The adapter/domain needs to be enabled on the ap
bus level and it needs to be active on the zcrypt device node level.
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2018-09-17 16:18:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-02 14:37:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-10 15:46:00 +02:00
|
|
|
|
2017-05-11 17:15:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2017-05-11 17:15:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-26 14:11:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-04-19 21:29:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-26 14:11:07 +01:00
|
|
|
|
2010-05-19 14:14:04 +10:00
|
|
|
|
2019-11-21 04:20:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-19 14:14:04 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-06-01 15:11:29 +00:00
|
|
|
|
2021-06-25 15:27:23 +02:00
|
|
|
|
2021-06-25 15:27:24 +02:00
|
|
|
|
|
|
|
|
|
2021-06-01 15:11:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-26 21:31:14 +08:00
|
|
|
|
|
|
|
|
|
2019-08-15 12:01:09 +03:00
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2008-01-26 09:48:44 +11:00
|
|
|
|
2007-11-12 21:56:38 +08:00
|
|
|
|
2011-10-10 12:55:41 +02:00
|
|
|
|
2007-10-26 21:31:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-26 09:48:44 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-26 21:31:14 +08:00
|
|
|
|
2018-12-11 20:01:04 +09:00
|
|
|
|
2011-03-13 16:54:26 +08:00
|
|
|
|
2008-06-23 19:50:15 +08:00
|
|
|
|
|
|
|
|
|
2015-06-17 14:58:24 +08:00
|
|
|
|
2008-06-23 19:50:15 +08:00
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2015-06-17 14:58:24 +08:00
|
|
|
|
2019-11-26 19:28:36 +08:00
|
|
|
|
2008-06-23 19:50:15 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-17 16:32:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-06-25 14:38:47 +08:00
|
|
|
|
|
|
|
|
|
2010-03-25 23:56:05 +01:00
|
|
|
|
2021-05-05 20:26:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-15 12:01:09 +03:00
|
|
|
|
2015-06-17 14:58:24 +08:00
|
|
|
|
2008-07-13 20:12:11 +08:00
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2008-06-25 14:38:47 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-05 16:18:13 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-04 01:00:15 +02:00
|
|
|
|
2019-10-27 16:47:47 +01:00
|
|
|
|
2019-07-02 21:41:42 +02:00
|
|
|
|
2017-10-04 01:00:15 +02:00
|
|
|
|
2018-04-19 18:41:54 +02:00
|
|
|
|
2017-10-04 01:00:15 +02:00
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2009-02-05 16:18:13 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-18 12:57:41 +02:00
|
|
|
|
|
|
|
|
|
2021-01-30 14:55:38 -08:00
|
|
|
|
2016-04-18 12:57:41 +02:00
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2016-04-18 12:57:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-24 10:35:26 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-21 04:20:48 +01:00
|
|
|
|
2017-05-24 10:35:26 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-03 11:10:59 +08:00
|
|
|
|
2013-07-26 12:29:14 +05:30
|
|
|
|
|
|
|
|
|
2021-01-03 15:03:04 +01:00
|
|
|
|
2010-05-03 11:10:59 +08:00
|
|
|
|
|
|
|
|
|
2013-07-26 12:29:14 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-03 11:10:59 +08:00
|
|
|
|
2013-07-26 12:29:14 +05:30
|
|
|
|
|
|
|
|
|
2010-05-03 11:10:59 +08:00
|
|
|
|
2010-09-03 19:16:02 +08:00
|
|
|
|
|
|
|
|
|
2013-08-17 21:42:35 -05:00
|
|
|
|
2010-09-03 19:16:02 +08:00
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2016-01-26 20:25:40 +08:00
|
|
|
|
2016-08-04 13:28:44 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-24 10:35:31 +03:00
|
|
|
|
2010-09-03 19:16:02 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-14 10:49:47 -06:00
|
|
|
|
2016-03-13 16:15:37 +01:00
|
|
|
|
2014-02-14 10:49:47 -06:00
|
|
|
|
2019-08-15 12:01:09 +03:00
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2016-04-28 14:11:51 +08:00
|
|
|
|
2014-02-14 10:49:47 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-13 16:15:37 +01:00
|
|
|
|
|
|
|
|
|
2014-02-14 10:49:47 -06:00
|
|
|
|
2017-05-24 10:35:26 +03:00
|
|
|
|
|
|
|
|
|
2013-03-01 12:37:53 +01:00
|
|
|
|
|
|
|
|
|
2013-05-12 13:57:19 +02:00
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2013-03-01 12:37:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-11 20:08:35 +02:00
|
|
|
|
2020-01-04 16:20:59 +01:00
|
|
|
|
2017-04-11 20:08:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2017-04-11 20:08:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-04-08 20:40:51 +08:00
|
|
|
|
2014-05-08 21:58:14 +08:00
|
|
|
|
2016-03-14 13:20:18 +09:00
|
|
|
|
2018-04-17 19:49:03 +02:00
|
|
|
|
2011-04-08 20:40:51 +08:00
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2011-04-08 20:40:51 +08:00
|
|
|
|
|
|
|
|
|
2014-05-08 21:58:14 +08:00
|
|
|
|
2011-04-08 20:40:51 +08:00
|
|
|
|
|
|
|
|
|
2017-10-25 17:27:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-12 05:39:26 +00:00
|
|
|
|
2015-05-07 13:49:17 -04:00
|
|
|
|
|
|
|
|
|
2012-04-12 05:39:26 +00:00
|
|
|
|
2015-05-07 13:49:17 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-19 09:42:38 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-12 05:39:26 +00:00
|
|
|
|
2012-04-30 10:11:17 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-26 17:07:56 +01:00
|
|
|
|
2019-11-13 17:55:50 +08:00
|
|
|
|
2017-02-06 13:32:15 +01:00
|
|
|
|
2019-11-13 17:55:50 +08:00
|
|
|
|
2017-01-26 17:07:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-01 19:19:44 +02:00
|
|
|
|
|
|
|
|
|
2017-02-06 13:32:15 +01:00
|
|
|
|
2012-07-01 19:19:44 +02:00
|
|
|
|
2015-12-17 18:13:07 +01:00
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2019-11-13 17:55:50 +08:00
|
|
|
|
|
|
|
|
|
2012-07-01 19:19:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-01 19:19:45 +02:00
|
|
|
|
|
|
|
|
|
2017-02-06 13:32:15 +01:00
|
|
|
|
2019-08-15 12:01:09 +03:00
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2012-07-01 19:19:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-01 19:19:46 +02:00
|
|
|
|
2013-02-20 17:10:26 +01:00
|
|
|
|
2017-02-06 13:32:15 +01:00
|
|
|
|
2015-06-17 14:58:24 +08:00
|
|
|
|
2012-07-01 19:19:46 +02:00
|
|
|
|
2013-02-20 17:10:26 +01:00
|
|
|
|
|
|
|
|
|
2012-07-01 19:19:46 +02:00
|
|
|
|
2013-02-20 17:10:26 +01:00
|
|
|
|
2012-07-01 19:19:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-05-24 18:26:48 +02:00
|
|
|
|
|
|
|
|
|
2020-12-04 00:20:04 +01:00
|
|
|
|
2019-05-24 18:26:48 +02:00
|
|
|
|
2017-07-05 13:07:59 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-05-24 18:26:48 +02:00
|
|
|
|
2017-07-05 13:07:59 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-05-24 18:26:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-05-31 20:17:49 +08:00
|
|
|
|
2019-05-24 18:26:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-11-12 11:46:51 -06:00
|
|
|
|
2017-07-06 09:59:14 -05:00
|
|
|
|
2015-02-03 13:07:29 -06:00
|
|
|
|
2013-11-12 11:46:51 -06:00
|
|
|
|
2017-07-06 09:59:14 -05:00
|
|
|
|
|
|
|
|
|
2013-11-12 11:46:51 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-10 20:26:21 +01:00
|
|
|
|
|
|
|
|
|
2015-09-02 12:05:18 -03:00
|
|
|
|
2015-10-12 15:52:34 +02:00
|
|
|
|
2013-12-10 20:26:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2015-06-17 14:58:24 +08:00
|
|
|
|
2013-12-10 20:26:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-05 13:44:39 -07:00
|
|
|
|
2017-02-07 14:51:15 +00:00
|
|
|
|
2017-05-30 17:28:01 +05:30
|
|
|
|
2020-03-13 17:17:05 +05:30
|
|
|
|
2014-06-25 19:28:58 +03:00
|
|
|
|
2017-02-15 10:45:08 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-14 01:50:22 +09:00
|
|
|
|
2017-02-15 10:45:08 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-25 19:28:58 +03:00
|
|
|
|
|
|
|
|
|
2018-04-17 19:49:03 +02:00
|
|
|
|
|
|
|
|
|
2019-12-20 16:02:18 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-25 19:28:58 +03:00
|
|
|
|
2019-08-15 12:01:09 +03:00
|
|
|
|
2014-06-25 19:28:58 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2019-12-20 16:02:18 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-22 11:45:04 +05:30
|
|
|
|
|
|
|
|
|
2019-12-20 16:02:18 -03:00
|
|
|
|
2021-04-29 11:07:04 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-20 16:02:18 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-14 12:12:27 +00:00
|
|
|
|
2019-12-20 16:02:18 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-04-29 11:07:04 -04:00
|
|
|
|
2019-12-20 16:02:18 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-04-29 11:07:04 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-20 16:02:18 -03:00
|
|
|
|
2014-06-25 19:28:58 +03:00
|
|
|
|
crypto: qce - use AES fallback for small requests
Process small blocks using the fallback cipher, as a workaround for an
observed failure (DMA-related, apparently) when computing the GCM ghash
key. This brings a speed gain as well, since it avoids the latency of
using the hardware engine to process small blocks.
Using software for all 16-byte requests would be enough to make GCM
work, but to increase performance, a larger threshold would be better.
Measuring the performance of supported ciphers with openssl speed,
software matches hardware at around 768-1024 bytes.
Considering the 256-bit ciphers, software is 2-3 times faster than qce
at 256-bytes, 30% faster at 512, and about even at 768-bytes. With
128-bit keys, the break-even point would be around 1024-bytes.
This adds the 'aes_sw_max_len' parameter, to set the largest request
length processed by the software fallback. Its default is being set to
512 bytes, a little lower than the break-even point, to balance the cost
in CPU usage.
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2020-02-07 12:02:26 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-16 11:20:24 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-21 04:20:48 +01:00
|
|
|
|
2018-07-16 11:20:24 +05:30
|
|
|
|
2015-02-06 14:59:48 -02:00
|
|
|
|
|
|
|
|
|
2015-09-09 18:22:35 +10:00
|
|
|
|
2015-02-06 14:59:48 -02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-12 23:17:26 +00:00
|
|
|
|
|
|
|
|
|
2015-04-23 20:03:58 +02:00
|
|
|
|
2015-03-12 23:17:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-25 13:43:32 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-15 12:01:09 +03:00
|
|
|
|
2016-02-16 10:15:01 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2015-11-25 13:43:32 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-17 15:56:43 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-23 16:05:03 +05:30
|
|
|
|
2022-03-09 15:20:01 +12:00
|
|
|
|
|
|
|
|
|
2022-02-23 16:05:03 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-17 12:33:06 +05:30
|
|
|
|
|
|
|
|
|
2016-12-15 10:03:16 +08:00
|
|
|
|
|
|
|
|
|
2017-02-03 12:55:33 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-11 15:50:06 +05:30
|
|
|
|
2017-02-03 12:55:33 -05:00
|
|
|
|
2018-12-16 23:23:23 -08:00
|
|
|
|
2019-08-15 12:01:09 +03:00
|
|
|
|
2017-02-03 12:55:33 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-09 18:09:35 +01:00
|
|
|
|
2017-02-03 12:55:33 -05:00
|
|
|
|
|
|
|
|
|
2017-03-21 16:13:28 +01:00
|
|
|
|
|
|
|
|
|
2017-05-24 16:10:34 +02:00
|
|
|
|
|
|
|
|
|
2019-12-11 11:27:39 -08:00
|
|
|
|
2019-07-02 21:41:27 +02:00
|
|
|
|
2018-05-14 15:11:02 +02:00
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2019-08-15 12:01:09 +03:00
|
|
|
|
2017-05-24 16:10:34 +02:00
|
|
|
|
|
|
|
|
|
2018-06-28 17:21:53 +02:00
|
|
|
|
2017-05-24 16:10:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-18 23:25:58 +02:00
|
|
|
|
2019-09-13 20:56:49 +02:00
|
|
|
|
2017-05-24 16:10:34 +02:00
|
|
|
|
2019-08-19 16:40:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-24 16:10:34 +02:00
|
|
|
|
2017-08-10 14:53:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2017-08-10 14:53:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-22 09:27:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-25 12:41:13 -07:00
|
|
|
|
2019-08-15 12:01:09 +03:00
|
|
|
|
2018-01-22 09:27:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-29 09:50:14 +00:00
|
|
|
|
2018-10-18 13:59:59 +01:00
|
|
|
|
2018-01-22 09:27:00 +00:00
|
|
|
|
2018-02-19 14:51:23 +00:00
|
|
|
|
|
|
|
|
|
2018-11-13 09:40:35 +00:00
|
|
|
|
2018-01-22 09:27:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-23 16:49:54 +01:00
|
|
|
|
|
|
|
|
|
2019-10-17 05:06:25 +00:00
|
|
|
|
|
|
|
|
|
2020-07-13 11:34:22 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-07 16:22:40 +10:00
|
|
|
|
2020-08-06 08:54:48 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-13 11:34:22 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
crypto: keembay - Add support for Keem Bay OCS AES/SM4
Add support for the AES/SM4 crypto engine included in the Offload and
Crypto Subsystem (OCS) of the Intel Keem Bay SoC, thus enabling
hardware-acceleration for the following transformations:
- ecb(aes), cbc(aes), ctr(aes), cts(cbc(aes)), gcm(aes) and cbc(aes);
supported for 128-bit and 256-bit keys.
- ecb(sm4), cbc(sm4), ctr(sm4), cts(cbc(sm4)), gcm(sm4) and cbc(sm4);
supported for 128-bit keys.
The driver passes crypto manager self-tests, including the extra tests
(CRYPTO_MANAGER_EXTRA_TESTS=y).
Signed-off-by: Mike Healy <mikex.healy@intel.com>
Co-developed-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
Signed-off-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
Acked-by: Mark Gross <mgross@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2020-11-26 11:51:48 +00:00
|
|
|
|
|
|
|
|
|
2007-07-15 23:39:36 -07:00
|
|
|
|