* question about "acpi, nfit: validate ars_status output buffer size"
@ 2017-01-09 13:30 Dan Carpenter
2017-01-09 13:33 ` Dan Carpenter
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dan Carpenter @ 2017-01-09 13:30 UTC (permalink / raw)
To: linux-sctp
Hi Dan,
It's really hard to understand commit 82aa37cf0986 ("acpi, nfit:
validate ars_status output buffer size") from Dec 6, 2016.
drivers/acpi/nfit/core.c
139 /* No ARS performed for the current boot */
140 if (status = NFIT_ARS_STATUS_NONE)
141 return -EAGAIN;
142
143 /*
144 * ARS interrupted, either we overflowed or some other
145 * agent wants the scan to stop. If we didn't overflow
146 * then just continue with the returned results.
147 */
148 if (status = NFIT_ARS_STATUS_INTR) {
149 if (ars_status->out_length >= 40 && (ars_status->flags
150 & NFIT_ARS_F_OVERFLOW))
When I read the commit message, it implies that we're being more strict
about what we process but actually this is && instead of || so we're
being less strict.
The commit message doesn't really describe the user visible effects of
this bug. I'm not an expert on ACPI and I have grepped the source but
can't figure it out.
Also this isn't aligned the normal way. It should be:
if (ars_status->out_length >= 40 &&
(ars_status->flags & NFIT_ARS_F_OVERFLOW))
151 return -ENOSPC;
152 return 0;
153 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: question about "acpi, nfit: validate ars_status output buffer size"
2017-01-09 13:30 question about "acpi, nfit: validate ars_status output buffer size" Dan Carpenter
@ 2017-01-09 13:33 ` Dan Carpenter
2017-01-09 13:38 ` Marcelo Ricardo Leitner
2017-01-09 13:44 ` Dan Carpenter
2 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2017-01-09 13:33 UTC (permalink / raw)
To: linux-sctp
Oh wow... I was only reading that one chunk of the commit and I
realized that as soon as I scrolled down. I'm an idiot.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: question about "acpi, nfit: validate ars_status output buffer size"
2017-01-09 13:30 question about "acpi, nfit: validate ars_status output buffer size" Dan Carpenter
2017-01-09 13:33 ` Dan Carpenter
@ 2017-01-09 13:38 ` Marcelo Ricardo Leitner
2017-01-09 13:44 ` Dan Carpenter
2 siblings, 0 replies; 4+ messages in thread
From: Marcelo Ricardo Leitner @ 2017-01-09 13:38 UTC (permalink / raw)
To: linux-sctp
On Mon, Jan 09, 2017 at 04:30:07PM +0300, Dan Carpenter wrote:
> Hi Dan,
>
> It's really hard to understand commit 82aa37cf0986 ("acpi, nfit:
> validate ars_status output buffer size") from Dec 6, 2016.
Dan, you probably hit the wrong mailing list :-)
Marcelo
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: question about "acpi, nfit: validate ars_status output buffer size"
2017-01-09 13:30 question about "acpi, nfit: validate ars_status output buffer size" Dan Carpenter
2017-01-09 13:33 ` Dan Carpenter
2017-01-09 13:38 ` Marcelo Ricardo Leitner
@ 2017-01-09 13:44 ` Dan Carpenter
2 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2017-01-09 13:44 UTC (permalink / raw)
To: linux-sctp
On Mon, Jan 09, 2017 at 11:38:47AM -0200, Marcelo Ricardo Leitner wrote:
> On Mon, Jan 09, 2017 at 04:30:07PM +0300, Dan Carpenter wrote:
> > Hi Dan,
> >
> > It's really hard to understand commit 82aa37cf0986 ("acpi, nfit:
> > validate ars_status output buffer size") from Dec 6, 2016.
>
> Dan, you probably hit the wrong mailing list :-)
>
Gar... I'm on a role today. :P
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-09 13:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-09 13:30 question about "acpi, nfit: validate ars_status output buffer size" Dan Carpenter
2017-01-09 13:33 ` Dan Carpenter
2017-01-09 13:38 ` Marcelo Ricardo Leitner
2017-01-09 13:44 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).