From patchwork Wed Oct 11 14:31:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 9999787 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B40BA602BF for ; Wed, 11 Oct 2017 14:32:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A32D2289F7 for ; Wed, 11 Oct 2017 14:32:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 982F428A52; Wed, 11 Oct 2017 14:32:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08FEE289F7 for ; Wed, 11 Oct 2017 14:32:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751835AbdJKOb7 (ORCPT ); Wed, 11 Oct 2017 10:31:59 -0400 Received: from s3.sipsolutions.net ([144.76.63.242]:48822 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751712AbdJKOb7 (ORCPT ); Wed, 11 Oct 2017 10:31:59 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1e2I34-0005BU-AE; Wed, 11 Oct 2017 16:31:50 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 5/5] backports: add crypto_memneq() Date: Wed, 11 Oct 2017 16:31:47 +0200 Message-Id: <20171011143147.3337-5-johannes@sipsolutions.net> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171011143147.3337-1-johannes@sipsolutions.net> References: <20171011143147.3337-1-johannes@sipsolutions.net> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/crypto/algapi.h | 16 ++++++++++++++++ backport/compat/Makefile | 2 +- copy-list | 3 +++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 backport/backport-include/crypto/algapi.h diff --git a/backport/backport-include/crypto/algapi.h b/backport/backport-include/crypto/algapi.h new file mode 100644 index 000000000000..b6fbdd9bf224 --- /dev/null +++ b/backport/backport-include/crypto/algapi.h @@ -0,0 +1,16 @@ +#ifndef __BP_ALGAPI_H +#define __BP_ALGAPI_H +#include +#include_next + +#if LINUX_VERSION_IS_LESS(3,13,0) +#define __crypto_memneq LINUX_BACKPORT(__crypto_memneq) +noinline unsigned long __crypto_memneq(const void *a, const void *b, size_t size); +#define crypto_memneq LINUX_BACKPORT(crypto_memneq) +static inline int crypto_memneq(const void *a, const void *b, size_t size) +{ + return __crypto_memneq(a, b, size) != 0UL ? 1 : 0; +} +#endif + +#endif /* __BP_ALGAPI_H */ diff --git a/backport/compat/Makefile b/backport/compat/Makefile index 1078357fd04b..1658f588c68f 100644 --- a/backport/compat/Makefile +++ b/backport/compat/Makefile @@ -20,7 +20,7 @@ compat-$(CPTCFG_KERNEL_3_9) += compat-3.9.o compat-$(CPTCFG_KERNEL_3_10) += backport-3.10.o compat-$(CPTCFG_KERNEL_3_11) += backport-3.11.o compat-$(CPTCFG_KERNEL_3_12) += backport-3.12.o -compat-$(CPTCFG_KERNEL_3_13) += backport-3.13.o +compat-$(CPTCFG_KERNEL_3_13) += backport-3.13.o memneq.o compat-$(CPTCFG_KERNEL_3_14) += backport-3.14.o compat-$(CPTCFG_KERNEL_3_15) += backport-3.15.o compat-$(CPTCFG_KERNEL_3_17) += backport-3.17.o diff --git a/copy-list b/copy-list index 88e91c617125..678ebe2f59fc 100644 --- a/copy-list +++ b/copy-list @@ -20,6 +20,9 @@ include/linux/fixp-arith.h include/linux/bitfield.h include/linux/average.h +# crypto_memneq +crypto/memneq.c -> compat/memneq.c + # 802.11 drivers/net/wireless/Kconfig drivers/net/wireless/Makefile