Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4512167pxv; Tue, 29 Jun 2021 08:41:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkjKvTsOP0eJDVIl1xarZgcPMJOzqAgbKckGxyejHZmmcom4LwwxSmMSLI+hSTzYwa7O4L X-Received: by 2002:aa7:d888:: with SMTP id u8mr39768318edq.132.1624981298558; Tue, 29 Jun 2021 08:41:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624981298; cv=none; d=google.com; s=arc-20160816; b=zueZ4/CuT+dfu6Uo8qlOO4jl06Y5dfucmwcwqkML8ypITzfSs/p+qBReZ017ghdHBM KewXGGY49Q8YlYZ1oadtzqhyxVbJHloM/5MRWvdLXKYVKLJ16UPXMu1lsqR0KOh92W07 wXOhkIDLE9tiLGPC0eE7G9hmQzL0wpM6U2VhJG6+GNtA7RnBhqZPpdSBA5bd7REnT6ll 6wK693God2qktkl0bV/XgrI+2f4stn5RBrhD7HPtqvAH8RvnU+6TJTVh63NfWpzYu/v7 hIDlQ9OVyAOL029ApME+gIFj4pG9y2bDEpNJfk3E85nEMQgQ2oz95gDlxMhwnSB7w9A0 cq4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=koZtRUNjw4bYNAZV6JWLxfBDPL3I14Zph7TjpLy0UpA=; b=Xo8jvvl9xh46am4HI7pQsKZBUlK+JtcGSxE7+sAt9jX+5IGZSQvmOaF6vzywnzAGDR coZBc6cxSzVxhtwaKOkB/Sazqob4ArXoMsHDQAbGZhSpPYe+gtkCAAkcS+uR1LCVY9SG gmPAgrUAIGS/zMx3VIWdwyu0xQkCAMcANoDGjSUaM+kJ+Ikl+lej8xdOykizPZfivBiB QFL2p34TDA9AjNKvjaYmqzpXaY3ct3Br//qx56NR5oxBLOtLykgArregmhappwKIxTMT XotCrm45ql5PfiTXpmVeCVrYcMMMY3aXd9cJBEy/SikfgKOEiEanx5Ry5iJzUM4pQJH8 JK1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TooWxCAc; 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 cz9si18589052edb.398.2021.06.29.08.41.15; Tue, 29 Jun 2021 08:41:38 -0700 (PDT) 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=TooWxCAc; 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 S234462AbhF2OvS (ORCPT + 99 others); Tue, 29 Jun 2021 10:51:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234256AbhF2OvS (ORCPT ); Tue, 29 Jun 2021 10:51:18 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D2A1C061760; Tue, 29 Jun 2021 07:48:51 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id 22-20020a17090a0c16b0290164a5354ad0so2101202pjs.2; Tue, 29 Jun 2021 07:48:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=koZtRUNjw4bYNAZV6JWLxfBDPL3I14Zph7TjpLy0UpA=; b=TooWxCAcuEemzgn3EAdG7nTJRrAJ8QghigYKwSlw5aodIB+yRqTVWNb/aydNu/NtXX tu5CsEXgtXvvZV1mTv5tLDhZhzxxBYkrIfWauY9PlVKerJkwfNJLGYVmbJ1BMoA4QwPj x5OoXpSGahS4Wmyn9czcbO4JsI99DKFlIulK5f+SOhjBVwj8FWw7BfUUen6rtI5JjTXK ECQKFrDI9SmThzfvtmkTzBZOLUpo5FCnqjGlzeAl7yCMGmf3shsYVkjBbzT27M+ZSTPg IZvieyGuaM4YLphD+xmvrd4UMjO5QoyGLGyBezfQqdJQoqEtu73vnv+Z3LMuBYgzknBy qX0A== 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:mime-version :content-transfer-encoding; bh=koZtRUNjw4bYNAZV6JWLxfBDPL3I14Zph7TjpLy0UpA=; b=BdavNIyqzexV+rZvlRRLjaL5aoKJH5KV2Z0nl+7rVrx6f0OSMp+Z0IrNlwTmyaPAbr 2AJEMDK3zQgDALuV3aj0490MZ2aFc7iHCtimOpa0zDRgpt8aNpH7lzQx7TWL/Ge6vMDD q5wLm8i5pcvORmjiFa9tuC4cqVuKxxntUpD0Hgu0zZ54dDjQKAmpt5wjm7GDOjTcd5ch VkefcTMgcGoRr4zKIWE/grZmkHSojVXv3MTGAluKLWPIBYopBYkl4NqipJUi/TE/kByN tPLWOOG7jCXWj/3eTHtq8Z5vuSJd6xvwDfofItXVD7j3Un985vZ1k7jXs2F57EZF/ZHE 0cbw== X-Gm-Message-State: AOAM53360lDwOjV6ShttQtFuu57/VaZCBHvv3FBcSWyub3/n9R/QbN+Z sHN54EbXKLiujqQMH5H33Gk= X-Received: by 2002:a17:902:bc4a:b029:129:ef:3c35 with SMTP id t10-20020a170902bc4ab029012900ef3c35mr2788828plz.46.1624978130555; Tue, 29 Jun 2021 07:48:50 -0700 (PDT) Received: from localhost.localdomain ([118.200.190.93]) by smtp.gmail.com with ESMTPSA id i2sm3417262pjj.25.2021.06.29.07.48.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Jun 2021 07:48:50 -0700 (PDT) From: Desmond Cheong Zhi Xi To: gustavoars@kernel.org, viro@zeniv.linux.org.uk Cc: Desmond Cheong Zhi Xi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, gregkh@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org Subject: [PATCH 0/3] hfs: fix various errors Date: Tue, 29 Jun 2021 22:48:00 +0800 Message-Id: <20210629144803.62541-1-desmondcheongzx@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This series ultimately aims to address a lockdep warning in hfs_find_init reported by Syzbot: https://syzkaller.appspot.com/bug?id=f007ef1d7a31a469e3be7aeb0fde0769b18585db The work done for this led to the discovery of another bug, and the Syzkaller repro test also reveals an invalid memory access error after clearing the lockdep warning. Hence, this series is broken up into three patches: 1. Add a missing call to hfs_find_exit an error path in hfs_fill_super 2. Fix memory mapping in hfs_bnode_read by fixing calls to kmap 3. Add lock nesting notation to tell lockdep that the observed locking hierarchy is safe Desmond Cheong Zhi Xi (3): hfs: add missing clean-up in hfs_fill_super hfs: fix high memory mapping in hfs_bnode_read hfs: add lock nesting notation to hfs_find_init fs/hfs/bfind.c | 14 +++++++++++++- fs/hfs/bnode.c | 18 ++++++++++++++---- fs/hfs/btree.h | 7 +++++++ fs/hfs/super.c | 1 + 4 files changed, 35 insertions(+), 5 deletions(-) -- 2.25.1