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]
Message-ID: <20181112052453.GA126795@gmail.com>
Date:   Mon, 12 Nov 2018 06:24:53 +0100
From:   Ingo Molnar <mingo@...nel.org>
To:     Borislav Petkov <bp@...e.de>
Cc:     hpa@...or.com, tglx@...utronix.de, wang.yi59@....com.cn,
        linux-kernel@...r.kernel.org, matz@...e.de,
        linux-tip-commits@...r.kernel.org
Subject: Re: [tip:ras/core] x86/mce: Fix -Wmissing-prototypes warnings


* Borislav Petkov <bp@...e.de> wrote:

> Fix an actual bug too which the warning triggered:
> 
>   arch/x86/kernel/cpu/mcheck/therm_throt.c:395:39: error: conflicting \
>   types for ‘smp_thermal_interrupt’
>    asmlinkage __visible void __irq_entry smp_thermal_interrupt(struct pt_regs *r)
>                                          ^~~~~~~~~~~~~~~~~~~~~

>   In file included from arch/x86/kernel/cpu/mcheck/therm_throt.c:29:
>   ./arch/x86/include/asm/traps.h:107:17: note: previous declaration of \
> 	  ‘smp_thermal_interrupt’ was here
>    asmlinkage void smp_thermal_interrupt(void);
> 
> Signed-off-by: Borislav Petkov <bp@...e.de>
> Cc: Yi Wang <wang.yi59@....com.cn>
> Cc: Michael Matz <matz@...e.de>
> Cc: x86@...nel.org
> Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1811081633160.1549@nanos.tec.linutronix.de
> ---
>  arch/x86/include/asm/traps.h             | 6 +++---
>  arch/x86/kernel/cpu/mcheck/mce_amd.c     | 5 +++--
>  arch/x86/kernel/cpu/mcheck/therm_throt.c | 1 +
>  arch/x86/kernel/cpu/mcheck/threshold.c   | 3 ++-
>  4 files changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h
> index 3de69330e6c5..9ea54a764a8e 100644
> --- a/arch/x86/include/asm/traps.h
> +++ b/arch/x86/include/asm/traps.h
> @@ -104,9 +104,9 @@ extern int panic_on_unrecovered_nmi;
>  
>  void math_emulate(struct math_emu_info *);
>  #ifndef CONFIG_X86_32
> -asmlinkage void smp_thermal_interrupt(void);
> -asmlinkage void smp_threshold_interrupt(void);
> -asmlinkage void smp_deferred_error_interrupt(void);
> +asmlinkage void smp_thermal_interrupt(struct pt_regs *);
> +asmlinkage void smp_threshold_interrupt(struct pt_regs *);
> +asmlinkage void smp_deferred_error_interrupt(struct pt_regs *);

Nit: please use full declarations in prototypes, i.e. 'struct pt_regs 
*regs' or so. Much of traps.h does this wrong so I guess this should be a 
separate cleanup patch.

> +asmlinkage __visible void __irq_entry smp_deferred_error_interrupt(struct pt_regs *r)

> +asmlinkage __visible void __irq_entry smp_threshold_interrupt(struct pt_regs *r)

Please use the canonical name, i.e. 'regs'.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ