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] [day] [month] [year] [list]
Message-ID: <20101025065041.GB4040@elte.hu>
Date:	Mon, 25 Oct 2010 08:50:41 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Jaswinder Singh <jaswinder@...radead.org>
Cc:	Robert Richter <robert.richter@....com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] apic, x86: Need to set offset before using it


* Jaswinder Singh <jaswinder@...radead.org> wrote:

> Fix the issue pointed by Stephen.
>  
> Stephen Rothwell wrote :
> In building Linus' tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
> 
> arch/x86/oprofile/op_model_amd.c: In function 'ibs_eilvt_valid':
> arch/x86/oprofile/op_model_amd.c:289: warning: 'offset' may be used uninitialized in this function
> 
> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@...il.com>
> Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
> Cc: Robert Richter <robert.richter@....com>
> Cc: Ingo Molnar <mingo@...e.hu>
> ---
>  arch/x86/oprofile/op_model_amd.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c
> index 42fb46f..c65a924 100644
> --- a/arch/x86/oprofile/op_model_amd.c
> +++ b/arch/x86/oprofile/op_model_amd.c
> @@ -285,6 +285,7 @@ static inline int ibs_eilvt_valid(void)
>  	int offset;
>  
>  	rdmsrl(MSR_AMD64_IBSCTL, val);
> +	offset = val & IBSCTL_LVT_OFFSET_MASK;
>  	if (!(val & IBSCTL_LVT_OFFSET_VALID)) {
>  		pr_err(FW_BUG "cpu %d, invalid IBS "
>  		       "interrupt offset %d (MSR%08X=0x%016llx)",
> @@ -293,8 +294,6 @@ static inline int ibs_eilvt_valid(void)
>  		return 0;
>  	}
>  
> -	offset = val & IBSCTL_LVT_OFFSET_MASK;
> -
>  	if (eilvt_is_available(offset))
>  		return !0;

I queued up a different fix, one which also address some of the structural details 
in this function.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ