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

From: Catalin Marinas
Date: Tue Jan 14 2020 - 12:33:44 EST


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@xxxxxxx>