18 Sep, 2020
30 commits
-
We have a few interesting pieces in our cipher museum, which are never
used internally, and were only ever provided as generic C implementations.Unfortunately, we cannot simply remove this code, as we cannot be sure
that it is not being used via the AF_ALG socket API, however unlikely.So let's mark the Anubis, Khazad, SEED and TEA algorithms as obsolete,
which means they can only be enabled in the build if the socket API is
enabled in the first place.Signed-off-by: Ard Biesheuvel
Signed-off-by: Herbert Xu -
This patch adds support for EIP197 instances that include the output
classifier (OCE) option, as used by one of our biggest customers.
The OCE normally requires initialization and dedicated firmware, but
for the simple operations supported by this driver, we just bypass it
completely for now (using what is formally a debug feature).Signed-off-by: Pascal van Leeuwen
Acked-by: Antoine Tenart
Signed-off-by: Herbert Xu -
This patch fixes sparse endianness warnings by changing the type
of hash_init to u8 from u32. There should be no difference in the
generated code.Signed-off-by: Herbert Xu
-
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and the error value gets printed.Signed-off-by: Krzysztof Kozlowski
Acked-by: Corentin Labbe
Tested-by: Corentin Labbe
Signed-off-by: Herbert Xu -
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and the error value gets printed.Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Herbert Xu -
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and the error value gets printed.Signed-off-by: Krzysztof Kozlowski
Reviewed-by: Iuliana Prodan
Signed-off-by: Herbert Xu -
Fix kerneldoc warnings like:
drivers/crypto/caam/caamalg_qi2.c:73: warning: cannot understand function prototype: 'struct caam_ctx'
drivers/crypto/caam/caamalg_qi2.c:2962: warning: cannot understand function prototype: 'struct caam_hash_ctx'
drivers/crypto/caam/ctrl.c:449: warning: Function parameter or member 'ctrl' not described in 'caam_get_era'Signed-off-by: Krzysztof Kozlowski
Reviewed-by: Iuliana Prodan
Signed-off-by: Herbert Xu -
1. Fix the bug of 'mac' memory leak as allocating 'pbuf' failing.
2. Fix the bug of 'qps' leak as allocating 'qp_ctx' failing.Signed-off-by: Longfang Liu
Signed-off-by: Herbert Xu -
In order to pass kernel CRYPTO test, ZIP module parameter
'pf_q_num' needs to be set as greater than 1.Signed-off-by: Longfang Liu
Signed-off-by: Herbert Xu -
In order to pass kernel CRYPTO test, SEC module parameter
'pf_q_num' needs to be set as greater than 1.Signed-off-by: Longfang Liu
Signed-off-by: Herbert Xu -
In order to pass kernel CRYPTO test, HPRE module parameter
'pf_q_num' needs to be set as greater than 1.Signed-off-by: Longfang Liu
Signed-off-by: Herbert Xu -
At present, as HPRE/SEC/ZIP modules' parameter 'pf_q_num' is 1,
kernel CRYPTO test will fail on the algorithms from the modules,
since 'QP' hardware resources are not enough for CRYPTO TFM.
To fix this, the minimum value of 'pf_q_num' should be 2.Signed-off-by: Longfang Liu
Signed-off-by: Herbert Xu -
Build pci_device_id structure using the PCI_VDEVICE macro.
This removes any references to the ADF_SYSTEM_DEVICE macro.Suggested-by: Andy Shevchenko
Signed-off-by: Giovanni Cabiddu
Reviewed-by: Fiona Trahe
Reviewed-by: Andy Shevchenko
Signed-off-by: Herbert Xu -
Replace device ids defined in the QAT drivers with the ones in
include/linux/pci_ids.h.Signed-off-by: Giovanni Cabiddu
Reviewed-by: Fiona Trahe
Reviewed-by: Andy Shevchenko
Signed-off-by: Herbert Xu -
The pm_runtime_get_sync() function returns either 0 or 1 on success but
this code treats a return of 1 as a failure.Fixes: 7694b6ca649f ("crypto: sa2ul - Add crypto driver")
Signed-off-by: Dan Carpenter
Signed-off-by: Herbert Xu -
On systems with coherence issues, packet processed could succeed while
it should have failed, e.g. because of an authentication fail.
This is because the driver would read stale status information that had
all error bits initialised to zero = no error.
Since this is potential a security risk, we want to prevent it from being
a possibility at all. So initialize all error bits to error state, so
that reading stale status information will always result in errors.Signed-off-by: Pascal van Leeuwen
Acked-by: Antoine Tenart
Signed-off-by: Herbert Xu -
This patch also fixes the incorrect endianness markings in the
sun4i-ss driver. It should have no effect in the genereated code.Instead of using cpu_to_Xe32 followed by a memcpy, this patch
converts the final hash write to use put_unaligned_X instead.Reported-by: kernel test robot
Signed-off-by: Herbert Xu
Tested-by: Corentin Labbe
Acked-by: Corentin Labbe
Signed-off-by: Herbert Xu -
1.Unified alignment styles
2.Remove unnecessary goto branch
3.Remove address printfSigned-off-by: Yang Shen
Reviewed-by: Zhou Wang
Signed-off-by: Herbert Xu -
Supplement some comments.
Signed-off-by: Yang Shen
Reviewed-by: Zhou Wang
Signed-off-by: Herbert Xu -
Some macros which are defined in 'zip.h' are related to the struct
'hisi_zip_sqe' and are only used in 'zip_crypto.c'. So move them from
'zip.h' to 'zip_crypto.c'.Signed-off-by: Yang Shen
Reviewed-by: Zhou Wang
Signed-off-by: Herbert Xu -
Fix some code for PClint warning:
Warning - Suspicious CastSigned-off-by: Yang Shen
Reviewed-by: Zhou Wang
Signed-off-by: Herbert Xu -
Add print for some error branches.
Signed-off-by: Yang Shen
Reviewed-by: Zhou Wang
Signed-off-by: Herbert Xu -
Macros 'QPC_COMP', 'QPC_DECOMP' and 'HZIP_CTX_Q_NUM' are relative and
incremental. So, use an enum instead.Signed-off-by: Yang Shen
Reviewed-by: Zhou Wang
Signed-off-by: Herbert Xu -
Replace 'sprintf' with 'scnprintf' to avoid overrun.
Signed-off-by: Yang Shen
Reviewed-by: Zhou Wang
Signed-off-by: Herbert Xu -
Update debugfs interface parameters
Signed-off-by: Shukun Tan
Signed-off-by: Yang Shen
Reviewed-by: Zhou Wang
Signed-off-by: Herbert Xu -
1.Add prefix 'HZIP' for some macros
2.Add prefix 'hisi_zip' for some functionsSigned-off-by: Yang Shen
Reviewed-by: Zhou Wang
Signed-off-by: Herbert Xu -
1.Remove the macro 'HZIP_VF_NUM'.
2.Remove 'list' of the struct 'hisi_zip'Signed-off-by: Yang Shen
Reviewed-by: Zhou Wang
Signed-off-by: Herbert Xu -
Running export/import for hashes in peculiar order (mostly done by
openssl) can mess up the internal book keeping of the OMAP SHA core.
Fix by forcibly writing the correct DIGCNT back to hardware. This issue
was noticed while transitioning to openssl 1.1 support.Fixes: 0d373d603202 ("crypto: omap-sham - Add OMAP4/AM33XX SHAM Support")
Signed-off-by: Tero Kristo
Signed-off-by: Herbert Xu -
Convert the omap-sham driver to use crypto engine for queue handling,
instead of using local implementation.Signed-off-by: Tero Kristo
Signed-off-by: Herbert Xu -
The sa2ul driver uses crypto_authenc_extractkeys and therefore
must select CRYPTO_AUTHENC.Fixes: 7694b6ca649f ("crypto: sa2ul - Add crypto driver")
Reported-by: kernel test robot
Signed-off-by: Herbert Xu
Reviewed-by: Keerthy
Signed-off-by: Herbert Xu
11 Sep, 2020
10 commits
-
This patch fixes a couple of sparse endianness warnings in the
ux500 driver.Signed-off-by: Herbert Xu
-
Use pci_name() when creating debugfs entries in order to include PCI
domain in the path.Signed-off-by: Giovanni Cabiddu
Reviewed-by: Andy Shevchenko
Signed-off-by: Herbert Xu -
Pass the error directly from devm_clk_get() to describe the real reason,
instead of fixed ENOENT. Do not print error messages on deferred probe.Signed-off-by: Krzysztof Kozlowski
Reviewed-by: Kamil Konieczny
Acked-by: Kamil Konieczny
Signed-off-by: Herbert Xu -
Add missing and fix existing kerneldoc to silence W=1 warnings:
drivers/crypto/s5p-sss.c:333: warning: Function parameter or member 'pclk' not described in 's5p_aes_dev'
drivers/crypto/s5p-sss.c:373: warning: Function parameter or member 'sgl' not described in 's5p_hash_reqctx'
drivers/crypto/s5p-sss.c:373: warning: Function parameter or member 'buffer' not described in 's5p_hash_reqctx'
drivers/crypto/s5p-sss.c:1143: warning: Function parameter or member 'new_len' not described in 's5p_hash_prepare_sgs'
drivers/crypto/s5p-sss.c:1143: warning: Excess function parameter 'nbytes' description in 's5p_hash_prepare_sgs'Signed-off-by: Krzysztof Kozlowski
Reviewed-by: Kamil Konieczny
Acked-by: Kamil Konieczny
Signed-off-by: Herbert Xu -
Because clk_disable_unprepare already checked NULL clock
parameter, so the additional checks are unnecessary, just remove them.Signed-off-by: Xu Wang
Reviewed-by: Krzysztof Kozlowski
Acked-by: Kamil Konieczny
Signed-off-by: Herbert Xu -
Xiphera XIP8001B is an FPGA-based True Random Number Generator
Intellectual Property (IP) Core which can be instantiated in
multiple FPGA families. This driver adds Linux support for it through
the hwrng interface.Signed-off-by: Atte Tommiska
Signed-off-by: Herbert Xu -
Document the device tree bindings of Xiphera's XIP8001B-trng IP.
Signed-off-by: Atte Tommiska
Reviewed-by: Rob Herring
Signed-off-by: Herbert Xu -
Xiphera is an FPGA-based cryptographic solutions provider based in
Finland.
Website of the company: https://xiphera.com/Signed-off-by: Atte Tommiska
Acked-by: Rob Herring
Signed-off-by: Herbert Xu -
Now that crypto/cbc.h is only used by the generic cbc template,
we can merge it back into the CBC code.Signed-off-by: Herbert Xu
-
Since commit b56f5cbc7e08ec7d31c42fc41e5247677f20b143 ("crypto:
arm/aes-neonbs - resolve fallback cipher at runtime") the CBC
encryption path in aes-neonbs is now identical to that obtained
through the cbc template. This means that it can simply call
the generic cbc template instead of doing its own thing.This patch removes the custom encryption path and simply invokes
the generic cbc template.Signed-off-by: Herbert Xu