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] [day] [month] [year] [list]
Message-ID: <x498sznaroa.fsf@redhat.com>
Date:   Mon, 14 Jan 2019 15:51:49 -0500
From:   Jeff Moyer <jmoyer@...hat.com>
To:     Dan Williams <dan.j.williams@...el.com>
Cc:     linux-nvdimm <linux-nvdimm@...ts.01.org>,
        Sujith Pandel <sujith_pandel@...l.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        stable <stable@...r.kernel.org>
Subject: Re: [PATCH] acpi/nfit: Fix command-supported detection

Dan Williams <dan.j.williams@...el.com> writes:

> On Mon, Jan 14, 2019 at 8:43 AM Dan Williams <dan.j.williams@...el.com> wrote:
>> On Mon, Jan 14, 2019 at 7:19 AM Jeff Moyer <jmoyer@...hat.com> wrote:
> [..]
>> > > +
>> > > +     if (cmd == ND_CMD_CALL) {
>> > > +             int i;
>> > > +
>> > > +             if (call_pkg && nfit_mem->family != call_pkg->nd_family)
>> > > +                     return -ENOTTY;
>> > > +
>> > > +             for (i = 0; i < ARRAY_SIZE(call_pkg->nd_reserved2); i++)
>> > > +                     if (call_pkg->nd_reserved2[i])
>> > > +                             return -EINVAL;
>> > > +             return call_pkg->nd_command;
>> > > +     }
>> > > +
>> > > +     /* Linux ND commands == NVDIMM_FAMILY_INTEL function numbers */
>> > > +     if (nfit_mem->family == NVDIMM_FAMILY_INTEL)
>> > > +             return cmd;
>> > > +     return 0;
>> >
>> > Function zero?  Is that really the right thing to return here?
>>
>> Yes, function zero is never set in n
>
> ...whoops fumble fingered "send"
>
> Function zero should never be set in nfit_mem->dsm_mask, although the
> NVDIMM_FAMILY_MSFT mask violates this assumption. I'll fix that up.

OK, I think I see how it all fits together now, thanks.  It would be
nice if you documented this magical 0 return somehow.

Cheers,
Jeff

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ