All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: johannes@sipsolutions.net
Cc: backports@vger.kernel.org, Hauke Mehrtens <hauke@hauke-m.de>
Subject: [PATCH 7/7] backports: Add skcipher_request_zero()
Date: Sun,  2 Dec 2018 21:51:31 +0100	[thread overview]
Message-ID: <20181202205131.13519-8-hauke@hauke-m.de> (raw)
In-Reply-To: <20181202205131.13519-1-hauke@hauke-m.de>

This was added in commit 1aaa753d918 ("crypto: skcipher - Add helper to
zero stack request")

This is needed by lib80211, the code changes in kernel 4.20, so this is
only needed in kernel 4.19.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/crypto/skcipher.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 backport/backport-include/crypto/skcipher.h

diff --git a/backport/backport-include/crypto/skcipher.h b/backport/backport-include/crypto/skcipher.h
new file mode 100644
index 00000000..19a5a73d
--- /dev/null
+++ b/backport/backport-include/crypto/skcipher.h
@@ -0,0 +1,14 @@
+#ifndef __BP_CRYPTO_SKCIPHER_H
+#define __BP_CRYPTO_SKCIPHER_H
+#include_next <crypto/skcipher.h>
+
+#if LINUX_VERSION_IS_LESS(4,6,0)
+static inline void skcipher_request_zero(struct skcipher_request *req)
+{
+	struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
+
+	memzero_explicit(req, sizeof(*req) + crypto_skcipher_reqsize(tfm));
+}
+#endif
+
+#endif /* __BP_CRYPTO_SKCIPHER_H */
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe backports" in

  parent reply	other threads:[~2018-12-02 20:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-02 20:51 [PATCH 0/7] backports-4.19: Fixes for kernel 4.19 branch Hauke Mehrtens
2018-12-02 20:51 ` [PATCH 1/7] backports: Refresh patches on kernel 4.19.6 Hauke Mehrtens
2018-12-02 20:51 ` [PATCH 2/7] backports: Fix pci_alloc_irq_vectors() backport Hauke Mehrtens
2018-12-02 20:51 ` [PATCH 3/7] backports: Revert "dependencies: Make WIL6210 depend on kernel >= 4.8" Hauke Mehrtens
2018-12-02 20:51 ` [PATCH 4/7] backports: Remove BPAUTO_CRYPTO_SKCIPHER Hauke Mehrtens
2018-12-02 20:51 ` [PATCH 5/7] backports: Do not activate R8188EU on kernels without SKCIPHER Hauke Mehrtens
2018-12-02 20:51 ` [PATCH 6/7] backports: Add missing includes for mt76 driver Hauke Mehrtens
2018-12-02 20:51 ` Hauke Mehrtens [this message]
2018-12-07 20:01 ` [PATCH 0/7] backports-4.19: Fixes for kernel 4.19 branch Hauke Mehrtens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181202205131.13519-8-hauke@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=backports@vger.kernel.org \
    --cc=johannes@sipsolutions.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.