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: <20101001172823.42424961@daedalus.pq.iki.fi>
Date:	Fri, 1 Oct 2010 17:28:23 +0300
From:	Pekka Paalanen <pq@....fi>
To:	Pekka Enberg <penberg@...nel.org>
Cc:	dave@....org, tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
	LKML <linux-kernel@...r.kernel.org>, x86@...nel.org
Subject: Re: [RESEND PATCH] x86: return proper error code

On Thu, 30 Sep 2010 22:49:36 +0300
Pekka Enberg <penberg@...nel.org> wrote:

> On Thu, Sep 30, 2010 at 10:43 PM, Davidlohr Bueso <dave@....org>
> wrote:
> > x86: return -ENOMEM instead of -1 when returning on memory
> > allocation errors in add_kmmio_fault_page()
> >
> > Signed-off-by: Davidlohr Bueso <dave@....org>
> > ---
> >  arch/x86/mm/kmmio.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c
> > index e5d5e2c..36a4347 100644
> > --- a/arch/x86/mm/kmmio.c
> > +++ b/arch/x86/mm/kmmio.c
> > @@ -370,7 +370,7 @@ static int add_kmmio_fault_page(unsigned
> > long page)
> >
> >        f = kzalloc(sizeof(*f), GFP_ATOMIC);
> >        if (!f)
> > -               return -1;
> > +               return -ENOMEM;
> >
> >        f->count = 1;
> >        f->page = page;
> 
> This doesn't matter much as register_kmmio_probe() doesn't do
> anything sane with the error code and ioremap_trace_core()
> ignores what register_mmio_probe() does completely. I'd either
> keep the code as-is or try to fix up the fishy error handling
> properly.

Yes, I agree completely with Pekka.

-- 
Pekka Paalanen
http://www.iki.fi/pq/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ