[kernel-hardening] Re: [PATCH v8 1/4] x86/KASLR: Clarify identity map interface

Ingo Molnar
2016-05-11T06:24:42Z

* Kees Cook <keescook@chromium.org> wrote:

> +/*
> + * Mapping information structure passed to kernel_ident_mapping_init().
> + * Due to relocation, pointers must be assigned at run time not build time.
> + */
> +static struct x86_mapping_info mapping_info = {
> + .pmd_flag = __PAGE_KERNEL_LARGE_EXEC,
> +};

> +void initialize_identity_maps(void)
> {
> + /* Init mapping_info with run-time function/buffer pointers. */
> + mapping_info.alloc_pgt_page = alloc_pgt_page;
> + mapping_info.context = &pgt_data;

Could you please outline the precise failure mode? What gets executed when, which
pointer gets relocated and which not, and exactly when does it pose a problem,
etc.

Thanks,

Ingo