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: <20190409020454.GA7133@ranerica-svr.sc.intel.com>
Date:   Mon, 8 Apr 2019 19:04:54 -0700
From:   Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...e.de>,
        Ashok Raj <ashok.raj@...el.com>,
        Andi Kleen <andi.kleen@...el.com>,
        Peter Zijlstra <peterz@...radead.org>,
        "Ravi V. Shankar" <ravi.v.shankar@...el.com>, x86@...nel.org,
        linux-kernel@...r.kernel.org,
        Ricardo Neri <ricardo.neri@...el.com>,
        "H. Peter Anvin" <hpa@...or.com>, Tony Luck <tony.luck@...el.com>,
        Clemens Ladisch <clemens@...isch.de>,
        Arnd Bergmann <arnd@...db.de>,
        Philippe Ombredanne <pombredanne@...b.com>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>
Subject: Re: [RFC PATCH v2 06/14] x86/hpet: Configure the timer used by the
 hardlockup detector

On Tue, Mar 26, 2019 at 10:13:06PM +0100, Thomas Gleixner wrote:
> On Wed, 27 Feb 2019, Ricardo Neri wrote:
> > +#ifdef CONFIG_X86_HARDLOCKUP_DETECTOR_HPET
> > +struct hpet_hld_data *hpet_hardlockup_detector_assign_timer(void)
> > +{
> > +	struct hpet_hld_data *hdata;
> > +	unsigned int cfg;
> > +
> > +	cfg = hpet_readl(HPET_Tn_CFG(HPET_WD_TIMER_NR));
> > +
> > +	if (!(cfg & HPET_TN_FSB_CAP))
> > +		return NULL;
> > +
> > +	hdata = kzalloc(sizeof(*hdata), GFP_KERNEL);
> > +	if (!hdata)
> > +		return NULL;
> > +
> > +	hdata->flags = HPET_DEV_FSB_CAP;
> 
> Pointless.

Agreed. Only if the timer is FSB-capable is hdata is initialized.
> 
> > +
> > +	if (cfg & HPET_TN_PERIODIC_CAP)
> > +		hdata->flags |= HPET_DEV_PERI_CAP;
> 
> This can be expressed by a simple:
> 
>      hdata->has_periodic = 1;
> 
> And no flag shuffling required at all.

Sure. I'll implement this change.

Thanks and BR,
Ricardo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ