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
| ||
|
Date: Tue, 30 Apr 2019 09:32:20 -0400 From: Sven Van Asbroeck <thesven73@...il.com> To: Al Viro <viro@...iv.linux.org.uk> Cc: Nicholas Mc Guire <der.herr@...r.at>, Nicholas Mc Guire <hofrat@...dl.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, devel@...verdev.osuosl.org, Linux Kernel Mailing List <linux-kernel@...r.kernel.org> Subject: Re: [PATCH V2] staging: fieldbus: anybus-s: force endiannes annotation On Tue, Apr 30, 2019 at 12:19 AM Al Viro <viro@...iv.linux.org.uk> wrote: > > ... not that there's much sense keeping ->fieldbus_type in host-endian, > while we are at it. Interesting! Suppose we make device->fieldbus_type bus-endian. Then the endinan-ness conversion either needs to happen in bus_match() (and we'd have to convert endianness each time this function is called). Or, we make driver->fieldbus_type bus-endian also, then there is no need for conversion... but the driver writer has to remember to specify this in bus endianness: static struct anybuss_client_driver profinet_driver = { .probe = ..., .fieldbus_type = endian convert?? (0x0089), }; Which pushes bus implementation details onto the client driver writer? Also, how to convert a constant to a specific endianness in a static initializer? You never make a remark without good reason, so what am I overlooking?
Powered by blists - more mailing lists