...
 
Commits (12)
......@@ -247,6 +247,12 @@ define U-Boot/orangepi_pc2
UENV:=a64
endef
define U-Boot/Sinovoip_BPI_M2_Ultra
BUILD_SUBTARGET:=cortexa7
NAME:=Bananapi M2 Ultra
BUILD_DEVICES:=sun8i-r40-bananapi-m2-ultra
endef
UBOOT_TARGETS := \
A10-OLinuXino-Lime \
A13-OLinuXino \
......@@ -281,6 +287,7 @@ UBOOT_TARGETS := \
pangolin \
pine64_plus \
Sinovoip_BPI_M2_Plus \
Sinovoip_BPI_M2_Ultra \
sopine_baseboard \
orangepi_zero_plus
......
--- /dev/null
+++ b/configs/Sinovoip_BPI_M2_Ultra_defconfig
@@ -0,0 +1,22 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_SPL=y
+CONFIG_MACH_SUN8I_R40=y
+CONFIG_DRAM_CLK=576
+CONFIG_DRAM_ZQ=3881979
+CONFIG_MACPWR="PA17"
+CONFIG_MMC0_CD_PIN="PH13"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_AHCI=y
+CONFIG_NR_DRAM_BANKS=1
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL_I2C_SUPPORT=y
+# CONFIG_CMD_FLASH is not set
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-r40-bananapi-m2-ultra"
+CONFIG_SCSI_AHCI=y
+CONFIG_RGMII=y
+CONFIG_SUN8I_EMAC=y
+CONFIG_AXP_DLDO4_VOLT=2500
+CONFIG_AXP_ELDO3_VOLT=1200
+CONFIG_SCSI=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
......@@ -8,23 +8,24 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=elfutils
PKG_VERSION:=0.177
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
PKG_HASH:=fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc05042e
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
PKG_CPE_ID:=cpe:/a:elfutils_project:elfutils
PKG_FIXUP:=autoreconf
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_USE_MIPS16:=0
PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/nls.mk
define Package/elfutils/Default
......@@ -96,3 +97,4 @@ endef
$(eval $(call BuildPackage,libasm))
$(eval $(call BuildPackage,libdw))
$(eval $(call BuildPackage,libelf))
$(eval $(call HostBuild))
......@@ -44,21 +44,12 @@ https://sourceware.org/bugzilla/show_bug.cgi?id=21002
}
--- a/libdwfl/dwfl_error.c
+++ b/libdwfl/dwfl_error.c
@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error)
const char *
dwfl_errmsg (int error)
{
+ static __thread char s[64] = "";
if (error == 0 || error == -1)
{
int last_error = global_error;
@@ -154,7 +155,8 @@ dwfl_errmsg (int error)
@@ -154,7 +154,7 @@ dwfl_errmsg (int error)
switch (error &~ 0xffff)
{
case OTHER_ERROR (ERRNO):
- return strerror_r (error & 0xffff, "bad", 0);
+ strerror_r (error & 0xffff, s, sizeof(s));
+ return s;
+ return strerror_l (error & 0xffff, LC_GLOBAL_LOCALE);
case OTHER_ERROR (LIBELF):
return elf_errmsg (error & 0xffff);
case OTHER_ERROR (LIBDW):
......@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mbedtls
PKG_VERSION:=2.16.2
PKG_VERSION:=2.16.3
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz
PKG_SOURCE_URL:=https://tls.mbed.org/download/
PKG_HASH:=40d18965dd36ce0158a2b037c8c54401bad54f683f4311502518ee1a1a0b622c
PKG_HASH:=fd01fe4b289116df7781d05e1ef712b6c98823c5334f4a27404f13a8d066ef6a
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPL-2.0+
......
--- a/include/mbedtls/config.h
+++ b/include/mbedtls/config.h
@@ -599,14 +599,14 @@
@@ -633,14 +633,14 @@
*
* Enable Output Feedback mode (OFB) for symmetric ciphers.
*/
......@@ -17,7 +17,7 @@
/**
* \def MBEDTLS_CIPHER_NULL_CIPHER
@@ -716,19 +716,19 @@
@@ -750,19 +750,19 @@
*
* Comment macros to disable the curve and functions for it
*/
......@@ -46,7 +46,7 @@
/**
* \def MBEDTLS_ECP_NIST_OPTIM
@@ -830,7 +830,7 @@
@@ -864,7 +864,7 @@
* See dhm.h for more details.
*
*/
......@@ -55,7 +55,7 @@
/**
* \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
@@ -850,7 +850,7 @@
@@ -884,7 +884,7 @@
* MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
* MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
*/
......@@ -64,7 +64,7 @@
/**
* \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
@@ -875,7 +875,7 @@
@@ -909,7 +909,7 @@
* MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
* MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
*/
......@@ -73,7 +73,7 @@
/**
* \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
@@ -1009,7 +1009,7 @@
@@ -1043,7 +1043,7 @@
* MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
* MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
*/
......@@ -82,7 +82,7 @@
/**
* \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
@@ -1033,7 +1033,7 @@
@@ -1067,7 +1067,7 @@
* MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
* MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
*/
......@@ -91,7 +91,7 @@
/**
* \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
@@ -1137,7 +1137,7 @@
@@ -1171,7 +1171,7 @@
* This option is only useful if both MBEDTLS_SHA256_C and
* MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used.
*/
......@@ -100,7 +100,7 @@
/**
* \def MBEDTLS_ENTROPY_NV_SEED
@@ -1232,14 +1232,14 @@
@@ -1266,14 +1266,14 @@
* Uncomment this macro to disable the use of CRT in RSA.
*
*/
......@@ -117,7 +117,7 @@
/**
* \def MBEDTLS_SHA256_SMALLER
@@ -1393,7 +1393,7 @@
@@ -1427,7 +1427,7 @@
* configuration of this extension).
*
*/
......@@ -126,7 +126,7 @@
/**
* \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
@@ -1568,7 +1568,7 @@
@@ -1602,7 +1602,7 @@
*
* Comment this macro to disable support for SSL session tickets
*/
......@@ -135,7 +135,7 @@
/**
* \def MBEDTLS_SSL_EXPORT_KEYS
@@ -1598,7 +1598,7 @@
@@ -1632,7 +1632,7 @@
*
* Comment this macro to disable support for truncated HMAC in SSL
*/
......@@ -144,7 +144,7 @@
/**
* \def MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT
@@ -1657,7 +1657,7 @@
@@ -1691,7 +1691,7 @@
*
* Comment this to disable run-time checking and save ROM space
*/
......@@ -153,7 +153,7 @@
/**
* \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
@@ -1987,7 +1987,7 @@
@@ -2021,7 +2021,7 @@
* MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
* MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
*/
......@@ -162,7 +162,7 @@
/**
* \def MBEDTLS_ARIA_C
@@ -2053,7 +2053,7 @@
@@ -2087,7 +2087,7 @@
* This module enables the AES-CCM ciphersuites, if other requisites are
* enabled as well.
*/
......@@ -171,7 +171,7 @@
/**
* \def MBEDTLS_CERTS_C
@@ -2065,7 +2065,7 @@
@@ -2099,7 +2099,7 @@
*
* This module is used for testing (ssl_client/server).
*/
......@@ -180,7 +180,7 @@
/**
* \def MBEDTLS_CHACHA20_C
@@ -2169,7 +2169,7 @@
@@ -2203,7 +2203,7 @@
* \warning DES is considered a weak cipher and its use constitutes a
* security risk. We recommend considering stronger ciphers instead.
*/
......@@ -189,7 +189,7 @@
/**
* \def MBEDTLS_DHM_C
@@ -2332,7 +2332,7 @@
@@ -2366,7 +2366,7 @@
* This module adds support for the Hashed Message Authentication Code
* (HMAC)-based key derivation function (HKDF).
*/
......@@ -198,7 +198,7 @@
/**
* \def MBEDTLS_HMAC_DRBG_C
@@ -2642,7 +2642,7 @@
@@ -2676,7 +2676,7 @@
*
* This module enables abstraction of common (libc) functions.
*/
......@@ -207,7 +207,7 @@
/**
* \def MBEDTLS_POLY1305_C
@@ -2663,7 +2663,7 @@
@@ -2697,7 +2697,7 @@
* Caller: library/md.c
*
*/
......@@ -216,7 +216,7 @@
/**
* \def MBEDTLS_RSA_C
@@ -2770,7 +2770,7 @@
@@ -2804,7 +2804,7 @@
*
* Requires: MBEDTLS_CIPHER_C
*/
......@@ -225,7 +225,7 @@
/**
* \def MBEDTLS_SSL_CLI_C
@@ -2870,7 +2870,7 @@
@@ -2904,7 +2904,7 @@
*
* This module provides run-time version information.
*/
......@@ -234,7 +234,7 @@
/**
* \def MBEDTLS_X509_USE_C
@@ -2980,7 +2980,7 @@
@@ -3014,7 +3014,7 @@
* Module: library/xtea.c
* Caller:
*/
......
From 7aff5a70f3580426865b6c86437a3e47546d13f7 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sun, 16 Dec 2018 13:02:49 +0100
Subject: [PATCH] bn_mul.h: Use optimized MULADDC code only on ARM >= 6
The optimized code uses umaal which was only introduced with ARMv6 and
is not available on older versions.
This broke compilation with arm926ej-s CPU for me.
Fixes: 16b1bd89326 ("bn_mul.h: add ARM DSP optimized MULADDC code")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
include/mbedtls/bn_mul.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/include/mbedtls/bn_mul.h
+++ b/include/mbedtls/bn_mul.h
@@ -644,7 +644,8 @@
"r6", "r7", "r8", "r9", "cc" \
);
-#elif defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)
+#elif defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1) && \
+ __TARGET_ARCH_ARM >= 6
#define MULADDC_INIT \
asm(
......@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=uclibc++
PKG_VERSION:=0.2.5
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=uClibc++-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://cxx.uclibc.org/src/
......
--- a/bin/Makefile.in
+++ b/bin/Makefile.in
@@ -44,8 +44,8 @@ define do_wrapper
$(Q)echo ' WRAPPER_OPTIONS="$$WRAPPER_OPTIONS -nodefaultlibs $$WRAPPER_LIBDIR -l$(LNAME) $$WRAPPER_LIBS"' >> $@.tmp
$(Q)echo 'fi' >> $@.tmp
$(Q)echo '' >> $@.tmp
- $(Q)echo '[ -n "$$V" ] && [ $$V -gt 1 ] && echo $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) $$WRAPPER_INCLUDEDIR "$$@" $$WRAPPER_OPTIONS' >> $@.tmp
- $(Q)echo 'exec $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) $$WRAPPER_INCLUDEDIR "$$@" $$WRAPPER_OPTIONS' >> $@.tmp
+ $(Q)echo '[ -n "$$V" ] && [ $$V -gt 1 ] && echo $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) $$WRAPPER_INCLUDEDIR $$@ $$WRAPPER_OPTIONS' >> $@.tmp
+ $(Q)echo 'exec $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) $$WRAPPER_INCLUDEDIR $$@ $$WRAPPER_OPTIONS' >> $@.tmp
$(Q)echo '' >> $@.tmp
$(Q)chmod 0755 $@.tmp
$(Q)mv $@.tmp $@
......@@ -50,28 +50,27 @@ config WOLFSSL_HAS_ECC25519
config WOLFSSL_HAS_DEVCRYPTO
bool
if WOLFSSL_HAS_AES_CCM
comment "! Hardware Acceleration does not build with AES-CCM enabled"
endif
if !WOLFSSL_HAS_AES_CCM
choice
prompt "Hardware Acceleration"
default WOLFSSL_HAS_NO_HW
choice
prompt "Hardware Acceleration"
default WOLFSSL_HAS_NO_HW
config WOLFSSL_HAS_NO_HW
bool "None"
config WOLFSSL_HAS_NO_HW
bool "None"
config WOLFSSL_HAS_AFALG
bool "AF_ALG"
config WOLFSSL_HAS_AFALG
bool "AF_ALG"
config WOLFSSL_HAS_DEVCRYPTO_AES
bool "/dev/crypto - AES-only"
select WOLFSSL_HAS_DEVCRYPTO
config WOLFSSL_HAS_DEVCRYPTO_CBC
bool "/dev/crytpo - AES-CBC-only"
select WOLFSSL_HAS_DEVCRYPTO
config WOLFSSL_HAS_DEVCRYPTO_FULL
bool "/dev/crypto - full"
select WOLFSSL_HAS_DEVCRYPTO
endchoice
endif
config WOLFSSL_HAS_DEVCRYPTO_AES
bool "/dev/crypto - AES-only (all supported modes)"
select WOLFSSL_HAS_DEVCRYPTO
config WOLFSSL_HAS_DEVCRYPTO_FULL
bool "/dev/crypto - full"
select WOLFSSL_HAS_DEVCRYPTO
endchoice
endif
......@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=wolfssl
PKG_VERSION:=4.1.0-stable
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
......@@ -77,7 +77,9 @@ CONFIGURE_ARGS += \
--$(if $(CONFIG_WOLFSSL_HAS_DTLS),enable,disable)-dtls \
--$(if $(CONFIG_WOLFSSL_HAS_ECC25519),enable,disable)-curve25519 \
--$(if $(CONFIG_WOLFSSL_HAS_AFALG),enable,disable)-afalg \
--enable-devcrypto=$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES),aes,$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_FULL),yes,no))
--enable-devcrypto=$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_CBC),cbc\
,$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES),aes\
,$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_FULL),yes,no)))
ifeq ($(CONFIG_WOLFSSL_HAS_OCSP),y)
CONFIGURE_ARGS += \
......
From e8e1d35744c68b165e172a687e870a549438bdf0 Mon Sep 17 00:00:00 2001
From: Jacob Barthelmeh <jacob@wolfssl.com>
Date: Tue, 13 Aug 2019 14:12:45 -0600
Subject: [PATCH] build with devcrypto and aesccm
diff --git a/configure.ac b/configure.ac
index f943cc6ef..cf03e7f52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1096,6 +1096,10 @@ then
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO"
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_CBC"
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_AES"
+ if test "$ENABLED_AESCCM" = "yes"
+ then
+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_DIRECT"
+ fi
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_HASH"
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_HASH_RAW"
ENABLED_DEVCRYPTO=yes
@@ -1106,6 +1110,10 @@ then
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO"
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_AES"
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_CBC"
+ if test "$ENABLED_AESCCM" = "yes"
+ then
+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_DIRECT"
+ fi
ENABLED_DEVCRYPTO=yes
fi
if test "$ENABLED_DEVCRYPTO" = "cbc"
diff --git a/wolfcrypt/src/aes.c b/wolfcrypt/src/aes.c
index beeae72a6..b583d03e9 100644
--- a/wolfcrypt/src/aes.c
+++ b/wolfcrypt/src/aes.c
@@ -760,6 +760,14 @@
#elif defined(WOLFSSL_DEVCRYPTO_AES)
/* if all AES is enabled with devcrypto then tables are not needed */
+ #if defined(HAVE_AESCCM)
+ static int wc_AesEncrypt(Aes* aes, const byte* inBlock, byte* outBlock)
+ {
+ wc_AesEncryptDirect(aes, outBlock, inBlock);
+ return 0;
+ }
+ #endif
+
#else
/* using wolfCrypt software implementation */
@@ -1314,7 +1322,8 @@ static const word32 Td[4][256] = {
};
-#if defined(HAVE_AES_CBC) || defined(WOLFSSL_AES_DIRECT)
+#if (defined(HAVE_AES_CBC) && !defined(WOLFSSL_DEVCRYPTO_CBC)) \
+ || defined(WOLFSSL_AES_DIRECT)
static const byte Td4[256] =
{
0x52U, 0x09U, 0x6aU, 0xd5U, 0x30U, 0x36U, 0xa5U, 0x38U,
diff --git a/wolfcrypt/src/port/devcrypto/devcrypto_aes.c b/wolfcrypt/src/port/devcrypto/devcrypto_aes.c
index 5c63421e2..d5061f364 100644
--- a/wolfcrypt/src/port/devcrypto/devcrypto_aes.c
+++ b/wolfcrypt/src/port/devcrypto/devcrypto_aes.c
@@ -168,7 +168,7 @@ static int wc_DevCrypto_AesDirect(Aes* aes, byte* out, const byte* in,
#endif
-#if defined(WOLFSSL_AES_DIRECT)
+#if defined(WOLFSSL_AES_DIRECT) || defined(HAVE_AESCCM)
void wc_AesEncryptDirect(Aes* aes, byte* out, const byte* in)
{
wc_DevCrypto_AesDirect(aes, out, in, AES_BLOCK_SIZE, COP_ENCRYPT);
From 9fd38dc340c38dee6e5935da174f90270a63bfbf Mon Sep 17 00:00:00 2001
From: Jacob Barthelmeh <jacob@wolfssl.com>
Date: Fri, 30 Aug 2019 16:15:48 -0600
Subject: [PATCH] build fix for aesccm + devcrypto=cbc + wpas and afalg
diff --git a/configure.ac b/configure.ac
index 61fad39dd..30731eb52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1045,6 +1045,10 @@ AC_ARG_ENABLE([afalg],
if test "$ENABLED_AFALG" = "yes"
then
+ if test "$ENABLED_AESCCM" = "yes"
+ then
+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_DIRECT"
+ fi
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG"
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AFALG_HASH"
fi
diff --git a/wolfcrypt/src/aes.c b/wolfcrypt/src/aes.c
index fef2f9c74..d294f6236 100644
--- a/wolfcrypt/src/aes.c
+++ b/wolfcrypt/src/aes.c
@@ -759,7 +759,9 @@
}
#endif /* HAVE_AES_DECRYPT */
-#elif defined(WOLFSSL_IMX6_CAAM) && !defined(NO_IMX6_CAAM_AES)
+#elif (defined(WOLFSSL_IMX6_CAAM) && !defined(NO_IMX6_CAAM_AES)) || \
+ ((defined(WOLFSSL_AFALG) || defined(WOLFSSL_DEVCRYPTO_AES)) && \
+ defined(HAVE_AESCCM))
static int wc_AesEncrypt(Aes* aes, const byte* inBlock, byte* outBlock)
{
wc_AesEncryptDirect(aes, outBlock, inBlock);
@@ -768,16 +770,6 @@
#elif defined(WOLFSSL_AFALG)
#elif defined(WOLFSSL_DEVCRYPTO_AES)
- /* if all AES is enabled with devcrypto then tables are not needed */
-
- #if defined(HAVE_AESCCM)
- static int wc_AesEncrypt(Aes* aes, const byte* inBlock, byte* outBlock)
- {
- wc_AesEncryptDirect(aes, outBlock, inBlock);
- return 0;
- }
- #endif
-
#else
/* using wolfCrypt software implementation */
@@ -1593,8 +1585,8 @@ static void wc_AesEncrypt(Aes* aes, const byte* inBlock, byte* outBlock)
#endif /* HAVE_AES_CBC || WOLFSSL_AES_DIRECT || HAVE_AESGCM */
#if defined(HAVE_AES_DECRYPT)
-#if (defined(HAVE_AES_CBC) || defined(WOLFSSL_AES_DIRECT)) && \
- !defined(WOLFSSL_DEVCRYPTO_CBC)
+#if (defined(HAVE_AES_CBC) && !defined(WOLFSSL_DEVCRYPTO_CBC)) || \
+ defined(WOLFSSL_AES_DIRECT)
/* load 4 Td Tables into cache by cache line stride */
static WC_INLINE word32 PreFetchTd(void)
From 8c07fa9eda13e835f3f968b2e1c9a8be3a851ff9 Mon Sep 17 00:00:00 2001
From: Jouni Malinen <j@w1.fi>
Date: Thu, 29 Aug 2019 11:52:04 +0300
Subject: [PATCH] AP: Silently ignore management frame from unexpected source
address
Do not process any received Management frames with unexpected/invalid SA
so that we do not add any state for unexpected STA addresses or end up
sending out frames to unexpected destination. This prevents unexpected
sequences where an unprotected frame might end up causing the AP to send
out a response to another device and that other device processing the
unexpected response.
In particular, this prevents some potential denial of service cases
where the unexpected response frame from the AP might result in a
connected station dropping its association.
Signed-off-by: Jouni Malinen <j@w1.fi>
---
src/ap/drv_callbacks.c | 13 +++++++++++++
src/ap/ieee802_11.c | 12 ++++++++++++
2 files changed, 25 insertions(+)
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -129,6 +129,19 @@ int hostapd_notif_assoc(struct hostapd_d
"hostapd_notif_assoc: Skip event with no address");
return -1;
}
+
+ if (is_multicast_ether_addr(addr) ||
+ is_zero_ether_addr(addr) ||
+ os_memcmp(addr, hapd->own_addr, ETH_ALEN) == 0) {
+ /* Do not process any frames with unexpected/invalid SA so that
+ * we do not add any state for unexpected STA addresses or end
+ * up sending out frames to unexpected destination. */
+ wpa_printf(MSG_DEBUG, "%s: Invalid SA=" MACSTR
+ " in received indication - ignore this indication silently",
+ __func__, MAC2STR(addr));
+ return 0;
+ }
+
random_add_randomness(addr, ETH_ALEN);
hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211,
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -3978,6 +3978,18 @@ int ieee802_11_mgmt(struct hostapd_data
fc = le_to_host16(mgmt->frame_control);
stype = WLAN_FC_GET_STYPE(fc);
+ if (is_multicast_ether_addr(mgmt->sa) ||
+ is_zero_ether_addr(mgmt->sa) ||
+ os_memcmp(mgmt->sa, hapd->own_addr, ETH_ALEN) == 0) {
+ /* Do not process any frames with unexpected/invalid SA so that
+ * we do not add any state for unexpected STA addresses or end
+ * up sending out frames to unexpected destination. */
+ wpa_printf(MSG_DEBUG, "MGMT: Invalid SA=" MACSTR
+ " in received frame - ignore this frame silently",
+ MAC2STR(mgmt->sa));
+ return 0;
+ }
+
if (stype == WLAN_FC_STYPE_BEACON) {
handle_beacon(hapd, mgmt, len, fi);
return 1;
......@@ -178,7 +178,7 @@
/*
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -1527,8 +1527,8 @@ static void hostapd_event_wds_sta_interf
@@ -1540,8 +1540,8 @@ static void hostapd_event_wds_sta_interf
}
......@@ -189,7 +189,7 @@
{
struct hostapd_data *hapd = ctx;
#ifndef CONFIG_NO_STDOUT_DEBUG
@@ -1757,7 +1757,7 @@ void wpa_supplicant_event(void *ctx, enu
@@ -1770,7 +1770,7 @@ void wpa_supplicant_event(void *ctx, enu
}
......
......@@ -191,7 +191,7 @@ Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
#ifdef CONFIG_P2P
if (sta && sta->p2p_ie && hapd->p2p_group) {
struct wpabuf *p2p_resp_ie;
@@ -4236,7 +4311,7 @@ static void handle_assoc_cb(struct hosta
@@ -4248,7 +4323,7 @@ static void handle_assoc_cb(struct hosta
sta->flags |= WLAN_STA_WDS;
}
......
......@@ -193,7 +193,7 @@
sta = ap_get_sta(hapd, mgmt->sa);
if (sta == NULL) {
wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR " trying "
@@ -4077,7 +4106,7 @@ int ieee802_11_mgmt(struct hostapd_data
@@ -4089,7 +4118,7 @@ int ieee802_11_mgmt(struct hostapd_data
if (stype == WLAN_FC_STYPE_PROBE_REQ) {
......@@ -202,7 +202,7 @@
return 1;
}
@@ -4097,17 +4126,17 @@ int ieee802_11_mgmt(struct hostapd_data
@@ -4109,17 +4138,17 @@ int ieee802_11_mgmt(struct hostapd_data
switch (stype) {
case WLAN_FC_STYPE_AUTH:
wpa_printf(MSG_DEBUG, "mgmt::auth");
......@@ -292,7 +292,7 @@
if (addr == NULL) {
/*
@@ -195,6 +199,12 @@ int hostapd_notif_assoc(struct hostapd_d
@@ -208,6 +212,12 @@ int hostapd_notif_assoc(struct hostapd_d
goto fail;
}
......
......@@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
PKG_SOURCE_DATE:=2019-08-28
PKG_SOURCE_VERSION:=6a61b9ac105b8eb28680e728a2723e302a91304d
PKG_MIRROR_HASH:=f617d06ccea732fcbfdc2a2bd70c59726d37f61de100fae895d718884a9624d1
PKG_SOURCE_DATE:=2019-09-21
PKG_SOURCE_VERSION:=4327ed40d96c95803b2d4d09ddf997c895eea071
PKG_MIRROR_HASH:=34e4510fbf8eb01571e4af632754c2f6799719e1f743037b998ca7fc838e6288
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0
......
......@@ -12,9 +12,9 @@ PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
PKG_MIRROR_HASH:=4a99856ac9696a9c8721aa090780f2bee929aae056561729d7a01efe8fd584ec
PKG_SOURCE_DATE:=2019-09-16
PKG_SOURCE_VERSION:=62dc8c0efe1e8acd694b893effd973a295c5b676
PKG_MIRROR_HASH:=5ae16b53f80fd85d367a58da822351d611e9662154b0737ee6ed9531a39f01ce
PKG_SOURCE_DATE:=2019-09-21
PKG_SOURCE_VERSION:=8e9fb51fa66e614620a97d371176610e7e1d0010
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0
......
......@@ -5,9 +5,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/usign.git
PKG_SOURCE_DATE:=2019-08-06
PKG_SOURCE_VERSION:=5a52b379902471cef495687547c7b568142f66d2
PKG_MIRROR_HASH:=9779f6d6718a7f7cd3e28aa7feefc9b3f4b0c7a85cb58ff18afbeb6b4372177a
PKG_SOURCE_DATE:=2019-09-21
PKG_SOURCE_VERSION:=f34a383eeed6282fa16fb021157a60c75f33fdcd
PKG_MIRROR_HASH:=74dc05f3ff24995193956a2803d20994fa6fce3d9e7d997002ee524618fbcec6
CMAKE_INSTALL:=1
PKG_CHECK_FORMAT_SECURITY:=1
PKG_USE_MIPS16:=0
......
......@@ -63,6 +63,8 @@ define Device/evaluation-dtb
$(Device/evaluation-zImage)
IMAGES += dtb
IMAGE/dtb := install-dtb
KERNEL_SUFFIX := -fit-zImage.itb
KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
endef
define Device/evaluation-fit
......
......@@ -5,6 +5,44 @@ define Device/default-nand
MKUBIFS_OPTS := -m $$(PAGESIZE) -e 126KiB -c 2048
endef
define Build/at91-sdcard
$(if $(findstring ext4,$@), \
rm -f $@.boot
mkfs.fat -C $@.boot $(FAT32_BLOCKS)
mcopy -i $@.boot \
$(KDIR)/$(DEVICE_NAME)-fit-zImage.itb \
::$(DEVICE_NAME)-fit.itb
mcopy -i $@.boot \
$(BIN_DIR)/u-boot-at91sam9x5ek_mmc/u-boot.bin \
::u-boot.bin
mcopy -i $@.boot \
$(BIN_DIR)/at91bootstrap-at91sam9x5eksd_uboot/at91bootstrap.bin \
::BOOT.bin
$(CP) uboot-env.txt $@-uboot-env.txt
sed -i '2d;3d' $@-uboot-env.txt
sed -i '2i board='"$(DEVICE_NAME)"'' $@-uboot-env.txt
sed -i '3i board_name='"$(DEVICE_NAME)"'' $@-uboot-env.txt
mkenvimage -s 0x4000 -o $@-uboot.env $@-uboot-env.txt
mcopy -i $@.boot $@-uboot.env ::uboot.env
./gen_at91_sdcard_img.sh \
$@.img \
$@.boot \
$(KDIR)/root.ext4 \
$(AT91_SD_BOOT_PARTSIZE) \
$(CONFIG_TARGET_ROOTFS_PARTSIZE)
gzip -nc9 $@.img > $@
rm -f $@.img $@.boot $@-uboot.env $@-uboot-env.txt)
endef
define Device/at91sam9263ek
$(Device/evaluation-dtb)
DEVICE_VENDOR := Atmel
......@@ -56,16 +94,18 @@ endef
TARGET_DEVICES += at91sam9m10g45ek
define Device/at91sam9x25ek
$(Device/evaluation)
$(Device/evaluation-dtb)
DEVICE_VENDOR := Atmel
DEVICE_MODEL := AT91SAM9X25-EK
$(Device/evaluation-sdimage)
endef
TARGET_DEVICES += at91sam9x25ek
define Device/at91sam9x35ek
$(Device/evaluation)
$(Device/evaluation-dtb)
DEVICE_VENDOR := Atmel
DEVICE_MODEL := AT91SAM9X35-EK
$(Device/evaluation-sdimage)
endef
TARGET_DEVICES += at91sam9x35ek
......
......@@ -11,7 +11,9 @@ define Build/at91-sdcard
rm -f $@.boot
mkfs.fat -C $@.boot $(FAT32_BLOCKS)
mcopy -i $@.boot $(KDIR)/zImage ::zImage
mcopy -i $@.boot \
$(KDIR)/$(DEVICE_NAME)-fit-zImage.itb \
::$(DEVICE_NAME:at91-%=%)-fit.itb
$(if $(findstring at91-sama5d27_som1_ek,$@), \
mcopy -i $@.boot \
......
......@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
ARCH:=arm
BOARD:=sunxi
BOARDNAME:=Allwinner A1x/A20/A3x
BOARDNAME:=Allwinner A1x/A20/A3x/R40
FEATURES:=fpu usb ext4 display rtc squashfs
SUBTARGETS:=cortexa8 cortexa7 cortexa53
MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
......@@ -23,6 +23,7 @@ KERNELNAME:=zImage dtbs
# A31: quad Cortex-A7
# A80: octa Cortex-A15/A7
# H3: quad Cortex-A7
# R40: quad Cortex-A7
include $(INCLUDE_DIR)/target.mk
......
......@@ -7,6 +7,6 @@
include $(TOPDIR)/rules.mk
BOARDNAME:=Allwinner A20/A3x
BOARDNAME:=Allwinner A20/A3x/R40
CPU_TYPE:=cortex-a7
CPU_SUBTYPE:=neon-vfpv4
......@@ -239,4 +239,14 @@ endef
TARGET_DEVICES += sun7i-a20-pcduino3
define Device/sun8i-r40-bananapi-m2-ultra
DEVICE_VENDOR := LeMaker
DEVICE_MODEL := Banana Pi M2 Ultra
DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi
SUPPORTED_DEVICES:=lemaker,bananapi-m2-ultra
SUNXI_DTS:=sun8i-r40-bananapi-m2-ultra
endef
TARGET_DEVICES += sun8i-r40-bananapi-m2-ultra
endif
From d57faea9337ad595d005687247c3322252f70ba1 Mon Sep 17 00:00:00 2001
From: rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Sun, 7 Jul 2019 09:49:14 +0000
Subject: [PATCH] Fix uninitialised use in mips_split_move
While testing the fix for PR91068, I hit an rtl checking failure
while building newlib. mips_split_move was decomposing an address that
happened to be symbolic and then tried to access the REGNO of the base
register field, which wasn't initialised but which by chance pointed to
valid memory.
2019-07-07 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* config/mips/mips.c (mips_split_move): Zero-initialize addr
and check whether addr.reg is nonnull before using it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@273174 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/ChangeLog | 5 +++++
gcc/config/mips/mips.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2019-07-07 Richard Sandiford <richard.sandiford@arm.com>
+
+ * config/mips/mips.c (mips_split_move): Zero-initialize addr
+ and check whether addr.reg is nonnull before using it.
+
2019-08-12 Release Manager
* GCC 9.2.0 released.
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -4849,7 +4849,7 @@ mips_split_move (rtx dest, rtx src, enum
can forward SRC for DEST. This is most useful if the next insn is a
simple store. */
rtx_insn *insn = (rtx_insn *)insn_;
- struct mips_address_info addr;
+ struct mips_address_info addr = {};
if (insn)
{
rtx_insn *next = next_nonnote_nondebug_insn_bb (insn);
@@ -4862,7 +4862,7 @@ mips_split_move (rtx dest, rtx src, enum
{
rtx tmp = XEXP (src, 0);
mips_classify_address (&addr, tmp, GET_MODE (tmp), true);
- if (REGNO (addr.reg) != REGNO (dest))
+ if (addr.reg && REGNO (addr.reg) != REGNO (dest))
validate_change (next, &SET_SRC (set), src, false);
}
else