From patchwork Thu Jul 26 01:46:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauricio Faria de Oliveira X-Patchwork-Id: 10545049 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5D1CE14E2 for ; Thu, 26 Jul 2018 01:46:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4835E29FAC for ; Thu, 26 Jul 2018 01:46:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46AE52AB19; Thu, 26 Jul 2018 01:46:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7BEB29FAC for ; Thu, 26 Jul 2018 01:46:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728505AbeGZDBK (ORCPT ); Wed, 25 Jul 2018 23:01:10 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:38285 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728352AbeGZDBK (ORCPT ); Wed, 25 Jul 2018 23:01:10 -0400 Received: from mail-qk0-f200.google.com ([209.85.220.200]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1fiVMa-0005eZ-Rt for linux-block@vger.kernel.org; Thu, 26 Jul 2018 01:46:44 +0000 Received: by mail-qk0-f200.google.com with SMTP id u22-v6so106318qkk.10 for ; Wed, 25 Jul 2018 18:46:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PNY0B9IyhhiL28HuhMKOb8iglpjyDho04O5nul2q/+4=; b=bKt5EFYR418pAfUP8GP6qTL+CtYFKChAvXDOFsqBfExy0e2/0OGCTvuCQYSBpIEf9L uyTRCkJ9y4MzORg8bxZDvY0yFoa3ndSk36WgF4wqCQcq+rp+hUhuxMzMero+n7BCBVHZ 1zBgfLzUcUUC+7Tulw+IgrEkZR6XDH2xKUqw1Z/2uOOr+l0rGN5V+IPcwnZ2MLWxUS5x s2HdPDPagUCw0Cq5HCKPuDTfJCH2MqajnvRvza+gCwtbGfx+ABmys2A7Pom+oAtjyjzQ mvYTdAMsGyjchSBx9jQ+kgHQcYQgBBc4+E6U76eCja7Kem7gf9mc3GlUO9fZMgadsmLN Yllw== X-Gm-Message-State: AOUpUlHjXXHAHnuXe17mhuznLLRaAtYH6NOGYGMcNK8ud2qbOEoOn+z4 2QZfnBj6RbO1/LFryvrxkVIaJ7oXfYLFlJa7+LJS4MUCSu8AZe9kg+5YwzE1WA1Ffq5mxbSSJks fcTpJpxvv9MJV9zUWEnId44TVo94bowLxPYzmaDuB X-Received: by 2002:ac8:42b:: with SMTP id v43-v6mr21938752qtg.319.1532569604107; Wed, 25 Jul 2018 18:46:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc+XRIc8ESPZ386qmgfKcub2hymdgewhx9NAc973CK9XTDReXz4vJf+Swv4YpeCGgBM1Gvyjw== X-Received: by 2002:ac8:42b:: with SMTP id v43-v6mr21938747qtg.319.1532569603976; Wed, 25 Jul 2018 18:46:43 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:77dd:8111:28ad:fd9c:9a4d]) by smtp.gmail.com with ESMTPSA id r4-v6sm19619qtm.10.2018.07.25.18.46.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jul 2018 18:46:43 -0700 (PDT) From: Mauricio Faria de Oliveira To: axboe@kernel.dk Cc: phdm@macqel.be, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, daniel.axtens@canonical.com Subject: [PATCH 0/2] partitions/aix: fix problems due to disk corruption Date: Wed, 25 Jul 2018 22:46:27 -0300 Message-Id: <20180726014629.30411-1-mfo@canonical.com> X-Mailer: git-send-email 2.17.1 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We've recently received a disk image from an AIX LUN that when attached on Linux displayed errors on console, then eventually hung the system. Apparently the LUN was originally installed with AIX and later exercised with some I/O stress/overwrites which caused certain bits to be wrong in just the right way for Linux to get a NULL pointer and invalid data. This is the test-case used ('--partscan' is the important bit). $ sudo losetup --show --find --partscan aix-lun.img Patch 1 resolves the particular problem the disk image has. Patch 2 improves the code a bit further (tested synthetically). Mauricio Faria de Oliveira (2): partitions/aix: fix usage of uninitialized lv_info and lvname structures partitions/aix: append null character to print data from disk block/partitions/aix.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)