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, 19 Aug 2021 23:05:57 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Reinette Chatre <reinette.chatre@...el.com>,
        Babu Moger <Babu.Moger@....com>
Cc:     "Chen, Rong A" <rong.a.chen@...el.com>,
        kernel test robot <lkp@...el.com>, x86-ml <x86@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [tip:x86/urgent] BUILD SUCCESS WITH WARNING
 064855a69003c24bd6b473b367d364e418c57625

On Thu, Aug 19, 2021 at 01:39:46PM -0700, Reinette Chatre wrote:
> I can confirm that the removed comment explains why m would be initialized
> when used in the code that follows.
> 
> How would you prefer to address this? We could add just the comment back in
> support of future reports or perhaps by adding the default case back with
> the same error that would be returned earlier when there is an invalid
> EVENT_ID. Something like:
> 
> ---8<---
> diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c
> b/arch/x86/kernel/cpu/resctrl/monitor.c
> index 57e4bb695ff9..05b99e4d621c 100644
> --- a/arch/x86/kernel/cpu/resctrl/monitor.c
> +++ b/arch/x86/kernel/cpu/resctrl/monitor.c
> @@ -304,6 +304,12 @@ static u64 __mon_event_count(u32 rmid, struct rmid_read
> *rr)
>  	case QOS_L3_MBM_LOCAL_EVENT_ID:
>  		m = &rr->d->mbm_local[rmid];
>  		break;
> +	default:
> +		/*
> +		 * Code would never reach here because
> +		 * an invalid event id would fail the __rmid_read.
> +		 */
> +		return RMID_VAL_ERROR;
>  	}
> 
>  	if (rr->first) {

Right, I would normally not take a patch just to fix a tool because it
cannot see it correctly.

But Babu has another use case which breaks the build so I guess that's
serious enough to make an exception.

Babu, can you please explain?

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ