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: <CAJZ5v0hG2FL0VSeE+ind9MSMc_c7nA4KjKxFPdMhVOPrMdYJKQ@mail.gmail.com>
Date:   Wed, 24 Jun 2020 15:41:05 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Jacob Pan <jacob.jun.pan@...ux.intel.com>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Len Brown <lenb@...nel.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org, Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] intel_idle: Fix uninitialized variable bug

On Wed, Jun 24, 2020 at 3:19 PM Dan Carpenter <dan.carpenter@...cle.com> wrote:
>
> The "tick" variable isn't initialized if "lapic_timer_always_reliable"
> is true.

If lapic_timer_always_reliable is true, then
static_cpu_has(X86_FEATURE_ARAT) must also be true AFAICS.

So the lapic_timer_always_reliable check in there looks redundant.

> Fixes: 40ab82e08d78 ("intel_idle: Simplify LAPIC timer reliability checks")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
>  drivers/idle/intel_idle.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> index aae53e650638..6c9152f303a6 100644
> --- a/drivers/idle/intel_idle.c
> +++ b/drivers/idle/intel_idle.c
> @@ -132,7 +132,7 @@ static __cpuidle int intel_idle(struct cpuidle_device *dev,
>         struct cpuidle_state *state = &drv->states[index];
>         unsigned long eax = flg2MWAIT(state->flags);
>         unsigned long ecx = 1; /* break on interrupt flag */
> -       bool tick;
> +       bool tick = false;
>         int cpu = smp_processor_id();
>
>         /*
> --

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ