Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp960585ybl; Fri, 10 Jan 2020 09:34:57 -0800 (PST) X-Google-Smtp-Source: APXvYqym1si2MguL0uvlDa3ZRErZdin9xN//m7VulXCYgibwNvK7rXtqjCpJhxXkoBZPca1ueJ1f X-Received: by 2002:a05:6808:4c2:: with SMTP id a2mr2940846oie.118.1578677697328; Fri, 10 Jan 2020 09:34:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578677697; cv=none; d=google.com; s=arc-20160816; b=BVHNhcqDf9nQF7wrxrN33fb7dkv2KMHqa51xcLaXlIX25G6va/9Q7x1W6Gas+Rz/nr EIHZ2dtslohRyIZTShdsaQQqScNcYdxwDMpm5knmjCR8uv0J9Btcl2SNNBPhXZetzpe6 vlG5ecToYmVQ/cffhL6yjAzPeLwHmsLWXd/NzK0rZCV7rDZKPJqAuw+RET69yWjpJ2Ri sDDwSYPaJUiFSNlhlzvHZyG0NC7z0AmAnKqq2z7WVbyQWn5q/W1EMpGdc7fbXQ/SHRMU 5NzVqCYWRizsDL/wCQUCJS3cPIithkeBpRc/90+1AFNz6TQhTDZgXylZ2Ygyhzzs/P72 1/1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=WbTAOAZdrcBXE/t8N3PrtNamLClRNA45yu7O/aaIaes=; b=noUk7R+7lAT8DJJvlJV5zZhvqrgIm3JsikwcJxgt60fMHUubLiRJFCh/cN5eeHT9uF XwKZT+SVzY6WmHerWFMw0eSxz8zJ+YP4ejxfn0KVMSbwjsgpTrASgylD9iihevcPKj/9 tb4HqD2xtd4ukl0tOt2tB6VhmbpjrGUPta095vI2jv0vZo+Uc025A/Tch+8hxTq6BGmD 8divyx3udN4xX2kAasqK4+HQA+D6GAtjLpOE/jDsAjYYGTbo08iVxjXJJ0YovWvIVmks LWdw4ad6bGal4uF/XXmxlgc/zqE02Ru8wZ6bEZu1+/xF9Ey+iNeQvYYHw8d5ST8gviqU eneA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z62si1354557oiz.271.2020.01.10.09.34.38; Fri, 10 Jan 2020 09:34:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726739AbgAJReh (ORCPT + 99 others); Fri, 10 Jan 2020 12:34:37 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:33268 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726700AbgAJReg (ORCPT ); Fri, 10 Jan 2020 12:34:36 -0500 Received: from callcc.thunk.org (guestnat-104-133-0-111.corp.google.com [104.133.0.111] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 00AHYW3U009159 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jan 2020 12:34:33 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id BF7F14207DF; Fri, 10 Jan 2020 12:34:32 -0500 (EST) Date: Fri, 10 Jan 2020 12:34:32 -0500 From: "Theodore Y. Ts'o" To: Anatoly Pugachev Cc: linux-ext4@vger.kernel.org Subject: Re: [PATCH] libext2fs: Extends commit c9a8c53b, with the same fix for ext2fs_flush2() and ext2fs_image_super_write() on a Big Endian systems. Message-ID: <20200110173432.GB304349@mit.edu> References: <20200110085217.GA7307@yogzotot> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200110085217.GA7307@yogzotot> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Jan 10, 2020 at 11:52:17AM +0300, Anatoly Pugachev wrote: > > libext2fs: extends commit c9a8c53b, with the same fix for ext2fs_flush2() and > ext2fs_image_super_write() on a Big Endian systems. > > As follow-up to previous discussion 'dumpe2fs / mke2fs sigserv on sparc64' > > Used find for files which refer to: > > e2fsprogs.git$ find . -name \*.c | xargs grep -cl 'gdp = ext2fs_group_desc' > ./lib/ext2fs/closefs.c > ./lib/ext2fs/openfs.c > ./lib/ext2fs/imager.c > > And applied the same check for a null pointer. > > Tested on a debian linux with sparc64 LDOM and ppc64 LPAR. > > Fixes sigserv with test suite in "i_bitmaps" test. As far as I know, the i_bitmaps test is passing on on sparc64 and ppc64. Search for i_bitmaps in: https://buildd.debian.org/status/fetch.php?pkg=e2fsprogs&arch=sparc64&ver=1.45.5-2&stamp=1578527938&raw=0 and https://buildd.debian.org/status/fetch.php?pkg=e2fsprogs&arch=ppc64&ver=1.45.5-2&stamp=1578526270&raw=0 The bug in c9a8c53b was caused by SPARSE_SUPER being passed to ext2fs_open(). But that doesn't happen in misc/e2image. I can see optimizing ext2fs_flush() to skip byte-swapping the group descriptors if the SUPER_ONLY flag is enabled. And I can see ext2fs_image_super_write() checking to see if the SUPER_ONLY flag is set, and returning an error in that case. But I don't think any of the current e2fsprogs are crashing at the moment. Am I missing something? Regards, - Ted