lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180803014521.21527-1-ning.a.zhang@intel.com>
Date:   Fri,  3 Aug 2018 09:45:21 +0800
From:   Zhang Ning <ning.a.zhang@...el.com>
To:     gregkh@...uxfoundation.org, kstewart@...uxfoundation.org,
        pombredanne@...b.com, yamada.masahiro@...ionext.com,
        markus@...ppelsdorf.de, linux-kernel@...r.kernel.org
Cc:     Zhang Ning <ning.a.zhang@...el.com>, Li@...r.kernel.org,
        Ting <ting.li@...el.com>
Subject: [PATCH] firmware: make sure builtin firmware is page alignment

when firmware is in filesystem, request_firmware will load it,
and copy it to vmalloc memory, that is page align memory.

but when firmware is builtin, it is 8 bytes or 4 bytes alignment.

make sure builtin firmware is page algnment, that can simplify algorithm
to handle firmware.

Signed-off-by: Zhang Ning <ning.a.zhang@...el.com>
Signed-off-by: Li, Ting <ting.li@...el.com>
---
 firmware/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/firmware/Makefile b/firmware/Makefile
index 29641383e136..d7bfce56378f 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -16,10 +16,11 @@ quiet_cmd_fwbin = MK_FW   $@
 				firmware/%.gen.S,%,$@))))";		     \
 		  ASM_WORD=$(if $(CONFIG_64BIT),.quad,.long);		     \
 		  ASM_ALIGN=$(if $(CONFIG_64BIT),3,2);			     \
+		  ASM_FW_ALIGN=12;			  	   	     \
 		  PROGBITS=$(if $(CONFIG_ARM),%,@)progbits;		     \
 		  echo "/* Generated by firmware/Makefile */"		> $@;\
 		  echo "    .section .rodata"				>>$@;\
-		  echo "    .p2align $${ASM_ALIGN}"			>>$@;\
+		  echo "    .p2align $${ASM_FW_ALIGN}"			>>$@;\
 		  echo "_fw_$${FWSTR}_bin:"				>>$@;\
 		  echo "    .incbin \"$(2)\""				>>$@;\
 		  echo "_fw_end:"					>>$@;\
-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ