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: <ae9f9825-ffa8-8727-a193-94cf9d56abf6@redhat.com>
Date:   Wed, 4 Oct 2017 11:32:23 +0200
From:   Hans de Goede <hdegoede@...hat.com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Michael Thayer <michael.thayer@...cle.com>,
        "Knut St . Osmundsen" <knut.osmundsen@...cle.com>,
        Larry Finger <Larry.Finger@...inger.net>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] virt: Add vboxguest driver for Virtual Box Guest
 integration

Hi,

On 03-10-17 13:41, Hans de Goede wrote:

<snip>

>>> +#define CHECK_IOCTL_IN(req)                             \
>>> +do {                                         \
>>> +    if ((req)->Hdr.cbIn != (sizeof((req)->Hdr) + sizeof((req)->u.In)) || \
>>> +        (req)->Hdr.cbOut != sizeof((req)->Hdr))                 \
>>> +        return -EINVAL;                             \
>>> +} while (0)
>>
>> Make these things functions instead of macros.
> 
> Turning these into functions is a good idea I will do so for v2.

Correction, I forgot that the passed in "req" macro
argument has a different type with all the calls, so
these cannot be changed into functions because they
rely on sizeof on the specific type to do the size
checks.

Regards,

Hans

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ