Thread (28 messages) 28 messages, 2 authors, 2020-01-14

Re: [PATCH v4 06/12] arm64: elf: Enable BTI at exec based on ELF program properties

From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2020-01-14 17:33:44
Also in: linux-arch, lkml

On Wed, Dec 11, 2019 at 03:42:00PM +0000, Mark Brown wrote:
+static inline int arch_parse_elf_property(u32 type, const void *data,
+					  size_t datasz, bool compat,
+					  struct arch_elf_state *arch)
+{
+	/* No known properties for AArch32 yet */
+	if (IS_ENABLED(CONFIG_COMPAT) && compat)
+		return 0;
+
+	if (type == GNU_PROPERTY_AARCH64_FEATURE_1_AND) {
+		const u32 *p = data;
+
+		if (datasz != sizeof(*p))
+			return -EIO;
Is this -EIO or -ENOEXEC sounds better?

Apart from this, the patch looks fine.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help