Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp20707pxb; Wed, 30 Mar 2022 21:43:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDrwEeDHBWj71CxRe9vc4ok3mxYrn20AQ9E/l8TKssPzgf9Jdc7gdwGXObEiqR7VuPyzjo X-Received: by 2002:a17:902:b70c:b0:156:16f0:cbfe with SMTP id d12-20020a170902b70c00b0015616f0cbfemr3470636pls.152.1648701803276; Wed, 30 Mar 2022 21:43:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1648701803; cv=pass; d=google.com; s=arc-20160816; b=sGKWrN+tapTc4xj1H3HMKD50er95kG1GEfozsJhhqUdMWnKxMbim7ftT+y9GOt5bMH Ycs8o6rR9H04FDfyapdGWaMQmpjUIuf4Kgy+5ci+PKRb3iHmd2Nrh7WZtXr9MZVdu3Bm 5DKY5tEryDFRe6XRsDYl8eNNGti1NRxztcPnMpOLokfwIgQjxvtWgM5estHdRx36wgIG m5RCe21cOL7x4A8xuzz8XjjKsSnsyaucfUujqxQO+VihH6klLrtwzkNrioMH+Uupvi/2 MRVgfZAvz5I3XU+M3RbQOCfPdgVqwGfAC1FBFrG664j/jk5SnjlB4RXNyr+TAgNUdBN/ qCSg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DL7meHWL8ryXYZn9Aua7YjberUh98VRP2+3eC4HHATQ=; b=Gl3XlY9NpOoqVhhAXcXoyb9hkbjIRIPzzvMKm0jKRvKhB98nS6gcs+XIVnkjUT1vAI zwbxCgjjrEKJU/feZe8mI/W+cF7JAEFTk9amNB/B0T6GNyUWX0fwIrGY6L6iDEOJq06U Geduz+3QHeMZ4xeutt1CQGO9EoKTB9snwSvE9Lv1UQrGND1gxO2CtsUtigXu+QqKnygU VfYhxKDBRHPtSi4/FiTqaf2FfPIbQUQYGR7DjVtNMAR/44xtGNgUaqcA97ViJAH3W1Zo bgWt7IUHErdOnL1tn83iODKdcLsmDeglhXPg4Ej+ra4ZC6DHP1uS5bpcfdYuTmW2fTKs yIbQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=UI+Xih9o; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x5-20020a63aa45000000b003816043f0e2si22803167pgo.727.2022.03.30.21.43.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 21:43:23 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=UI+Xih9o; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4AB522742B3; Wed, 30 Mar 2022 20:40:22 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346803AbiC3OZc (ORCPT + 99 others); Wed, 30 Mar 2022 10:25:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346792AbiC3OZ3 (ORCPT ); Wed, 30 Mar 2022 10:25:29 -0400 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on2056.outbound.protection.outlook.com [40.107.95.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FC911FCD04; Wed, 30 Mar 2022 07:23:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nQoXEms3mzbjQSWQZ/yREaolKNcUYiV9txiQSdAraOOtEM0NS42C246wNm9BbOwcrjlZ5DzFE6FjMBZllol7ZFZijbkcZtwaBdGwBrGyjsZFt1+T3RFXS3FGGCdeVcfHNHEU0yd7+kpOVNYYrh2T2KCZI/ZohL+dOnS6GEuPTv3gd9mCLXueQ8y3x+ndkh9Ac44QeLzPgZJsG4Y2hWOqDjj3ds98p7QuQcoQql2/T1G+hexFl/ZoNfihMvdcMk8HdqVDLq4b2fFq8Hr6to9RKlkTjEt0MpMVuSZirsWtDbh/9bUvmOsxVIGgTek77NlO6qLgV2UQpE5MWJI8JaNxJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DL7meHWL8ryXYZn9Aua7YjberUh98VRP2+3eC4HHATQ=; b=Um0Fn1wkw6nI5JH0FCKSEO3QmF2hZHOsw3C5TFlYqNvyP6DIi5BUnRLbfazB0cPtKTjQuLEKX1Z0zF1dtyuLhomDcs4g0qm+ce5VX/QxcmAzl4vOELnTjVHhQj9dCDeFcX9dXL/XUUqwSZbP7uDX6jYxTz6fkoLpGPM/o/yb7gIvoYjtmZd/fis0iwayN2cxFcEe9Kb9xGvlaqRTFgoti/JV7u9Tlid+0J+KrhF11P3gfsE0l0aJlauduStkKlPAtiA3HfcLx6FGveBoo5lT/o9oduNd5Z3Nndv0dzplpiUQRNt+3T8Yxrbq82na01G5uJj6q+Kp1QI6dL4FSlxXWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DL7meHWL8ryXYZn9Aua7YjberUh98VRP2+3eC4HHATQ=; b=UI+Xih9oxU9aF7UwmghQyue2sDKC8IL7mjr7J64n9yERKz+Z0fKuSuKucL1uefpTjOu5gxJi6z8fg4eCDaJh1JrRq0/RQId5H91pghK2UKMSbIrBy7mYkpeMZ4MT1EYKmMyv446S0DO/Mml7wHeHl+2G89UJEp/lQv4zCUkAgs9B0LKcxRKyvNs02zT3l6Yr2ioB8TDolvnCRWMZml3pgYn6TQkhsjqy4LiBwIrUsopYceHtFo0+4nI4sKLGqHEmrUoz6L+ccjNWd1Y4dVct9+rkICvkBWdB449Qjzck3K+veelZZiJ+Cj4QIZM6DttPuVvIySGS7yLRpVVhn/8j+Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB4192.namprd12.prod.outlook.com (2603:10b6:208:1d5::15) by MWHPR12MB1663.namprd12.prod.outlook.com (2603:10b6:301:e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.16; Wed, 30 Mar 2022 14:23:41 +0000 Received: from MN2PR12MB4192.namprd12.prod.outlook.com ([fe80::11a0:970a:4c24:c70c]) by MN2PR12MB4192.namprd12.prod.outlook.com ([fe80::11a0:970a:4c24:c70c%6]) with mapi id 15.20.5102.027; Wed, 30 Mar 2022 14:23:41 +0000 Date: Wed, 30 Mar 2022 11:23:40 -0300 From: Jason Gunthorpe To: Tony Lindgren Cc: Lu Baolu , Joerg Roedel , Christoph Hellwig , Ben Skeggs , Kevin Tian , Ashok Raj , Will Deacon , Robin Murphy , Alex Williamson , Eric Auger , Liu Yi L , Jacob jun Pan , David Airlie , Daniel Vetter , Thierry Reding , Jonathan Hunter , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Christoph Hellwig , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, regressions@lists.linux.dev Subject: Re: [PATCH v4 8/9] iommu: Remove unused argument in is_attach_deferred Message-ID: <20220330142340.GA2111031@nvidia.com> References: <20220216025249.3459465-1-baolu.lu@linux.intel.com> <20220216025249.3459465-9-baolu.lu@linux.intel.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: MN2PR12CA0006.namprd12.prod.outlook.com (2603:10b6:208:a8::19) To MN2PR12MB4192.namprd12.prod.outlook.com (2603:10b6:208:1d5::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d1eba7fc-a0d3-4914-2476-08da1258e38e X-MS-TrafficTypeDiagnostic: MWHPR12MB1663:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MB+qZbPNXK/x2UGxY2DZChLd9OZf+ksg7c84J5NoxBB4q7ZXBRIW5OLncW4Lh0M/NEhF5S3gZXY9ALR98wd9HfTdn7EaWfZx/CurT68f1+WhNwpZunG6Lc983Sau1yvE0sHzGfanUpwqRsycx8Lr561Ho7KuRN849d/FGTaS4ahm7qKUK9cCSXrutPTYOUOIAywmJTHo98juqeiMA2GoXajIPhejXKz0i/tfI1DCifNWNBOsmv+bkEsgtfifhrYQdzp/P64mtM04WPWTO/pIX7o9jarF3/SUAbLUHCmbfaaxAIR+aMT6BqWg+fXaV4znvziVa+gVOodQBl/KfhjVAounUUxQ5KU1+jpinnQndV2hnSVaJ7hJUpcM9Q6PzI+RuskQJBMebkwA2cJcj+nAYA48TOOb3riCQ0WMGSzO8oU7D+mUP12ePCiLmgn94A4GaD9POIaRPwIKcJfcIy9dallSKbXciKXMLRLTZWM+v/AdQdTGW3bSWoqR+nQtL82aA2F/3oMHWmaJxhnXMjxXTlAE/j0Xn73TYd6TMWVytzQKWZQ4fKw5Ee8Aer7+LX/0g/rVa0Z0LrNhhn3wlHioJHGp/fvoiM+LW83m+c0C81lSZJ49QUnbp9ZYXF1s8pd46JD81d2dvcZt6C115X2l3w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB4192.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(36756003)(2906002)(2616005)(1076003)(83380400001)(186003)(26005)(8936002)(5660300002)(4326008)(7416002)(6486002)(508600001)(54906003)(38100700002)(66476007)(66556008)(66946007)(6506007)(6512007)(316002)(8676002)(6916009)(33656002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?XtlpNTlduBsNL9wn7QgF1sLzYlA+FLjTfeFRR5zVgdv5LwMBAkAVf8/z0Bjr?= =?us-ascii?Q?ZkqRtJdxfxM44cNfqxm5OhWku7YAP6Az8KxHbZBXGbxSlqIfae8qB7pnpZp5?= =?us-ascii?Q?52m31HdCXuqQhFDO+IV+XY4zGH3omJF+/IsCdkH6hcQS0OWkVZVSiS3JCdzS?= =?us-ascii?Q?xWRuKJIs4BzClkqRqqLPKAzVg7BsrzX3yfJ4LEsIR2+Lt6kavJEr0iaOliky?= =?us-ascii?Q?KNK/6r7eoU/3V0h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lgon?= =?us-ascii?Q?4qLFx413Hae/Df/hvGreVyCVaqnatvcIfFZEsXIl3meKSl5eq09OmEhr4gji?= =?us-ascii?Q?pZ6UtqrqqoSYKwnj4knaWMam4ECh6JMv1qGvyQntgpQxoWFI4U0YldUG/PFQ?= =?us-ascii?Q?M0nHoi8qtLcKwsWTt08ufFmTsSuk1kHzBJJ2RAqzAJB3MXy69Jgt8AXWbGvA?= =?us-ascii?Q?3kIQ2cij0fdI27u043MhResmQHYXjYjBU/aumsxOm1xLIwvqPBHQ8yDBP3xq?= =?us-ascii?Q?KZXbryiwP0KhRwRTxErl/aDjAGiGgyq0BpnmVGwhcMulICG/VHTGkw5/MR98?= =?us-ascii?Q?xTZtan26KlwPjETDZssLXskjDfXeLFXx8UaFv6SlxBemFqSmucWDXHZ1R1gR?= =?us-ascii?Q?svdDI55hZbRdlB/W0ZDiFp8jHLbweBASK1ZzfdcGn5H7raiqSQN8HGyCOIoC?= =?us-ascii?Q?pOlWoKhaBfjtFuZGN09QreCEec5TfIL4h2rNTqG6V7CE/0KWsyVp8Ny2gbBh?= =?us-ascii?Q?Bg4u109t57pm1DjqPCdQHdj5CSKDL4ddSIiZkZTxk7b76A9ebipD9fl02qGH?= =?us-ascii?Q?UddtVoAZdYtrGQRDBTTsh+JzFD4wUGQFVjSgIK1e4I06/RTxXvt3iBe5g1wz?= =?us-ascii?Q?skfvN81kfQ=3D=3D?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: d1eba7fc-a0d3-4914-2476-08da1258e38e X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4192.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2022 14:23:41.2699 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0+l4O1enbSUCT3SyT5EX/NOs+DXeq526DJ/oaj6YncDTCkhkEZkneZ+P+L7SG3Rw X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1663 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 30, 2022 at 05:00:39PM +0300, Tony Lindgren wrote: > Hi, > > * Lu Baolu [700101 02:00]: > > The is_attach_deferred iommu_ops callback is a device op. The domain > > argument is unnecessary and never used. Remove it to make code clean. > > Looks like this causes a regression for at least drivers/iommu/omap-iommu.c. > > To me it seems the issue is there is no is_attach_deferred implemented, so > we get a NULL pointer dereference at virtual address 00000008: > > __iommu_probe_device from probe_iommu_group+0x2c/0x38 > probe_iommu_group from bus_for_each_dev+0x74/0xbc > bus_for_each_dev from bus_iommu_probe+0x34/0x2e8 > bus_iommu_probe from bus_set_iommu+0x80/0xc8 > bus_set_iommu from omap_iommu_init+0x88/0xcc > omap_iommu_init from do_one_initcall+0x44/0x24c > > Any ideas for a fix? > > It would be good to fix this quickly so we don't end up with a broken > v5.18-rc1.. > > For reference, this is mainline commit 41bb23e70b50 ("iommu: Remove unused > argument in is_attach_deferred"). Are you confident in the bisection? I don't see how that commit could NULL deref.. Can you find the code that is the NULL deref? Jason