Re: [PATCH V3 02/17] kallsyms, x86: Export addresses of syscall trampolines

From: Andi Kleen
Date: Tue Jun 05 2018 - 12:00:51 EST


> +#ifdef CONFIG_X86_64
> +int arch_get_kallsym(unsigned int symnum, unsigned long *value, char *type,
> + char *name)
> +{
> + unsigned int cpu, ncpu;
> +
> + if (symnum >= num_possible_cpus())
> + return -EINVAL;
> +
> + for (cpu = cpumask_first(cpu_possible_mask), ncpu = 0;
> + cpu < num_possible_cpus() && ncpu < symnum;
> + cpu = cpumask_next(cpu, cpu_possible_mask), ncpu++)
> + ;

That is max_t(unsigned, cpumask_last(cpu_possible_mask), symnum)

Rest and other kernel patches look good to me

Acked-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>

-Andi