lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 8 Jul 2021 10:33:40 +0100
From:   Mark Rutland <mark.rutland@....com>
To:     Carlos Bilbao <bilbao@...edu>
Cc:     catalin.marinas@....com, will@...nel.org, maz@...nel.org,
        linux-arm-kernel@...s.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm64: Add missing header <asm/smp.h> in two files

On Wed, Jul 07, 2021 at 01:54:13PM -0400, Carlos Bilbao wrote:
> Add missing header <asm/smp.h> on include/asm/smp_plat.h, as it calls function
> cpu_logical_map(). Also include it on kernel/cpufeature.c since it has calls to
> functions cpu_panic_kernel() and cpu_die_early().
>  
> Both files call functions defined on this header, make the header dependencies 
> less fragile.
> 
> Signed-off-by: Carlos Bilbao <bilbao@...edu>

Per our usual rules, we should include a header if we directly use a
something defined in that header, so this makes sense to me.

I have a couple of minor comments below; with those fixed up:

Acked-by: Mark Rutland <mark.rutland@....com>

> ---
>  arch/arm64/include/asm/smp_plat.h | 1 +
>  arch/arm64/kernel/cpufeature.c    | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/include/asm/smp_plat.h b/arch/arm64/include/asm/smp_plat.h
> index 99ad77df8f52..140c7a03a901 100644
> --- a/arch/arm64/include/asm/smp_plat.h
> +++ b/arch/arm64/include/asm/smp_plat.h
> @@ -11,6 +11,7 @@
>  #include <linux/cpumask.h>
>  
>  #include <asm/types.h>
> +#include <asm/smp.h>

We try to keep the includes in alphabetical order; could you please make
this:

| #include <asm/smp.h>
| #include <asm/types.h>

>  struct mpidr_hash {
>         u64     mask;
> diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
> index 125d5c9471ac..350d8601ff28 100644
> --- a/arch/arm64/kernel/cpufeature.c
> +++ b/arch/arm64/kernel/cpufeature.c
> @@ -84,6 +84,7 @@
>  #include <asm/sysreg.h>
>  #include <asm/traps.h>
>  #include <asm/virt.h>
> +#include <asm/smp.h>

Similarly, here:

| #include <asm/smp.h>
| #include <asm/sysreg.h>
| #include <asm/traps.h>
| #include <asm/virt.h>

(I checked the file, and immediately before <asm/sysreg.h> we include
<asm/processor.h>).

Thanks,
Mark.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ