patch review
cover patch review
Please have comment submitted by Tuesday
The following changes since commit 3bdbf72e3a4bf18a4a2c7afbde4f7ab773aeded9:
oprofile: drop kernel-vmlinux from RRECOMMENDS (2019-09-07 15:30:50 -0700)
are available in the git repository at:
https://git.openembedded.org/meta-openembedded-contrib stable/warrior-nmut
http://cgit.openembedded.org//log/?h=stable/warrior-nmut
Bruce Ashfield (1):
dnsmasq: fix build against 5.2 headers
Kai Kang (1):
apache2: fix multilib file conflicts
Khem Raj (7):
redis: Fix build with clang/x86
klibc: Pass -fno-builtin-bcmp with musl/clang combo
klibc: Disable bcmp builtin for clang on glibc as well
klibc: Fix build with 5.2+ kernel headers bpftool.bb: Disable SECURITY_CFLAGS
linux-atm: Fix build with kernel headers 5.2+
can-utils: Fix build with kernel headers >= 5.2
Peiran Hong (1):
tcpdump: Fix CVE-2017-16808
.../0001-Fix-missing-include-in-sys-mman.h.patch | 36 +++++++ meta-initramfs/recipes-devtools/klibc/klibc.inc | 6 +- ...001-dnsmasq-fix-build-against-5.2-headers.patch | 31 ++++++ .../recipes-support/dnsmasq/dnsmasq_2.80.bb | 1 + ...mdump-Include-linux-sockios.h-for-SIOCGST.patch | 59 ++++++++++++ .../recipes-support/linux-atm/linux-atm_2.5.2.bb | 1 + ...2017-16808-AoE-Add-a-missing-bounds-check.patch | 61 ++++++++++++ .../recipes-support/tcpdump/tcpdump_4.9.2.bb | 1 + .../redis/0001-src-Do-not-reset-FINAL_LIBS.patch | 32 +++++++ meta-oe/recipes-extended/redis/redis_4.0.14.bb | 5 +- ...ude-to-find-SIOCGSTAMP-with-latest-kernel.patch | 106 +++++++++++++++++++++ .../recipes-extended/socketcan/can-utils_git.bb | 4 +- meta-oe/recipes-kernel/bpftool/bpftool.bb | 4 +- .../recipes-httpd/apache2/apache2_2.4.41.bb | 6 +- 14 files changed, 346 insertions(+), 7 deletions(-) create mode 100644 meta-initramfs/recipes-devtools/klibc/files/0001-Fix-missing-include-in-sys-mman.h.patch create mode 100644 meta-networking/recipes-support/dnsmasq/dnsmasq/0001-dnsmasq-fix-build-against-5.2-headers.patch create mode 100644 meta-networking/recipes-support/linux-atm/linux-atm/0001-saaldump-atmdump-Include-linux-sockios.h-for-SIOCGST.patch create mode 100644 meta-networking/recipes-support/tcpdump/tcpdump/0001-CVE-2017-16808-AoE-Add-a-missing-bounds-check.patch create mode 100644 meta-oe/recipes-extended/redis/redis/0001-src-Do-not-reset-FINAL_LIBS.patch create mode 100644 meta-oe/recipes-extended/socketcan/can-utils/0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch
Signature · 1 line
2.7.4
PATCH 1/10 tcpdump: Fix CVE-2017-16808
From: Peiran Hong <[email protected]>
Backport selected parts of three upstream commits to fix CVE-2017-16808 where tcpdump 4.9.2 has a heap-based buffer over-read.
Upstream-Status: Backport
[ several ]
Upstream commits fully backported:
46aead6 [CVE-2017-16808/AoE: Add a missing bounds check]
Upstream commits partially backported:
7068209 [Use nd_ types in 802.x and FDDI headers.] 84ef17a [Replace ND_TTEST2()/ND_TCHECK2() macros by macros using pointers (1/n)]
46aead6 fixes the vulnerability and requires two macros defined in 7068209 and 84ef17a, which are committed after the release of 4.9.2. Only the definition of the macros are taken from the two commits as they impact a wide range of code and are difficult to integrate.
CVE: CVE-2017-16808
--- ...2017-16808-AoE-Add-a-missing-bounds-check.patch | 61 ++++++++++++++++++++++ .../recipes-support/tcpdump/tcpdump_4.9.2.bb | 1 + 2 files changed, 62 insertions(+) create mode 100644 meta-networking/recipes-support/tcpdump/tcpdump/0001-CVE-2017-16808-AoE-Add-a-missing-bounds-check.patch
meta-networking/recipes-support/tcpdump/tcpdump/0001-CVE-2017-16808-AoE-Add-a-missing-bounds-check.patch new file +61 -0
@@ -0,0 +1,61 @@ +From c45443a0d3e16b92622bea6b589e5930e8f0d815 Mon Sep 17 00:00:00 2001 +From: Peiran Hong <[email protected]> +Date: Fri, 13 Sep 2019 17:02:57 -0400 +Subject: [PATCH] CVE-2017-16808/AoE: Add a missing bounds check. + +--- + netdissect.h | 12 ++++++++++++ + print-aoe.c | 1 + + 2 files changed, 13 insertions(+) + +diff --git a/netdissect.h b/netdissect.h +index 089b0406..cd05fdb9 100644 +--- a/netdissect.h ++++ b/netdissect.h +@@ -69,6 +69,11 @@ typedef struct { + typedef unsigned char nd_uint8_t; + typedef signed char nd_int8_t; + ++/* ++ * Use this for MAC addresses. ++ */ ++#define MAC_ADDR_LEN 6 /* length of MAC addresses */ ++ + /* snprintf et al */ + + #include <stdarg.h> +@@ -309,12 +314,19 @@ struct netdissect_options { + ((uintptr_t)ndo->ndo_snapend - (l) <= (uintptr_t)ndo->ndo_snapend && \ + (uintptr_t)&(var) <= (uintptr_t)ndo->ndo_snapend - (l))) + ++#define ND_TTEST_LEN(p, l) \ ++ (IS_NOT_NEGATIVE(l) && \ ++ ((uintptr_t)ndo->ndo_snapend - (l) <= (uintptr_t)ndo->ndo_snapend && \ ++ (uintptr_t)(p) <= (uintptr_t)ndo->ndo_snapend - (l))) ++ + /* True if "var" was captured */ + #define ND_TTEST(var) ND_TTEST2(var, sizeof(var)) + + /* Bail if "l" bytes of "var" were not captured */ + #define ND_TCHECK2(var, l) if (!ND_TTEST2(var, l)) goto trunc + ++#define ND_TCHECK_LEN(p, l) if (!ND_TTEST_LEN(p, l)) goto trunc ++ + /* Bail if "var" was not captured */ + #define ND_TCHECK(var) ND_TCHECK2(var, sizeof(var)) + +diff --git a/print-aoe.c b/print-aoe.c +index 97e93df2..ac097a04 100644 +--- a/print-aoe.c ++++ b/print-aoe.c +@@ -325,6 +325,7 @@ aoev1_reserve_print(netdissect_options *ndo, + goto invalid; + /* addresses */ + for (i = 0; i < nmacs; i++) { ++ ND_TCHECK_LEN(cp, MAC_ADDR_LEN); + ND_PRINT((ndo, "\n\tEthernet Address %u: %s", i, etheraddr_string(ndo, cp))); + cp += ETHER_ADDR_LEN; + } +-- +2.21.0 +
meta-networking/recipes-support/tcpdump/tcpdump_4.9.2.bb +1 -0
@@ -12,6 +12,7 @@ SRC_URI = " \ file://avoid-absolute-path-when-searching-for-libdlpi.patch \ file://add-ptest.patch \ file://run-ptest \ + file://0001-CVE-2017-16808-AoE-Add-a-missing-bounds-check.patch \ " SRC_URI[md5sum] = "9bbc1ee33dab61302411b02dd0515576"
Signature · 1 line
2.7.4
PATCH 2/10 redis: Fix build with clang/x86
In reply to Armin KusterFrom: Khem Raj <[email protected]>
Need to link with libatomics for 64bit atomics support
Fixes
i686-yoe-linux/i686-yoe-linux-ld: networking.o: in function `createClient':
| /usr/src/debug/redis/4.0.14-r0/redis-4.0.14/src/networking.c:103: undefined reference to `__atomic_fetch_add_8'
--- .../redis/0001-src-Do-not-reset-FINAL_LIBS.patch | 32 ++++++++++++++++++++++ meta-oe/recipes-extended/redis/redis_4.0.14.bb | 5 +++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-extended/redis/redis/0001-src-Do-not-reset-FINAL_LIBS.patch
meta-oe/recipes-extended/redis/redis/0001-src-Do-not-reset-FINAL_LIBS.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 97584e1eb78dc18599534b47b6670c20c63f5ee2 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Tue, 10 Sep 2019 20:04:26 -0700 +Subject: [PATCH] src: Do not reset FINAL_LIBS + +This helps case where additional libraries are needed to be passed from +environment to get it going + +e.g. -latomic is needed on clang/x86 to provide for 64bit atomics + +Upstream-Status: Pending +Signed-off-by: Khem Raj <[email protected]> +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index 7f7c625..c71dd3b 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -66,7 +66,7 @@ endif + + FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) + FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) +-FINAL_LIBS=-lm ++FINAL_LIBS+=-lm + DEBUG=-g -ggdb + + ifeq ($(uname_S),SunOS) +-- +2.23.0 +
meta-oe/recipes-extended/redis/redis_4.0.14.bb +4 -1
@@ -11,6 +11,7 @@ SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \ file://lua-update-Makefile-to-use-environment-build-setting.patch \ file://oe-use-libc-malloc.patch \ file://Fixed-stack-trace-generation-on-aarch64.patch \ + file://0001-src-Do-not-reset-FINAL_LIBS.patch \ file://redis.conf \ file://init-redis-server \ file://redis.service \
@@ -25,11 +26,13 @@ SRC_URI[sha256sum] = "1e1e18420a86cfb285933123b04a82e1ebda20bfb0a289472745a08758 inherit autotools-brokensep update-rc.d systemd useradd +FINAL_LIBS_x86_toolchain-clang = "-latomic" +export FINAL_LIBS + USERADD_PACKAGES = "${PN}" USERADD_PARAM_${PN} = "--system --home-dir /var/lib/redis -g redis --shell /bin/false redis" GROUPADD_PARAM_${PN} = "--system redis" - REDIS_ON_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" do_compile_prepend() {
Signature · 1 line
2.7.4
PATCH 3/10 apache2: fix multilib file conflicts
In reply to Armin KusterFrom: Kai Kang <[email protected]>
There are errors of apache2 about files conflicts when multilib enabled:
| Error: Transaction check error: | file /etc/apache2/extra/httpd-ssl.conf conflicts between attempted installs of lib32-apache2-2.4.41-r0.core2_32 and apache2-2.4.41-r0.core2_64 | file /etc/apache2/httpd.conf conflicts between attempted installs of lib32-apache2-2.4.41-r0.core2_32 and apache2-2.4.41-r0.core2_64 | file /usr/sbin/envvars conflicts between attempted installs of lib32-apache2-2.4.41-r0.core2_32 and apache2-2.4.41-r0.core2_64 | file /usr/sbin/envvars-std conflicts between attempted installs of lib32-apache2-2.4.41-r0.core2_32 and apache2-2.4.41-r0.core2_64
It makes libexecdir point to ${libdir}. Reset to ${libexecdir} which could eliminate file conflicts of the conf files. And remove /usr/sbin/envvars and /usr/sbin/envvars-std which only used by apachectl. They only add standard library path ${libdir} to LD_LIBRARY_PATH, so remove them to avoid multilib file conflicts.
--- meta-webserver/recipes-httpd/apache2/apache2_2.4.41.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
meta-webserver/recipes-httpd/apache2/apache2_2.4.41.bb +3 -3
@@ -53,7 +53,7 @@ EXTRA_OECONF_class-target = "\ --sysconfdir=${sysconfdir}/${BPN} \ --datadir=${datadir}/${BPN} \ --libdir=${libdir} \ - --libexecdir=${libdir}/${BPN}/modules \ + --libexecdir=${libexecdir}/${BPN}/modules \ --localstatedir=${localstatedir} \ --enable-ssl \ --with-dbm=sdbm \
@@ -78,7 +78,7 @@ EXTRA_OECONF_class-native = "\ " do_configure_prepend() { - sed -i -e 's:$''{prefix}/usr/lib/cgi-bin:$''{libdir}/cgi-bin:g' ${S}/config.layout + sed -i -e 's:$''{prefix}/usr/lib/cgi-bin:$''{libexecdir}/cgi-bin:g' ${S}/config.layout } do_install_append_class-target() {
@@ -139,7 +139,7 @@ do_install_append_class-target() { install -m 0644 ${WORKDIR}/volatiles.04_apache2 ${D}${sysconfdir}/default/volatiles/04_apache2 fi - rm -rf ${D}${localstatedir} + rm -rf ${D}${localstatedir} ${D}${sbindir}/envvars* chown -R root:root ${D} }
Signature · 1 line
2.7.4
PATCH 4/10 klibc: Pass -fno-builtin-bcmp with musl/clang combo
In reply to Armin KusterFrom: Khem Raj <[email protected]>
clang would emit bcmp built-in for musl bases system but here we do not link in musl C library, so its best to disable it
Fixesgit/usr/klibc/memmem.c:38: undefined reference to `bcmp'
--- meta-initramfs/recipes-devtools/klibc/klibc.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
meta-initramfs/recipes-devtools/klibc/klibc.inc +4 -1
@@ -33,6 +33,9 @@ ARMPATCHES_arm = "file://klibc-config-eabi.patch \ S = "${WORKDIR}/git" +OPTFLAGS = "${TUNE_CCARGS} -Os" +OPTFLAGS_append_libc-musl_toolchain-clang = " -fno-builtin-bcmp" + PARALLEL_MAKE = "" EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \ 'CROSS_COMPILE=${TARGET_PREFIX}' \
@@ -43,7 +46,7 @@ EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \ 'INSTALLDIR=${libdir}/klibc' \ 'SHLIBDIR=${libdir}' \ '${KLIBCTHUMB}' \ - 'KLIBCOPTFLAGS=${TUNE_CCARGS} -Os' \ + 'KLIBCOPTFLAGS=${OPTFLAGS}' \ V=1 \ "
Signature · 1 line
2.7.4
PATCH 5/10 klibc: Disable bcmp builtin for clang on glibc as well
In reply to Armin KusterFrom: Khem Raj <[email protected]>
--- meta-initramfs/recipes-devtools/klibc/klibc.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-initramfs/recipes-devtools/klibc/klibc.inc +1 -1
@@ -34,7 +34,7 @@ ARMPATCHES_arm = "file://klibc-config-eabi.patch \ S = "${WORKDIR}/git" OPTFLAGS = "${TUNE_CCARGS} -Os" -OPTFLAGS_append_libc-musl_toolchain-clang = " -fno-builtin-bcmp" +OPTFLAGS_append_toolchain-clang = " -fno-builtin-bcmp" PARALLEL_MAKE = "" EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \
Signature · 1 line
2.7.4
PATCH 6/10 klibc: Fix build with 5.2+ kernel headers
In reply to Armin KusterFrom: Khem Raj <[email protected]>
--- .../0001-Fix-missing-include-in-sys-mman.h.patch | 36 ++++++++++++++++++++++ meta-initramfs/recipes-devtools/klibc/klibc.inc | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta-initramfs/recipes-devtools/klibc/files/0001-Fix-missing-include-in-sys-mman.h.patch
meta-initramfs/recipes-devtools/klibc/files/0001-Fix-missing-include-in-sys-mman.h.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 36360b16833400de7818151be5588b16ac4fd5bc Mon Sep 17 00:00:00 2001 +From: Barret Rhoden <[email protected]> +Date: Thu, 14 Mar 2019 17:30:38 -0400 +Subject: [PATCH] Fix missing include in sys/mman.h + +Linux commit 746c9398f5ac ("arch: move common mmap flags to +linux/mman.h") moved a few mmap flags, particularly MAP_PRIVATE, from +asm/mman.h to linux/mman.h. This broke klibc's build, which uses +MAP_PRIVATE. + +linux/mman.h includes asm/mman.h, so this commit merely includes +linux/mman.h instead of asm/mman.h. + +Signed-off-by: Barret Rhoden <[email protected]> +Signed-off-by: Ben Hutchings <[email protected]> +--- +Upstream-Status: Backport [https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=d4853d030639cf3542ae39129c18b654d8d4f020] + usr/include/sys/mman.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usr/include/sys/mman.h b/usr/include/sys/mman.h +index 56f0b65c..3fd626e7 100644 +--- a/usr/include/sys/mman.h ++++ b/usr/include/sys/mman.h +@@ -7,7 +7,7 @@ + + #include <klibc/extern.h> + #include <sys/types.h> +-#include <asm/mman.h> ++#include <linux/mman.h> + + #define MAP_FAILED ((void *)-1) + +-- +2.23.0 +
meta-initramfs/recipes-devtools/klibc/klibc.inc +1 -0
@@ -23,6 +23,7 @@ SRC_URI = "git://git.kernel.org/pub/scm/libs/klibc/klibc.git \ file://0001-klibc-add-getrandom-syscall.patch \ file://0001-klibc-Kbuild-Accept-EXTRA_KLIBCAFLAGS.patch \ file://0001-Define-ulocked_-fgets-fread-fwrite-aliases.patch \ + file://0001-Fix-missing-include-in-sys-mman.h.patch \ " ARMPATCHES ?= ""
Signature · 1 line
2.7.4
Re: [warrior-next 06/10] klibc: Fix build with 5.2+ kernel headers
This and the other 3 "fix build with 5.2 headers" patches are all for userspace code that uses the UAPI kernel headers that won't change in warrior, so these 4 commits are not needed.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedPATCH 7/10 bpftool.bb: Disable SECURITY_CFLAGS
In reply to Armin KusterFrom: Khem Raj <[email protected]>
We do not pass CFLAGS to build and fortify sources needs some optimization to be enabled, its better to reset the additional flags and let the build system add them as it needs
Fixes build failures liketools/include/tools/libc_compat.h:11:21: error: static declaration of 'reallocarray' follows non-static declaration
| 11 | static inline void *reallocarray(void *ptr, size_t nmemb, size_t size) | | ^~~~~~~~~~~~
--- meta-oe/recipes-kernel/bpftool/bpftool.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta-oe/recipes-kernel/bpftool/bpftool.bb +3 -1
@@ -10,7 +10,9 @@ inherit bash-completion kernelsrc kernel-arch do_populate_lic[depends] += "virtual/kernel:do_patch" -EXTRA_OEMAKE = "-C ${S}/tools/bpf/bpftool O=${B} CROSS=${TARGET_PREFIX} CC="${CC}" LD="${LD}" AR=${AR} ARCH=${ARCH}" +EXTRA_OEMAKE = "V=1 -C ${S}/tools/bpf/bpftool O=${B} CROSS=${TARGET_PREFIX} CC="${CC}" LD="${LD}" AR=${AR} ARCH=${ARCH}" + +SECURITY_CFLAGS = "" do_configure[depends] += "virtual/kernel:do_shared_workdir"
Signature · 1 line
2.7.4
PATCH 8/10 linux-atm: Fix build with kernel headers 5.2+
In reply to Armin KusterFrom: Khem Raj <[email protected]>
--- ...mdump-Include-linux-sockios.h-for-SIOCGST.patch | 59 ++++++++++++++++++++++ .../recipes-support/linux-atm/linux-atm_2.5.2.bb | 1 + 2 files changed, 60 insertions(+) create mode 100644 meta-networking/recipes-support/linux-atm/linux-atm/0001-saaldump-atmdump-Include-linux-sockios.h-for-SIOCGST.patch
meta-networking/recipes-support/linux-atm/linux-atm/0001-saaldump-atmdump-Include-linux-sockios.h-for-SIOCGST.patch new file +59 -0
@@ -0,0 +1,59 @@ +From 4456e13880803a300e4b6f263ad22a37481b5df5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 29 Aug 2019 09:33:43 -0700 +Subject: [PATCH] saaldump,atmdump: Include linux/sockios.h for SIOCGSTAMP + +In linux kernel commit 0768e17073dc527ccd18ed5f96ce85f9985e9115 +the asm-generic/sockios.h header no longer defines SIOCGSTAMP. +Instead it provides only SIOCGSTAMP_OLD. + +The linux/sockios.h header now defines SIOCGSTAMP using either +SIOCGSTAMP_OLD or SIOCGSTAMP_NEW as appropriate. This linux only +header file is not pulled so we get a build failure. + +Fixes +../../../linux-atm-2.5.2/src/maint/atmdump.c:142:18: error: use of undeclared identifier 'SIOCGSTAMP' + if (ioctl(s,SIOCGSTAMP,&stamp) < 0) { + ^ +1 error generated. +make[3]: *** [Makefile:623: atmdump.o] Error 1 +make[3]: *** Waiting for unfinished jobs.... +../../../linux-atm-2.5.2/src/maint/saaldump.c:169:14: error: use of undeclared identifier 'SIOCGSTAMP' + if (ioctl(s,SIOCGSTAMP,&stamp) < 0) { + ^ +Upstream-Status: Pending +Signed-off-by: Khem Raj <[email protected]> +--- + src/maint/atmdump.c | 2 +- + src/maint/saaldump.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/maint/atmdump.c b/src/maint/atmdump.c +index 8b17826..9e4853b 100644 +--- a/src/maint/atmdump.c ++++ b/src/maint/atmdump.c +@@ -5,7 +5,7 @@ + #if HAVE_CONFIG_H + #include <config.h> + #endif +- ++#include <linux/sockios.h> + #include <stdlib.h> + #include <stdio.h> + #include <unistd.h> +diff --git a/src/maint/saaldump.c b/src/maint/saaldump.c +index 83bdde9..69429a8 100644 +--- a/src/maint/saaldump.c ++++ b/src/maint/saaldump.c +@@ -5,7 +5,7 @@ + #if HAVE_CONFIG_H + #include <config.h> + #endif +- ++#include <linux/sockios.h> + #include <stdlib.h> + #include <stdarg.h> + #include <stdio.h> +-- +2.23.0 +
meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb +1 -0
@@ -12,6 +12,7 @@ SRC_URI = "http://nchc.dl.sourceforge.net/project/${BPN}/${BPN}/${PV}/${BPN}-${P file://0001-ttcp-Add-printf-format-string.patch \ file://0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch \ file://0001-IFNAMSIZ-is-defined-in-net-if.h.patch \ + file://0001-saaldump-atmdump-Include-linux-sockios.h-for-SIOCGST.patch \ " SRC_URI_append_libc-musl = " file://musl-no-on_exit.patch"
Signature · 1 line
2.7.4
PATCH 9/10 can-utils: Fix build with kernel headers >= 5.2
In reply to Armin KusterFrom: Khem Raj <[email protected]>
--- ...ude-to-find-SIOCGSTAMP-with-latest-kernel.patch | 106 +++++++++++++++++++++ .../recipes-extended/socketcan/can-utils_git.bb | 4 +- 2 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-extended/socketcan/can-utils/0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch
meta-oe/recipes-extended/socketcan/can-utils/0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch new file +106 -0
@@ -0,0 +1,106 @@ +From 20981c8a328747f823b7eef68d0c2812b3eaed30 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Sun, 14 Jul 2019 21:50:43 +0200 +Subject: [PATCH] fix include to find SIOCGSTAMP with latest kernel + +In linux kernel commit 0768e17073dc527ccd18ed5f96ce85f9985e9115 +the asm-generic/sockios.h header no longer defines SIOCGSTAMP. +Instead it provides only SIOCGSTAMP_OLD. + +The linux/sockios.h header now defines SIOCGSTAMP using either +SIOCGSTAMP_OLD or SIOCGSTAMP_NEW as appropriate. This linux only +header file is not pulled so we get a build failure. + +canlogserver.c: In function 'main': +canlogserver.c:404:21: error: 'SIOCGSTAMP' undeclared (first use in this function); did you mean 'SIOCGRARP'? + if (ioctl(s[i], SIOCGSTAMP, &tv) < 0) + ^~~~~~~~~~ + SIOCGRARP +canlogserver.c:404:21: note: each undeclared identifier is reported only once for each function it appears in + +Fixes: + - http://autobuild.buildroot.org/results/363de7d9bf433be8bc47ba4ee52ae0bb80fa9021 + +Upstream-Status: Backport [https://github.com/linux-can/can-utils/commit/e9590b1ca75d360eaf3211bebd86058214d48064] +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + canlogserver.c | 1 + + cansniffer.c | 1 + + isotpdump.c | 1 + + isotpperf.c | 1 + + isotpsniffer.c | 1 + + slcanpty.c | 1 + + 6 files changed, 6 insertions(+) + +diff --git a/canlogserver.c b/canlogserver.c +index e3350b7..f53165c 100644 +--- a/canlogserver.c ++++ b/canlogserver.c +@@ -61,6 +61,7 @@ + + #include <linux/can.h> + #include <linux/can/raw.h> ++#include <linux/sockios.h> + #include <signal.h> + #include <errno.h> + +diff --git a/cansniffer.c b/cansniffer.c +index 7b0a3fa..bf7d72e 100644 +--- a/cansniffer.c ++++ b/cansniffer.c +@@ -61,6 +61,7 @@ + + #include <linux/can.h> + #include <linux/can/bcm.h> ++#include <linux/sockios.h> + + #include "terminal.h" + +diff --git a/isotpdump.c b/isotpdump.c +index b2b650a..36d8af3 100644 +--- a/isotpdump.c ++++ b/isotpdump.c +@@ -55,6 +55,7 @@ + + #include <linux/can.h> + #include <linux/can/raw.h> ++#include <linux/sockios.h> + #include "terminal.h" + + #define NO_CAN_ID 0xFFFFFFFFU +diff --git a/isotpperf.c b/isotpperf.c +index db3a2b7..5852a57 100644 +--- a/isotpperf.c ++++ b/isotpperf.c +@@ -56,6 +56,7 @@ + + #include <linux/can.h> + #include <linux/can/raw.h> ++#include <linux/sockios.h> + + #define NO_CAN_ID 0xFFFFFFFFU + #define PERCENTRES 2 /* resolution in percent for bargraph */ +diff --git a/isotpsniffer.c b/isotpsniffer.c +index f42e18b..d7a4c66 100644 +--- a/isotpsniffer.c ++++ b/isotpsniffer.c +@@ -55,6 +55,7 @@ + + #include <linux/can.h> + #include <linux/can/isotp.h> ++#include <linux/sockios.h> + #include "terminal.h" + + #define NO_CAN_ID 0xFFFFFFFFU +diff --git a/slcanpty.c b/slcanpty.c +index 431ca68..7dfaf5c 100644 +--- a/slcanpty.c ++++ b/slcanpty.c +@@ -40,6 +40,7 @@ + + #include <linux/can.h> + #include <linux/can/raw.h> ++#include <linux/sockios.h> + + /* maximum rx buffer len: extended CAN frame with timestamp */ + #define SLC_MTU (sizeof("T1111222281122334455667788EA5F\r")+1)
meta-oe/recipes-extended/socketcan/can-utils_git.bb +3 -1
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://include/linux/can.h;endline=43;md5=390a2c9a3c5e3595a0 DEPENDS = "libsocketcan" -SRC_URI = "git://github.com/linux-can/${BPN}.git;protocol=git;branch=master" +SRC_URI = "git://github.com/linux-can/${BPN}.git;protocol=git;branch=master \ + file://0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch \ + " SRCREV = "4c8fb05cb4d6ddcd67299008db54af423f86fd05" PV = "0.0+gitr${SRCPV}"
Signature · 1 line
2.7.4
PATCH 10/10 dnsmasq: fix build against 5.2 headers
In reply to Armin KusterFrom: Bruce Ashfield <[email protected]>
Upstream linux y2038 work has moved some definitions SIOCGSTAMP is defined in linux/sockios.h, not asm/sockios.h now. So we need to add that include to fix the build.
Upstream-status: backport of http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=3052ce208acf602f0163166dcefb7330d537cedb
--- ...001-dnsmasq-fix-build-against-5.2-headers.patch | 31 ++++++++++++++++++++++ .../recipes-support/dnsmasq/dnsmasq_2.80.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta-networking/recipes-support/dnsmasq/dnsmasq/0001-dnsmasq-fix-build-against-5.2-headers.patch
meta-networking/recipes-support/dnsmasq/dnsmasq/0001-dnsmasq-fix-build-against-5.2-headers.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 52f4b58c14a2788ca08b7d8884d586724d86fc66 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield <[email protected]> +Date: Mon, 19 Aug 2019 14:46:02 +0000 +Subject: [PATCH] dnsmasq: fix build against 5.2 headers + +Upstream linux y2038 work has moved some definitions SIOCGSTAMP is +defined in linux/sockios.h, not asm/sockios.h now. So we need to +add that include to fix the build. + +Upstream-status: backport of http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=3052ce208acf602f0163166dcefb7330d537cedb + +Signed-off-by: Bruce Ashfield <[email protected]> +--- + a/src/dnsmasq.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/build/tmp/work/core2-64-poky-linux/dnsmasq/2.80-r0/dnsmasq-2.80/src/dnsmasq.h b/build/tmp/work/core2-64-poky-linux/dnsmasq/2.80-r0/dnsmasq-2.80/src/dnsmasq.h +index f53e9a5be6..d9225ea473 100644 +--- a/src/dnsmasq.h ++++ b/src/dnsmasq.h +@@ -138,6 +138,7 @@ typedef unsigned long long u64; + #endif + + #if defined(HAVE_LINUX_NETWORK) ++#include <linux/sockios.h> + #include <linux/capability.h> + /* There doesn't seem to be a universally-available + userspace header for these. */ +-- +2.19.1 +
meta-networking/recipes-support/dnsmasq/dnsmasq_2.80.bb +1 -0
@@ -4,5 +4,6 @@ SRC_URI[dnsmasq-2.80.md5sum] = "1f071fd11454e1cffea73bdadcf70b21" SRC_URI[dnsmasq-2.80.sha256sum] = "9e4a58f816ce0033ce383c549b7d4058ad9b823968d352d2b76614f83ea39adc" SRC_URI += "\ file://lua.patch \ + file://0001-dnsmasq-fix-build-against-5.2-headers.patch \ "
Signature · 1 line
2.7.4