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]
Date:   Mon, 19 Sep 2022 20:40:38 +0900
From:   Akinobu Mita <akinobu.mita@...il.com>
To:     David Hildenbrand <david@...hat.com>
Cc:     linux-doc@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
        linux-mm@...ck.org, linux-kselftest@...r.kernel.org,
        Jonathan Corbet <corbet@....net>, osalvador@...e.de,
        shuah@...nel.org, Zhao Gongyi <zhaogongyi@...wei.com>,
        Wei Yongjun <weiyongjun1@...wei.com>,
        Yicong Yang <yangyicong@...ilicon.com>
Subject: Re: [PATCH -v2] lib/notifier-error-inject: fix error when writing
 errno to debugfs file

2022年9月19日(月) 18:20 David Hildenbrand <david@...hat.com>:
>
> On 17.09.22 09:14, Akinobu Mita wrote:
> > The simple attribute files do not accept a negative value since the
> > commit 488dac0c9237 ("libfs: fix error cast of negative value in
> > simple_attr_write()"), so we can no longer use DEFINE_SIMPLE_ATTRIBUTE() to
> > define a file operations for errno value.
> >
> > Fixes: 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()")
> > Reported-by: Zhao Gongyi <zhaogongyi@...wei.com>
> > Signed-off-by: Akinobu Mita <akinobu.mita@...il.com>
>
> But shouldn't we fix simple_attr_write() instead?
>
> I mean, simple_attr_read() might use attr->fmt to print a signed value,
> but simple_attr_write() fails on signed values now?
>
> I might be wrong, but there is a disconnect. I feel like
> simple_attr_write() should similarly make decisions based on attr->fmt.

I agree there is a disconnect, but I have no idea how to fix
simple_attr_write().
(strcmp(attr->fmt, "%%lld\n") is ugly)
If no one seems to come up with a good idea, I'll fix the similar problems
in fault-injection the same way I did here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ