From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C0ADC63697 for ; Thu, 19 Nov 2020 17:42:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2A423246A7 for ; Thu, 19 Nov 2020 17:42:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729560AbgKSRmi (ORCPT ); Thu, 19 Nov 2020 12:42:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:46336 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729542AbgKSRmi (ORCPT ); Thu, 19 Nov 2020 12:42:38 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 30BCC246A7; Thu, 19 Nov 2020 17:42:36 +0000 (UTC) Date: Thu, 19 Nov 2020 12:42:34 -0500 From: Steven Rostedt To: Linus Torvalds Cc: Masami Hiramatsu , Chen Yu , Chen Yu , LKML , Ingo Molnar , Jonathan Corbet , "open list:DOCUMENTATION" Subject: Re: [RFC PATCH 0/3] bootconfig: Use hexadecimal ASCII string for size and checksum Message-ID: <20201119124234.6827fd41@gandalf.local.home> In-Reply-To: References: <160579629161.503380.9118263439060046721.stgit@devnote2> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Thu, 19 Nov 2020 09:36:47 -0800 Linus Torvalds wrote: > On Thu, Nov 19, 2020 at 6:31 AM Masami Hiramatsu wrote: > > > > Here is a seires of patches to change the bootconfig footer format > > to use 8-bytes hexadecimal ASCII string for size and checksum instead > > of u32. > > Ugh., > > Just make it little-endian only. > > The _worst_ thing to do is to make it some kind of "native-endian", > because then you have to deal with cross building issues etc. > > But using a __le32 type and just doing "le32_to_cpu()" is trivial and > optimal - not just because everybody relevant is LE anyway, but simply > because even if you _aren't_ LE, an unconditional byte swap is better > than a conditional native access. And since this isn't used in any fast paths, the byte swapping in the kernel should be a non-issue. -- Steve