Re: [PATCH v2 16/19] objtool: Implement noinstr validation

From: Peter Zijlstra
Date: Wed Mar 18 2020 - 09:22:07 EST


On Tue, Mar 17, 2020 at 06:02:50PM +0100, Peter Zijlstra wrote:
> +static int validate_vmlinux_functions(struct objtool_file *file)
> +{
> + struct section *sec;
> +
> + sec = find_section_by_name(file->elf, ".noinstr.text");
> + if (!sec) {
> + WARN("No .noinstr.text section");
> + return -1;

And that is a little too agressive, seeing how the current x86_64 kernel
does not include it. I made it a silent exit for now, so as not to break
the build (with patch 20/19 added on).

> }
>
> + return validate_sec_functions(file, sec);
> +}