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: <20180213215956.GC22295@anatevka.americas.hpqcorp.net>
Date:   Tue, 13 Feb 2018 14:59:56 -0700
From:   Jerry Hoemann <jerry.hoemann@....com>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     wim@...ux-watchdog.org, linux-watchdog@...r.kernel.org,
        linux-kernel@...r.kernel.org, rwright@....com,
        maurice.a.saldivar@....com
Subject: Re: [PATCH v2 03/11] watchdog/hpwdt: Update nmi_panic message.

On Tue, Feb 13, 2018 at 09:41:35AM -0800, Guenter Roeck wrote:
> On Sun, Feb 11, 2018 at 10:21:03PM -0700, Jerry Hoemann wrote:
> > +	unsigned int mynmi = hpwdt_my_nmi();
> > +	static char panic_msg[] =
> > +		"00: An NMI occurred. Depending on your system the reason "
> > +		"for the NMI is logged in any one of the following resources:\n"
> > +		"1. Integrated Management Log (IML)\n"
> > +		"2. OA Syslog\n"
> > +		"3. OA Forward Progress Log\n"
> > +		"4. iLO Event Log";
> > +
> > +	if ((ulReason == NMI_UNKNOWN) && !mynmi)
> >  		return NMI_DONE;
> >  
> >  	if (allow_kdump)
> >  		hpwdt_stop();
> >  
> > -	nmi_panic(regs, "An NMI occurred. Depending on your system the reason "
> > -		"for the NMI is logged in any one of the following "
> > -		"resources:\n"
> > -		"1. Integrated Management Log (IML)\n"
> > -		"2. OA Syslog\n"
> > -		"3. OA Forward Progress Log\n"
> > -		"4. iLO Event Log");
> > +	panic_msg[0] = hexdigit((mynmi>>4)&0xf);
> > +	panic_msg[1] = hexdigit(mynmi&0xf);
> 
> No need to reinvent the wheel.
> 
> 	panic_msg[0] = hex_asc_hi(mynmi);
> 	panic_msg[1] = hex_asc_lo(mynmi);
> 
> or even better
> 	hex_byte_pack(panic_msg, mynmi);
> 
> There are matching _upper functions if you prefer A..F instead of a..f.
> 
> Guenter

Will do. thanks

-- 

-----------------------------------------------------------------------------
Jerry Hoemann                  Software Engineer   Hewlett Packard Enterprise
-----------------------------------------------------------------------------

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ