Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp841178pxb; Wed, 13 Jan 2021 18:01:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxYDx+Wg3qxir2ATToNV0GcVGCO7L9GPGv5vEsODC4+RyMOvr+j2Ep8Io7d88oIIp2wwiHg X-Received: by 2002:aa7:c64e:: with SMTP id z14mr4060008edr.69.1610589709448; Wed, 13 Jan 2021 18:01:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610589709; cv=none; d=google.com; s=arc-20160816; b=VV+s5hiX3UXPzqa2Tz7szBQxSkn+xamyUHlNgvQH9BOJClO7RFPVdHPS606FVeJcqm JRX5hc8076f8NiOih2iILacZdileBsLV18QbwmGaJyXR3FoQVVFij5Yj96FsDQfTVYnJ jwUiXplZy6SZdNZ25cFkOtQYCERf87swdyQ0wQke+dEtebmte+EIPFy3OumrjWaZhiFF 0A9E1mJ47hhD9ccg5zS549PEUnzJ4W+2cb3vOQf8Fj9Wy/rMZbeOMIWrcZeRALnVzOOA XaOypLagNFxUq6rEqqdvqtERzAN6EzZsRVBpN1PTujVDDdkDSt2LUpjMRYAXLyNICBS2 gmlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=egYNssqgRcswRNH1skLRAUiu45TpWsk2pFXggn83jwE=; b=KYNjuAtgfRPN1wqlOucXANci3eFoKlWO27uJ5+agd/i0t7cc9VAYdF36cIJCLaAhFT OkzTvC/tBdDWMa8cXI3qn7A2LWOg+4fBb5xPpm9wD2gyutRmRbQaZW2/mDtglmMFg5Xm eUu4/U9zHGvPgDdkwu1wzdXbpaxgpoyw6ad9psYBYERdj7vvCWTZZ1bTvPdKBu22u1g1 J+tM6TGVCdP+wJ0Xw6JgkP6z2ycCuTauVx4auKahMbByyhwoAR+Sruzw2zshIIySptmm 7zHxbA2Cszsd7OJkzQ7Sm9rP4yhGT83VzNUzxOD/8e3KFwRrsgjO4glX2uwUMzTBYPmt yTiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Fg69qKV9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zh12si1690997ejb.148.2021.01.13.18.01.01; Wed, 13 Jan 2021 18:01:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Fg69qKV9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728304AbhANB6f (ORCPT + 99 others); Wed, 13 Jan 2021 20:58:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729544AbhAMXkO (ORCPT ); Wed, 13 Jan 2021 18:40:14 -0500 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6873EC061384; Wed, 13 Jan 2021 15:39:32 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id g1so3163169edu.4; Wed, 13 Jan 2021 15:39:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=egYNssqgRcswRNH1skLRAUiu45TpWsk2pFXggn83jwE=; b=Fg69qKV9CXscWnFSBov/if1L+293kc8tZiDS2z52GAiM12z0BmWMIuRH2H8e5dJsy1 p4xAq0flJxSG2EbB3gSIwC8Awwrez7ElCZlJNqVGUjDfmhMxBvp+f0Ukp1Atgrk4gIrJ 31tU6hcgWhFN+9EJUS5kuO8fF9W4PhW22fVvFbUeRvBDOa1YPGPLjiD7LX+CbeXpk/Uo x/fpSTVWkXfe9TvHGv8bjtOBzgQ3dSOVKc+D+w8FOUxegBficrXTyJZuNBiG0mVeMQ3D bGIteWnemF9bhRw0A/RTNIP5hoh4fDWsV+upwP7wjrztQ40EUr+0kUlQ9WrDR1xi9oaZ VJsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=egYNssqgRcswRNH1skLRAUiu45TpWsk2pFXggn83jwE=; b=QnMuotsRaup20J9fpiQd6uBWsTQZf3cXu+tvt4Yl9Yzt02qb0iDGH7rZkoqFTAS93p mxBV6bmXs6+9/+SrJ9GtvCTQfrTHofIh/u2jZFRwCOf5WwCTP3ninaXQh/OuGdXFl56y ky70Jh6mo5Uw23t8EDDGeHOXtLDlKDXoD0OTbc04E34TsV5Ri6jLQRAeIxK+BPa9HSX2 qvm6BgJJDcYtmQ2dJuOaqiA6Agb8tzXckijE7Dq4VdKXoGfdY7ze/4/KLhJGNdpi7tsz MUMVqGRdB9hVkusH5oXkrgR8M7kYPPCqb3acJmxIv1SAxtiwMAk0cswwBWh6KEot2clC rvBg== X-Gm-Message-State: AOAM532aQBQYY3J6yXryw+LkZerGkdiLxofpw/RUarNiB+L+FzkKjFsH v7S/L1ga4eF37HsoFczY5Jc= X-Received: by 2002:a50:ccc3:: with SMTP id b3mr3086356edj.41.1610581169645; Wed, 13 Jan 2021 15:39:29 -0800 (PST) Received: from skbuf (5-12-227-87.residential.rdsnet.ro. [5.12.227.87]) by smtp.gmail.com with ESMTPSA id i15sm1281269ejj.28.2021.01.13.15.39.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 15:39:28 -0800 (PST) Date: Thu, 14 Jan 2021 01:39:27 +0200 From: Vladimir Oltean To: Gilles DOFFE Cc: netdev@vger.kernel.org, Woojung Huh , UNGLinuxDriver@microchip.com, Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" , Jakub Kicinski , linux-kernel@vger.kernel.org Subject: Re: [PATCH net 6/6] net: dsa: ksz: fix wrong read cast to u64 Message-ID: <20210113233927.njnrwuduo77bbma2@skbuf> References: <28e0730f2bdac275384fac85c4a342fb91f9455f.1610540603.git.gilles.doffe@savoirfairelinux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <28e0730f2bdac275384fac85c4a342fb91f9455f.1610540603.git.gilles.doffe@savoirfairelinux.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 13, 2021 at 01:45:22PM +0100, Gilles DOFFE wrote: > '(u64)*value' casts a u32 to a u64. So depending on endianness, > LSB or MSB is lost. > The pointer needs to be cast to read the full u64: > '*((u64 *)value)' > > Signed-off-by: Gilles DOFFE > --- Reviewed-by: Vladimir Oltean