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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 52249C433B4 for ; Fri, 7 May 2021 03:11:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 27E8C613DA for ; Fri, 7 May 2021 03:11:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234069AbhEGDMC (ORCPT ); Thu, 6 May 2021 23:12:02 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:53143 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229942AbhEGDMB (ORCPT ); Thu, 6 May 2021 23:12:01 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 1473AxgU014154 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 6 May 2021 23:10:59 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 2853715C39BD; Thu, 6 May 2021 23:10:59 -0400 (EDT) Date: Thu, 6 May 2021 23:10:59 -0400 From: "Theodore Ts'o" To: Harshad Shirwadkar Cc: linux-ext4@vger.kernel.org Subject: Re: [PATCH 2/2] e2fsck: fix unaligned accesses to ext4_fc_tl struct Message-ID: References: <20210507002110.3933387-1-harshads@google.com> <20210507002110.3933387-2-harshads@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210507002110.3933387-2-harshads@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, May 06, 2021 at 05:21:10PM -0700, Harshad Shirwadkar wrote: > From: Harshad Shirwadkar > > Fast commit related struct ext4_fc_tl can be unaligned on disk. So, > while accessing that we should ensure that the pointers are > aligned. This patch fixes unaligned accesses to ext4_fc_tl and also > gets rid of macros fc_for_each_tl and ext4_fc_tag_val that may result > in unaligned accesses to struct ext4_fc_tl. > > Signed-off-by: Harshad Shirwadkar Looks good. I wrote my reply with a proposed version of ext4_fc_tag_val() before I saw your patch. This patch wasn't enough to fix the sparc64 crash, but after doing some additional investigation, I was able to figure out how to fix things so that j_recovery_fast_commit is working on sparc64. Patch follows on this thread... - Ted