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: <CAAe_U6LhrBnsU9nC0yXqyNmEjmDfrvYP5BYhAOhJiGxLZbk_Qw@mail.gmail.com>
Date:	Thu, 26 Jul 2012 16:49:21 +0530
From:	"ABRAHAM, KISHON VIJAY" <kishon@...com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	lrg@...com, balbi@...com, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] drivers: regulator: add error checks for exported APIs

Hi,

On Thu, Jul 26, 2012 at 4:40 PM, Mark Brown
<broonie@...nsource.wolfsonmicro.com> wrote:
> On Thu, Jul 26, 2012 at 04:00:03PM +0530, Kishon Vijay Abraham I wrote:
>
>> Added error checks for exported APIs in regulator framework so that
>> incorrect use of these APIs does not result in a crash.
>
> The commit (especially the subject) should be more descriptive, it's not
> that we're missing error checks it's that you're handling garbage passed
> in from the user a bit more gracefully.
>
> I'm not sure how useful this is as-is -  if you're not checking your
> errors you're not checking your errors so it's probably just pushing the
> robustness failures around, especially since...
>
>> +     if (IS_ERR_OR_NULL(regulator))
>> +             return -ENODEV;
>
> ...this is too quiet, this should at the very least be generating a loud
> warning so people can see there's a problem (probably with WARN_ON so we
> can see what called it).  Can you respin with something noisier please?

Sure. I'll respin a new version.
>
> Also NULL is a valid regulator (though we don't use it right now).
I see a lot of dereferencing *regulator*. How is it supposed to work
when *regulator* is NULL?

Thanks
Kishon
--
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