diff --git a/0014-add-secure-compile-option-fstack.patch b/0014-add-secure-compile-option-fstack.patch new file mode 100644 index 0000000000000000000000000000000000000000..be18dd6b402fff82cc9edb08ff9c2ddea7b25cf6 --- /dev/null +++ b/0014-add-secure-compile-option-fstack.patch @@ -0,0 +1,52 @@ +diff -Nur dpdk-19.11/drivers/net/mlx4/Makefile dpdk-19.11-new/drivers/net/mlx4/Makefile +--- dpdk-19.11/drivers/net/mlx4/Makefile 2020-02-24 18:59:55.000000000 +0800 ++++ dpdk-19.11-new/drivers/net/mlx4/Makefile 2021-05-26 13:33:36.758776651 +0800 +@@ -32,6 +32,7 @@ + # Basic CFLAGS. + CFLAGS += -O3 + CFLAGS += -std=c11 -Wall -Wextra ++CFLAGS += -fstack-protector-strong + CFLAGS += -g + CFLAGS += -I. + CFLAGS += -D_BSD_SOURCE +diff -Nur dpdk-19.11/drivers/net/mlx5/Makefile dpdk-19.11-new/drivers/net/mlx5/Makefile +--- dpdk-19.11/drivers/net/mlx5/Makefile 2020-02-24 18:59:55.000000000 +0800 ++++ dpdk-19.11-new/drivers/net/mlx5/Makefile 2021-05-26 13:30:10.237676396 +0800 +@@ -47,6 +47,7 @@ + # Basic CFLAGS. + CFLAGS += -O3 + CFLAGS += -std=c11 -Wall -Wextra ++CFLAGS += -fstack-protector-strong + CFLAGS += -g + CFLAGS += -I. + CFLAGS += -D_BSD_SOURCE +diff -Nur dpdk-19.11/mk/exec-env/linux/rte.vars.mk dpdk-19.11-new/mk/exec-env/linux/rte.vars.mk +--- dpdk-19.11/mk/exec-env/linux/rte.vars.mk 2020-02-24 18:59:55.000000000 +0800 ++++ dpdk-19.11-new/mk/exec-env/linux/rte.vars.mk 2021-05-26 13:54:01.525107672 +0800 +@@ -12,9 +12,9 @@ + # examples for RTE_EXEC_ENV: linux, freebsd + # + ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) +-EXECENV_CFLAGS = -pthread -fPIC ++EXECENV_CFLAGS = -pthread -fPIC -fstack-protector-strong + else +-EXECENV_CFLAGS = -pthread ++EXECENV_CFLAGS = -pthread -fstack-protector-strong + endif + + # include in every library to build +diff -Nur dpdk-19.11/mk/exec-env/linuxapp/rte.vars.mk dpdk-19.11-new/mk/exec-env/linuxapp/rte.vars.mk +--- dpdk-19.11/mk/exec-env/linuxapp/rte.vars.mk 2020-02-24 18:59:55.000000000 +0800 ++++ dpdk-19.11-new/mk/exec-env/linuxapp/rte.vars.mk 2021-05-26 13:54:01.525107672 +0800 +@@ -12,9 +12,9 @@ + # examples for RTE_EXEC_ENV: linux, freebsd + # + ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) +-EXECENV_CFLAGS = -pthread -fPIC ++EXECENV_CFLAGS = -pthread -fPIC -fstack-protector-strong + else +-EXECENV_CFLAGS = -pthread ++EXECENV_CFLAGS = -pthread -fstack-protector-strong + endif + + # include in every library to build diff --git a/dpdk.spec b/dpdk.spec index 0443e4f9921abe10f8de1c7da3492b85f453f841..d3b59e17ad65cb6c7512b592e3c538ae3dca2ec3 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -1,6 +1,6 @@ Name: dpdk Version: 19.11 -Release: 10 +Release: 11 Packager: packaging@6wind.com URL: http://dpdk.org %global source_version 19.11 @@ -40,6 +40,7 @@ Patch30: 0010-dpdk-fix-error-in-clearing-secondary-process-memseg-lists.patch Patch31: 0011-dpdk-fix-coredump-when-primary-process-attach-without-shared-file.patch Patch32: 0012-dpdk-fix-fbarray-memseg-destory-error-during-detach.patch Patch33: 0013-dpdk-optimize-the-efficiency-of-compiling-dpdk.patch +Patch34: 0014-add-secure-compile-option-fstack.patch Summary: Data Plane Development Kit core Group: System Environment/Libraries @@ -128,6 +129,7 @@ This package contains the pdump tool for capture the dpdk network packets. %patch9 -p1 %patch10 -p1 %patch33 -p1 +%patch34 -p1 %build namer=%{kern_devel_ver} @@ -222,6 +224,9 @@ strip -g $RPM_BUILD_ROOT/lib/modules/${namer}/extra/dpdk/rte_kni.ko /usr/sbin/depmod %changelog +* Wed May 26 2021 zhangyao - 19.11-11 +- add sp + * Mon May 24 2021 renmingshuai - 19.11-10 - optimize the efficiency of compiling dpdk