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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 02 Dec 2013 23:16:31 +0100
From:	Thomas Graf <tgraf@...hat.com>
To:	Ben Pfaff <blp@...ira.com>
CC:	jesse@...ira.com, dev@...nvswitch.org, netdev@...r.kernel.org,
	dborkman@...hat.com, ffusco@...hat.com, fleitner@...hat.com,
	xiyou.wangcong@...il.com
Subject: Re: [PATCH openvswitch v2] netlink: Implement & enable memory mapped
 netlink i/o

On 12/02/2013 10:23 PM, Ben Pfaff wrote:
> On Sat, Nov 30, 2013 at 01:27:33PM +0100, Thomas Graf wrote:
>> Based on the initial patch by Cong Wang posted a couple of months
>> ago.
>>
>> This is the user space counterpart needed for the kernel patch
>> '[PATCH net-next 3/8] openvswitch: Enable memory mapped Netlink i/o'
>>
>> Allows the kernel to construct Netlink messages on memory mapped
>> buffers and thus avoids copying. The functionality is enabled on
>> sockets used for unicast traffic.
>>
>> Further optimizations are possible by avoiding the copy into the
>> ofpbuf after reading.
>>
>> Signed-off-by: Thomas Graf <tgraf@...hat.com>
>
> Clang reports:
>
>      ../lib/netlink-socket.c:330:12: error: cast from 'char *' to 'struct nl_mmap_hdr *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]
>          return (struct nl_mmap_hdr *)(start + r->head * sock->frame_size);
>                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>      ../lib/netlink-socket.c:369:22: error: implicit declaration of function '__ALIGN_KERNEL' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
>      -> sock->frame_size)
>                           ^
>      ../lib/netlink-protocol.h:213:26: note: expanded from macro 'NL_MMAP_HDRLEN'
>      #define NL_MMAP_HDRLEN                  NL_MMAP_MSG_ALIGN(sizeof(struct nl_mmap_hdr))
>                                              ^
>      ../lib/netlink-protocol.h:212:32: note: expanded from macro 'NL_MMAP_MSG_ALIGN'
>      #define NL_MMAP_MSG_ALIGN(sz)           __ALIGN_KERNEL(sz, NL_MMAP_MSG_ALIGNMENT)
>                                              ^
> GCC reports:
>
>      ../lib/netlink-socket.c: In function 'nl_sock_send_mmap':
>      ../lib/netlink-socket.c:369:5: error: implicit declaration of function '__ALIGN_KERNEL' [-Werror=implicit-function-declaration]
>      cc1: all warnings being treated as errors

Just so we can simplify this process: what's the oldest environment you
want the code to compile on?

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ