From: "Luck, Tony" <tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Vishal Verma <vishal.l.verma-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org"
<linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org>
Subject: Re: [PATCH] acpi, nfit: fix the memory error check in nfit_handle_mce
Date: Fri, 21 Apr 2017 13:50:50 -0700 [thread overview]
Message-ID: <20170421205050.GA17595@intel.com> (raw)
In-Reply-To: <20170421203551.GC10645-PxNA6LsHknajYZd8rzuJLNh3ngVCH38I@public.gmane.org>
On Fri, Apr 21, 2017 at 02:35:51PM -0600, Vishal Verma wrote:
> On 04/21, Luck, Tony wrote:
> > Needs extra parentheses to make it right. Vishal, sorry I led you astray.
> >
> > if (!((mce->status & 0xef80) == BIT(7)))
>
> Is this still right though? Anything AND'ed with 0xef80 will never equal
> BIT(7) which is simply 01000000 binary (the lowest byte of the left hand
> side is '0')
I think so ... here it is in binary
ef80 = 1110 1111 1000 0000
BIT7 = 0000 0000 1000 0000
so the "&" will zap bits {6:0} and bit {12} [and everything not part
of the MCACOD field].
If mce->status had some bit above BIT(7) set, it won't be zapped, so we
won't match the exact value BIT(7).
-Tony
WARNING: multiple messages have this Message-ID (diff)
From: "Luck, Tony" <tony.luck@intel.com>
To: Vishal Verma <vishal.l.verma@intel.com>
Cc: "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: Re: [PATCH] acpi, nfit: fix the memory error check in nfit_handle_mce
Date: Fri, 21 Apr 2017 13:50:50 -0700 [thread overview]
Message-ID: <20170421205050.GA17595@intel.com> (raw)
In-Reply-To: <20170421203551.GC10645@omniknight.lm.intel.com>
On Fri, Apr 21, 2017 at 02:35:51PM -0600, Vishal Verma wrote:
> On 04/21, Luck, Tony wrote:
> > Needs extra parentheses to make it right. Vishal, sorry I led you astray.
> >
> > if (!((mce->status & 0xef80) == BIT(7)))
>
> Is this still right though? Anything AND'ed with 0xef80 will never equal
> BIT(7) which is simply 01000000 binary (the lowest byte of the left hand
> side is '0')
I think so ... here it is in binary
ef80 = 1110 1111 1000 0000
BIT7 = 0000 0000 1000 0000
so the "&" will zap bits {6:0} and bit {12} [and everything not part
of the MCACOD field].
If mce->status had some bit above BIT(7) set, it won't be zapped, so we
won't match the exact value BIT(7).
-Tony
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
WARNING: multiple messages have this Message-ID (diff)
From: "Luck, Tony" <tony.luck@intel.com>
To: Vishal Verma <vishal.l.verma@intel.com>
Cc: "Williams, Dan J" <dan.j.williams@intel.com>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH] acpi, nfit: fix the memory error check in nfit_handle_mce
Date: Fri, 21 Apr 2017 13:50:50 -0700 [thread overview]
Message-ID: <20170421205050.GA17595@intel.com> (raw)
In-Reply-To: <20170421203551.GC10645@omniknight.lm.intel.com>
On Fri, Apr 21, 2017 at 02:35:51PM -0600, Vishal Verma wrote:
> On 04/21, Luck, Tony wrote:
> > Needs extra parentheses to make it right. Vishal, sorry I led you astray.
> >
> > if (!((mce->status & 0xef80) == BIT(7)))
>
> Is this still right though? Anything AND'ed with 0xef80 will never equal
> BIT(7) which is simply 01000000 binary (the lowest byte of the left hand
> side is '0')
I think so ... here it is in binary
ef80 = 1110 1111 1000 0000
BIT7 = 0000 0000 1000 0000
so the "&" will zap bits {6:0} and bit {12} [and everything not part
of the MCACOD field].
If mce->status had some bit above BIT(7) set, it won't be zapped, so we
won't match the exact value BIT(7).
-Tony
next prev parent reply other threads:[~2017-04-21 20:50 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-20 22:18 [PATCH] acpi, nfit: fix the memory error check in nfit_handle_mce Vishal Verma
2017-04-20 22:18 ` Vishal Verma
2017-04-20 22:18 ` Vishal Verma
2017-04-20 22:21 ` Verma, Vishal L
2017-04-20 22:21 ` Verma, Vishal L
[not found] ` <20170420221818.23522-1-vishal.l.verma-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-04-21 2:21 ` kbuild test robot
2017-04-21 2:21 ` kbuild test robot
2017-04-21 2:21 ` kbuild test robot
2017-04-21 19:21 ` Dan Williams
2017-04-21 19:21 ` Dan Williams
[not found] ` <CAPcyv4ijU2V-4WOPysL12ByOovAXDO=Mci1D4wNDFqxRjdvT2w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-21 19:56 ` Verma, Vishal L
2017-04-21 19:56 ` Verma, Vishal L
2017-04-21 19:56 ` Verma, Vishal L
[not found] ` <1492804517.2738.25.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-04-21 20:16 ` Luck, Tony
2017-04-21 20:16 ` Luck, Tony
2017-04-21 20:16 ` Luck, Tony
2017-04-21 20:19 ` Dan Williams
2017-04-21 20:19 ` Dan Williams
2017-04-21 20:27 ` Luck, Tony
2017-04-21 20:27 ` Luck, Tony
[not found] ` <20170421202741.GA16423-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-04-21 21:07 ` Borislav Petkov
2017-04-21 21:07 ` Borislav Petkov
2017-04-21 21:07 ` Borislav Petkov
2017-04-24 11:36 ` [PATCH 1/2] x86/MCE: Export memory_error() Borislav Petkov
2017-04-24 11:36 ` Borislav Petkov
2017-04-25 21:07 ` Vishal Verma
2017-04-25 21:07 ` Vishal Verma
[not found] ` <20170425210740.GA15722-PxNA6LsHknajYZd8rzuJLNh3ngVCH38I@public.gmane.org>
2017-05-10 19:31 ` Verma, Vishal L
2017-05-10 19:31 ` Verma, Vishal L
2017-05-10 19:31 ` Verma, Vishal L
2017-05-10 20:04 ` Borislav Petkov
2017-05-10 20:04 ` Borislav Petkov
2017-05-10 20:06 ` Verma, Vishal L
2017-05-10 20:06 ` Verma, Vishal L
2017-05-10 20:08 ` Borislav Petkov
2017-05-10 20:08 ` Borislav Petkov
2017-05-10 21:12 ` Verma, Vishal L
2017-05-10 21:12 ` Verma, Vishal L
2017-05-10 21:57 ` Borislav Petkov
2017-05-10 21:57 ` Borislav Petkov
2017-05-10 22:03 ` Verma, Vishal L
2017-05-10 22:03 ` Verma, Vishal L
[not found] ` <1494453738.20330.8.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-05-10 22:16 ` Borislav Petkov
2017-05-10 22:16 ` Borislav Petkov
2017-05-10 22:16 ` Borislav Petkov
2017-05-10 22:22 ` Verma, Vishal L
2017-05-10 22:22 ` Verma, Vishal L
[not found] ` <1494454869.20330.9.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-05-17 12:38 ` Borislav Petkov
2017-05-17 12:38 ` Borislav Petkov
2017-05-17 12:38 ` Borislav Petkov
2017-05-17 18:58 ` Verma, Vishal L
2017-05-17 18:58 ` Verma, Vishal L
2017-05-17 19:20 ` Borislav Petkov
2017-05-17 19:20 ` Borislav Petkov
2017-04-24 11:37 ` [PATCH 2/2] x86/ras/mce_amd_inj: Preset MCE injection struct Borislav Petkov
2017-04-24 11:37 ` Borislav Petkov
2017-04-26 19:59 ` kbuild test robot
2017-04-26 19:59 ` kbuild test robot
2017-04-21 20:35 ` [PATCH] acpi, nfit: fix the memory error check in nfit_handle_mce Vishal Verma
2017-04-21 20:35 ` Vishal Verma
2017-04-21 20:35 ` Vishal Verma
[not found] ` <20170421203551.GC10645-PxNA6LsHknajYZd8rzuJLNh3ngVCH38I@public.gmane.org>
2017-04-21 20:50 ` Luck, Tony [this message]
2017-04-21 20:50 ` Luck, Tony
2017-04-21 20:50 ` Luck, Tony
2017-04-21 20:54 ` Vishal Verma
2017-04-21 20:54 ` Vishal Verma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170421205050.GA17595@intel.com \
--to=tony.luck-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org \
--cc=stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=vishal.l.verma-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.