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: <alpine.LNX.2.01.1010060804580.8631@obet.zrqbmnf.qr>
Date:	Wed, 6 Oct 2010 08:05:52 +0200 (CEST)
From:	Jan Engelhardt <jengelh@...ozas.de>
To:	David Miller <davem@...emloft.net>
cc:	Andreas Gruenbacher <agruen@...e.de>, netfilter@...r.kernel.org,
	eparis@...hat.com,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	schwab@...hat.com, Harald Welte <laforge@...filter.org>,
	Andi Kleen <andi@...stfloor.org>
Subject: Re: aligned_{u64,be64,le64} defined in #ifdef __KERNEL__

On Monday 2010-08-30 15:02, Jan Engelhardt wrote:
>On Monday 2010-08-30 12:58, Andreas Gruenbacher wrote:
>>
>>> If we want a version of this type visible to userspace, it needs to,
>>> for example, have double underscores prepended to the type name just
>>> as we do for things like __u16 and __u32.
>>
>>How about something like this?
>
>
>I like that approach:
>
>>>From 3bec018a4835d4fdbe35595366a51bd09e3cc1d0 Mon Sep 17 00:00:00 2001
>>From: Andreas Gruenbacher <agruen@...e.de>
>>Date: Mon, 30 Aug 2010 12:51:01 +0200
>>Subject: [PATCH] Define __aligned_{u64,le64,be64} types with 8-byte alignment
>>
>>--- a/include/linux/if_ppp.h
>>+++ b/include/linux/if_ppp.h
>>@@ -114,14 +114,14 @@ struct pppol2tp_ioc_stats {
>> 	__u16		tunnel_id;	/* redundant */
>> 	__u16		session_id;	/* if zero, get tunnel stats */
>> 	__u32		using_ipsec:1;	/* valid only for session_id == 0 */
>>-	aligned_u64	tx_packets;
>>-	aligned_u64	tx_bytes;
>>-	aligned_u64	tx_errors;
>>-	aligned_u64	rx_packets;
>>-	aligned_u64	rx_bytes;
>>-	aligned_u64	rx_seq_discards;
>>-	aligned_u64	rx_oos_packets;
>>-	aligned_u64	rx_errors;
>>+	__aligned_u64	tx_packets;
>>+	__aligned_u64	tx_bytes;
>>+	__aligned_u64	tx_errors;
>>+	__aligned_u64	rx_packets;
>>+	__aligned_u64	rx_bytes;
>>+	__aligned_u64	rx_seq_discards;
>>+	__aligned_u64	rx_oos_packets;
>>+	__aligned_u64	rx_errors;


Dave, you liked this too, but I don't see it in net-next yet. Was there 
some sort of holdup?

Jan
--
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