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: <20160924183455.GD40187@dtor-ws>
Date:   Sat, 24 Sep 2016 11:34:55 -0700
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:     "linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
        Henrik Rydberg <rydberg@...math.org>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org,
        Julia Lawall <julia.lawall@...6.fr>
Subject: Re: Input-evdev: Use kmalloc_array() in evdev_handle_get_val()

On Sat, Sep 24, 2016 at 08:16:16PM +0200, SF Markus Elfring wrote:
> > So we have to multiply twice now, once in kmalloc_array, the second
> > time in memcpy().
> 
> It looks so in the source code after the suggested refactoring.
> 
> 
> > No, thank you.
> 
> Would you like to check any further if a specific compiler implementation
> will still optimise common subexpressions as you desired it?
> 
> 
> > Also, please note that we do not really treat the allocated "mem" as an array,
> > but rather area of memory that holds all bits that we need to transfer,
> > and so I consider using kmalloc_array() actually wrong here.
> 
> Thanks for your explanation.
> 
> 
> > Please do not blindly follow checkpatch and coccinelle suggestions.
> > They are just that: suggestions and not hared rules.
> 
> I am curious on how to clarify corresponding deviations further.
> 
> 
> Would you like to suggest any other details so that the evolving scripts
> can become better and safer for static source code analysis?
> 
> Do you know any special properties which should be additionally checked
> at call sites which are similar to the discussed place?

If you are asking for some formal rules then no.

Again, what is the purpose of the changes? Are you working on the code
and the fact that the driver is older-style hinders your progress? Or
there are runtime improvements from your changes? Correctness issues?

I do not very much appreciate changes just to satisfy checkpatch rule
du jour.

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ