Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1978333pxb; Sat, 22 Jan 2022 12:01:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzoWyFay7n8bb9iM039NtTcIUZObhpnO9vN6z8EMF6TuNIgGkMzaiNemOpal5pgu/aEARcP X-Received: by 2002:a63:7d4e:: with SMTP id m14mr6856897pgn.514.1642881672965; Sat, 22 Jan 2022 12:01:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1642881672; cv=pass; d=google.com; s=arc-20160816; b=R2Wp+FugROCCAP7MwzZ5JZ4922f1TXJVgKOekedY3gRuDHLBX9ZVMYVHUKwx34qSKy GAtkcwWH0ulPC1atePSyyWcSCTOMPKT1BBx7B9th6AuFAgTbMxlEqrSxDoF12t0NQ3i8 62mzuOE07xFwlslZtT30VskQoVE5QGU1chuwRw2nNTRrgFNZA7a35XM8NIk0PrCmVDNJ 0Ch8mVzDuUd1zMn4hRy5IN7Cq9xLjtGihuji0dyS9ch3ORfifsfgZJm6gk6s4eMm9bk1 L0VIgGjy2WWl+di+gVeNiUrj6x29Fxz7fYTzc7nMvGmHBrhqo9KLI30Cm/h6FV/FyJwa N76A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=csOGeUerndB/exQwBHTXHTvA3zR/xmGXpFV4dZIU2wQ=; b=PLc1lyp27QXvRiqwoPb0PFNgeYr3ITfgTrGXVqQVYVPTG5gjMoMKwa3fqch1+UXgHW jHKCL48GY1MP5ATY5eTBSE9FluPIPvlpI9michoa53ZO1Nos2yqqq3HlwBSPEy++Aj/B ZA2ktVWN/4hFsTDZjjFqwZWZax+dayQPMbOand/3IB0tYuBd5MnW5+Gg1s96vdWF5tAO OuPzlIyOwGAAEYcJnkLew5cxObTTIBdAi+B1DqeZR7S+K0+eg6xBxEzuJ+0b1HNku6jm 8gnx/tjOyETH17y4vV6IjDd4CGRKOSf3c1s8o0tvykIxbwTyg0TEO906SLY6vIeNrOYn WGmw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=rV1v+7Hc; arc=pass (i=1); 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=fail (p=NONE sp=NONE dis=NONE) header.from=in-advantage.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f14si8797668pgi.716.2022.01.22.12.01.01; Sat, 22 Jan 2022 12:01:12 -0800 (PST) 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=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=rV1v+7Hc; arc=pass (i=1); 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=fail (p=NONE sp=NONE dis=NONE) header.from=in-advantage.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231195AbiAVA5A (ORCPT + 99 others); Fri, 21 Jan 2022 19:57:00 -0500 Received: from mail-bn8nam08on2114.outbound.protection.outlook.com ([40.107.100.114]:63832 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229457AbiAVA46 (ORCPT ); Fri, 21 Jan 2022 19:56:58 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D3OlRgJWRiGIfXO1c1YtCVdEiEBmf7HxfH6ewbhr877RLANDPRmV6JPiZBfhU5PFnXhjwRXN+yJkKo/HGZTHDnGtZUVxUNliML5prLtgFr0mRVmC60JP1VbPQHsEPDZ3SJOsZAVObr5tYynfFbWIfZ1XgWPzc2ONwuGUrK3PMcEk5/k9WTy+bUj3bqmXL+Zo01f2O3NQreHKpoB5+OvxuLBEwPKIQ2EZ5XSQw5WVgVr+Z78Vsx6UxzA6iMEYeJ47yKDTXkxp8i5kYzEAD+R25S5WQrOKjiQa338bNw16ieRwAB057VnzNTtzlWX1wpzhsJPIDS6JFqF/+A5OvJjwFQ== 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=csOGeUerndB/exQwBHTXHTvA3zR/xmGXpFV4dZIU2wQ=; b=WhEIMsyhOG70zWOuk1uSNIzYt3SJL6skFzlE+1vhsGZ+efQdAvvuTriI0Vy8x4zSQwiaAzCloNNmE/da75VroEZJaL9GTh4OHahc1z9ia+WIp9QbfAaqUvMPv4UXNg7Fy95wIs/rgJwzbWOwb+BbjtMFXiAaAJMaAmUNt5jz+9LQhFM5l+1UO2zUUYlzMGaY/O0FLQzIgxZz7OHzIMzbKilk2fZjAxZFNIlKArc6XzVzq4cMdo62DIP6ElSTgtDr82KPTUuR6DWHQzH8GKeJZiDhvLz3+U7EedEJweksNz2p2GgczB2LfAyjaYa4AXiF8wXU5O2CBsWURFtOvpHVkA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=csOGeUerndB/exQwBHTXHTvA3zR/xmGXpFV4dZIU2wQ=; b=rV1v+7Hc5lN5mrIlZPZN95ll9aTK8iSgFop0ZrMUgtidcb7t3DGJLDCTomtQ48/aNp1XBov7y7gfenF+07Swfn033lQnrDzl0QogvoXP0nlnjIoxaTI5em0t3i9TKymbs/izLbmzArG+5AGBTxZf6X75pmqx1K1xBXxJ8K2A/2U= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by CH2PR10MB4022.namprd10.prod.outlook.com (2603:10b6:610:9::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.10; Sat, 22 Jan 2022 00:56:56 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::2d52:2a96:7e6c:460f]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::2d52:2a96:7e6c:460f%4]) with mapi id 15.20.4888.014; Sat, 22 Jan 2022 00:56:56 +0000 From: Colin Foster To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , John Fastabend , Alexei Starovoitov , Jakub Kicinski , "David S. Miller" , Ilias Apalodimas , Jesper Dangaard Brouer Subject: [net RFC v1 0/1] Fix NULL pointer dereference in page_pool Date: Fri, 21 Jan 2022 16:56:43 -0800 Message-Id: <20220122005644.802352-1-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MWHPR13CA0030.namprd13.prod.outlook.com (2603:10b6:300:95::16) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 30ce11d3-6d89-49b1-c4a6-08d9dd421642 X-MS-TrafficTypeDiagnostic: CH2PR10MB4022:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R+vJo7dz34uFzwGnDuDWhHc9Z92CGv027799U84gADJWXqzpxSwHIlbHRP56Aijge95pCni+/lTiZF+p3PNKILodeZfI9nmn9aG2FIvjtoUrb4b2DIFQusvmXksy1ybCsAUZ6O7m3kFaWmAnBavF2AXeF/+ON2s7iE1mwzOn9hgBayuM2UBGAb+E8mhco9E0mmE3IGVOIKNtRa3zdZuuJ2QEmg1hL5SY56udCOYMyQad7WjPMzBfxccFu5CKdbZtNc6QIx5AmF+fWBW4r2Ch1v/1Es5dt+RXH9XMNHQ5Ja3YUGLyOG0L2oEHsDOVGTmO6/KDCoRb4iAE6WmqIPz3ApTl/286O3YbZZ49Ucx4T4cithwct6flKUAoL79RPqqF6heLdRDiatIZP2GaAuva4AxZev6J6ikTT5O5TvHG+BiWl1hU1Zp/eZrdjnlVcUIMduoXiSPUILkR9E+LQvkO6nHFzW1OKnnOSROwQpoJRFapg/pAxCbY+URgh8GcF2DppZoB5k4uD6mHbh6IzLAoTPOQUi7qAS9WA7C6STllTRAQ25wNRg2XGX6qIsKOlARzUpQO+AHbQiqH2YSChj1CRYa0YRad5dzdD/7QjYqe7sXqTZ8pVMdOjlJYQhgsJmzFvGVgJlErJOFmPVaZVrpfOF6/j12IWhdCGhcTz84KVhf5dSUO16Ujp56l77dHhT/BFesNqIOVhI2KIoDtpbDwVQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2351.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(42606007)(39830400003)(376002)(366004)(136003)(346002)(396003)(2616005)(52116002)(2906002)(44832011)(6486002)(186003)(316002)(8676002)(6512007)(26005)(54906003)(8936002)(66946007)(66556008)(4326008)(66476007)(6666004)(4744005)(83380400001)(5660300002)(86362001)(38350700002)(38100700002)(6506007)(1076003)(508600001)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?C0MSiNsITuz7Y0YO7jfZ5P2AMzOhZBwiRhM1gIfceVj+ZXCOMLGwueN3QAYj?= =?us-ascii?Q?rJm/hDyH07rFTPzJDCXJw5rJO+ddJtXvDL7/fGTbmGeSAD/+Pf3xKyir0BzM?= =?us-ascii?Q?Hqe3QFdDNb20wbJJ6482xoeQZV/Tp8lJvINF28eQE0GwhWlleSIly0tDZhSp?= =?us-ascii?Q?4CfC8XH5/3fC5DSgbqTUnGTR+gik+NbfoKU4FkN5C/Kt/TQMcV6XgnpaZV/o?= =?us-ascii?Q?mf+KNiLf4cb7122ft/WypKa2JxbpmtJ17FxNKUNsDJ2J3Ds0HaVtLeJzhvpI?= =?us-ascii?Q?VnrPpx11ydF/V3a9+18MZqQOG7kBsCywgOA1x2jBYNiHXWff38FxlipNp49/?= =?us-ascii?Q?yXYmh4ZNhr4dvw+bCtlbrECFqP5HRl64rBWWcVW7S3+WnfYgEBdQdo4emhIF?= =?us-ascii?Q?Syx3g5xTCHpjngvx2/UpisAKC5GAHfcX6/gGx/FOkSLXaht19QNgO20HwGmJ?= =?us-ascii?Q?wMgQUURqWGpuDbSsUUpdqgb9vLoSFeaOL7Fo5ZQqIhZ0BdxcCwiLtJ3Xiyhd?= =?us-ascii?Q?1BBaOm/MiWHZBqLrMI5NMt3EdfK9w7XJVVzbmW0CyYJFWsKDohWf71DoIkLj?= =?us-ascii?Q?uoF4ZpXwuqJoLAe20bOEMnovJ2020bgQNYfPYdeGs+e4lJjYR5mGPAzBfMPx?= =?us-ascii?Q?GhjNsFVruMsDxI9i6gxR1Wo69MgEZtLpS5sWTVaN5n2VFTeLuYevjoqHp+mn?= =?us-ascii?Q?Rb4xvJZDEFITthAK96Y0vXdCo39WUkFWOFeL2JE8kiTbS+rk7fdpy2rmfZYM?= =?us-ascii?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3EDhxtQ9sh?= =?us-ascii?Q?bAQfxA=3D=3D?= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 30ce11d3-6d89-49b1-c4a6-08d9dd421642 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2022 00:56:56.3971 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: g6bYoowf37FopHv4deTvw1oIBsM/mYblV+kneUnnaA06xzM3Thr1JctU2/P7S7hNwPJBHdmif9pEjnS18AggueAIbIDP+I5CMLghfDTxGwU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR10MB4022 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I'm not sure if there's something wrong with my config, but as soon as I run "ip link set eth0 up" I would get a crash that would invoke a seemingly endless memory dump. git bisect led me to the page_pool, where there isn't the existence of page_pool_params inside of the pool. Therefore the check of if (pool->p.init_callback) would cause a crash. I have some out-of-tree patches currently, so I'm not sure if my case is valid. Specifically the MTU of cpsw_new has been updated to 1520 to account for my setup (beaglebone with eth0 as the CPU port of a DSA). I'm also not familiar with much of net/core. If it is valid that page_pool might not have page_pool_params in a DSA scenario, then hopefully this patch is sufficient. If it isn't valid and something I'm doing is invoking a memory issue - then I've got my work cut out for me :-) Colin Foster (1): page_pool: fix NULL dereference crash net/core/page_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1