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: <871rh1fbjj.fsf@microchip.com>
Date:   Tue, 10 Nov 2020 16:59:12 +0100
From:   Lars Povlsen <lars.povlsen@...rochip.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
CC:     Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Lars Povlsen <lars.povlsen@...rochip.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Microchip Linux Driver Support <UNGLinuxDriver@...rochip.com>,
        devicetree <devicetree@...r.kernel.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v8 2/3] pinctrl: pinctrl-microchip-sgpio: Add pinctrl driver for Microsemi Serial GPIO


Andy Shevchenko writes:

> On Mon, Nov 9, 2020 at 5:27 PM Alexandre Belloni
> <alexandre.belloni@...tlin.com> wrote:
>> On 09/11/2020 17:16:49+0200, Andy Shevchenko wrote:
>> > On Mon, Nov 9, 2020 at 4:32 PM Alexandre Belloni
>> > <alexandre.belloni@...tlin.com> wrote:
>> > > On 09/11/2020 16:17:40+0200, Andy Shevchenko wrote:
>
> ...
>
>> > > > > +               dev_err(pctldev->dev, "Pin %d direction as %s is not possible\n",
>> > > > > +                       pin, input ? "input" : "output");
>> > > >
>> > > > Do we need this noise? Isn't user space getting a proper error code as
>> > > > per doc and can handle this?
>> > >
>> > > Why would userspace get the error code?
>> >
>> > Huh?! Why it shouldn't. How will users know if they are doing something wrong?
>> >
>> > > Userspace should never have to
>> > > handle gpios directly or you are doing something wrong.
>> >
>> > This is true, but check how error codes are propagated to the user space.
>> >
>>
>> your point is to remove an error message because the error may be
>> propagated to userspace. My point is that userspace should never use
>> gpios and the kernel has to be the consumer.
>
> Tell this to plenty of users of old sysfs interface and to libgpiod ones.
> If what you are saying had been true, we would have never had the new
> ABI for GPIOs.
>
>> I don't see how your answer
>> is relevant here.
>
> I have an opposite opinion.
>
>> Did you already check all the call sites from the
>> kernel too?
>
> If you think we have to print a message on each possible error case
> (but not always the one) we will get lost in the messages disaster and
> dmesg overflow.
> It is consumer who should decide if the setting is critical or not to
> be printed to user.

I think the message is a valid one. I will change it to
dev_err_ratelimited() - that should prevent the dmesg flooding.

---Lars

--
Lars Povlsen,
Microchip

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ