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]
Date:   Tue, 15 May 2018 15:21:39 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     Dexuan Cui <decui@...rosoft.com>,
        "olaf@...fle.de" <olaf@...fle.de>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "kys@...uxonhyperv.com" <kys@...uxonhyperv.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "jasowang@...hat.com" <jasowang@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Michael Kelley (EOSG)" <Michael.H.Kelley@...rosoft.com>,
        "apw@...onical.com" <apw@...onical.com>,
        "devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
        "vkuznets@...hat.com" <vkuznets@...hat.com>
Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: enable VMBus protocol version 5.0

On Mon, May 14, 2018 at 11:17:55AM -0700, Stephen Hemminger wrote:
> On Mon, 14 May 2018 18:14:15 +0000
> Dexuan Cui <decui@...rosoft.com> wrote:
> 
> > > From: devel <driverdev-devel-bounces@...uxdriverproject.org> On Behalf Of
> > > Stephen Hemminger
> > > Sent: Sunday, May 13, 2018 10:24  
> > > > ...
> > > > @@ -372,6 +400,18 @@ int vmbus_post_msg(void *buffer, size_t buflen,  
> > > bool can_sleep)  
> > > > ...
> > > > +			hdr = (struct vmbus_channel_message_header *)buffer;  
> > > 
> > > Hate to pick o the details, but buffer is void * so cast is not necessary here.  
> > 
> > Yes, it's unnecessary in C, though it's necessary in C++.
> > 
> > I found the patch went into char-misc 4 hours ago, so it looks we may
> > as well leave it as is. IMHO an explicit cast is not a bad thing. :-)
> > 
> > Thanks,
> > -- Dexuan
> 
> Kernel developers like to be concise. In fact there is a smatch script that perodically
> gets run and more cleanup patches get sent.

It's a Coccinelle script, not Smatch.  Coccinelle generates patches
automatically so it's a better tool for cleanup than Smatch.

I would generate a lot more Smatch information if there was a way to
integrate it easily into a code editor.  For example, we could highlight
unecessary casts or pointer dereferences where Smatch wasn't 100% sure
if it was correct.  Or you could hover over function name to see what
resources it allocates.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ