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]
Date:	Mon, 23 Oct 2006 22:39:54 +0200
From:	Avi Kivity <avi@...ranet.com>
To:	Arnd Bergmann <arnd@...db.de>
CC:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/13] KVM: virtualization infrastructure

Arnd Bergmann wrote:
>>>> +struct segment_descriptor {
>>>> +    u16 limit_low;
>>>> +    u16 base_low;
>>>> +    u8  base_mid;
>>>> +    u8  type : 4;
>>>> +    u8  system : 1;
>>>> +    u8  dpl : 2;
>>>> +    u8  present : 1;
>>>> +    u8  limit_high : 4;
>>>> +    u8  avl : 1;
>>>> +    u8  long_mode : 1;
>>>> +    u8  default_op : 1;
>>>> +    u8  granularity : 1;
>>>> +    u8  base_high;
>>>> +} __attribute__((packed));
>>>>    
>>>>         
>>> Bitfields are generally frowned upon. It's better to define
>>> constants for each of these and use a u64.
>>>       
>> Any specific reasons?  I find the code much more readable (and
>> lowercase) with bitfields.
>>     
>
> The strongest reason against bitfields is that they are not
> endian-clean. This doesn't apply on a architecture-specific
> patch such as KVM, but it just feels wrong to read code
> with bit fields in the kernel.
>
>   

Okay, will change.  It's very localized anyway.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

-
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