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: <CANq1E4QKLW91QjDygoqid=Nan9km0fD6RvJwdzHnRpy=5dWV2g@mail.gmail.com>
Date:	Thu, 4 Jun 2015 13:30:29 +0200
From:	David Herrmann <dh.herrmann@...il.com>
To:	Sergei Zviagintsev <sergei@...v.net>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Daniel Mack <daniel@...que.org>,
	David Herrmann <dh.herrmann@...glemail.com>,
	Djalal Harouni <tixxdz@...ndz.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kdbus: use FIELD_SIZEOF in kdbus_member_set_user macro

Hi

On Thu, Jun 4, 2015 at 12:39 PM, Sergei Zviagintsev <sergei@...v.net> wrote:
> sizeof(((_t *)0)->_m) -> FIELD_SIZEOF(_t, _m)
>
> Use conventional macro according to chapter 17 of
> Documentation/CodingStyle.
>
> Signed-off-by: Sergei Zviagintsev <sergei@...v.net>
> ---
>  ipc/kdbus/util.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: David Herrmann <dh.herrmann@...il.com>

Thanks
David

> diff --git a/ipc/kdbus/util.h b/ipc/kdbus/util.h
> index 9fedf8ab41cd..529716669fe7 100644
> --- a/ipc/kdbus/util.h
> +++ b/ipc/kdbus/util.h
> @@ -40,7 +40,7 @@
>  ({                                                                     \
>         u64 __user *_sz =                                               \
>                 (void __user *)((u8 __user *)(_b) + offsetof(_t, _m));  \
> -       copy_to_user(_sz, _s, sizeof(((_t *)0)->_m));                   \
> +       copy_to_user(_sz, _s, FIELD_SIZEOF(_t, _m));                    \
>  })
>
>  /**
> --
> 1.8.3.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ