Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758055AbbDVVsk (ORCPT ); Wed, 22 Apr 2015 17:48:40 -0400 Received: from mail-ie0-f175.google.com ([209.85.223.175]:35472 "EHLO mail-ie0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757998AbbDVVsi (ORCPT ); Wed, 22 Apr 2015 17:48:38 -0400 MIME-Version: 1.0 In-Reply-To: References: <20150413190350.GA9485@kroah.com> <8738434yjk.fsf@x220.int.ebiederm.org> <87lhhv36je.fsf@x220.int.ebiederm.org> <20150414175534.GB3974@kroah.com> <87oamhmbso.fsf_-_@x220.int.ebiederm.org> <553788A9.6090006@gmail.com> <20150422143515.GA23155@dellaz> Date: Wed, 22 Apr 2015 14:48:38 -0700 X-Google-Sender-Auth: PoeYUgvtHmBPrzRSImHEiuRz7bE Message-ID: Subject: Re: Issues with capability bits and meta-data in kdbus From: Linus Torvalds To: Havoc Pennington Cc: Michele Curti , Austin S Hemmelgarn , Andy Lutomirski , "Eric W. Biederman" , Greg Kroah-Hartman , Andrew Morton , Arnd Bergmann , One Thousand Gnomes , Tom Gundersen , Jiri Kosina , Linux Kernel Mailing List , Daniel Mack , David Herrmann , Djalal Harouni Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1354 Lines: 31 On Wed, Apr 22, 2015 at 1:02 PM, Havoc Pennington wrote: > * the byte order marker in every message is silly It's worse than that. Conditional byte order is worse than silly - it's terminally stupid. This is not a "per connection" thing or a "every message"; thing. It's more fundamental than that. Protocols that have dynamic byte orders are pure and utter crap. The only sane model is to specify one fixed byte order. Seriously. It's equally portable, it generates better code - even on architectures that then have to unconditionally do byte order swapping - and it's simpler to add static type checks for etc. It's literally less code and faster to do a "bswap" instruction than to do a conditional test of some variable (even if you can then avoid the bswap dynamically), In other words, think networking, which statically just decided to use big-endian. Sure, that was the wrong choice in the end, but even picking the wrong endianness - but picking it statically - is better than the horrible mistake of thinking that you should have some variable byte order. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/