Re: [PATCH 17/30] x86, kaiser: map debug IDT tables

From: Thomas Gleixner
Date: Mon Nov 20 2017 - 15:40:13 EST


On Fri, 10 Nov 2017, Dave Hansen wrote:
>
> +static int kaiser_user_map_ptr_early(const void *start_addr, unsigned long size,
> + unsigned long flags)
> +{
> + int ret = kaiser_add_user_map(start_addr, size, flags);
> + WARN_ON(ret);
> + return ret;

What's the point of the return value when it is ignored at the call site?

> +}
> +
> /*
> * Ensure that the top level of the (shadow) page tables are
> * entirely populated. This ensures that all processes that get
> @@ -374,6 +382,10 @@ void __init kaiser_init(void)
> sizeof(gate_desc) * NR_VECTORS,
> __PAGE_KERNEL_RO | _PAGE_GLOBAL);
>
> + kaiser_user_map_ptr_early(&debug_idt_table,
> + sizeof(gate_desc) * NR_VECTORS,
> + __PAGE_KERNEL | _PAGE_GLOBAL);
> +

Thanks,

tglx