Message ID | 20240725041223.872472-3-ptikhomirov@virtuozzo.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43FA9C3DA49 for <linux-mm@archiver.kernel.org>; Thu, 25 Jul 2024 04:13:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D46FF6B0085; Thu, 25 Jul 2024 00:13:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CF5D06B0088; Thu, 25 Jul 2024 00:13:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BBE146B0089; Thu, 25 Jul 2024 00:13:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 9E12E6B0085 for <linux-mm@kvack.org>; Thu, 25 Jul 2024 00:13:12 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 20CE7C0DE4 for <linux-mm@kvack.org>; Thu, 25 Jul 2024 04:13:12 +0000 (UTC) X-FDA: 82376955024.01.9A7621F Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2120.outbound.protection.outlook.com [40.107.21.120]) by imf20.hostedemail.com (Postfix) with ESMTP id 5DC491C0010 for <linux-mm@kvack.org>; Thu, 25 Jul 2024 04:13:08 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=virtuozzo.com header.s=selector2 header.b=qDPEp1JD; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf20.hostedemail.com: domain of ptikhomirov@virtuozzo.com designates 40.107.21.120 as permitted sender) smtp.mailfrom=ptikhomirov@virtuozzo.com; dmarc=pass (policy=quarantine) header.from=virtuozzo.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1721880741; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2AeXbBCxj90LaZ2HeuIwseUzMSII6/1xQ89cs3jkL5Y=; b=gc/Iu9OrjAV6zwVjRFn53tz9TGmZ524CdKHcQDmqZTdfR/p/w0+3rscvWBlbAR/su6xWex IF7TEuFL7cswKTwyIiq/0hgnoYU+3H40vMc0AtECXYVBJ1fVzIYGymly7PlKDZQerdq28M DbKjWqbm9DIOxqDNAR8wr5IkNea3dko= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1721880741; a=rsa-sha256; cv=pass; b=zjjSyY4354jYE6yGrKJ6TJKXCyDd+s4t2PYj0AfKh4b61GAPb+agwtm8o+rG/suy+zZxbh 4MMfpZe/E/C9YP4J5VZnJpNFE5c/yPp6GapQDfgEiotBT0mpGQkURvXoM7tNgTYKlBoqBH rR/J55/0pvVltcJRh5FPPCldXcwshlY= ARC-Authentication-Results: i=2; imf20.hostedemail.com; dkim=pass header.d=virtuozzo.com header.s=selector2 header.b=qDPEp1JD; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf20.hostedemail.com: domain of ptikhomirov@virtuozzo.com designates 40.107.21.120 as permitted sender) smtp.mailfrom=ptikhomirov@virtuozzo.com; dmarc=pass (policy=quarantine) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NWeAX2kNmshj3RCAq171tmuHWdWVcuHKAB/z4cjAyxKpKIgobmEjPj7OBmfSYAZpyxDW5r+J/65BI3umEcy2CdPdFikF4U1EeBMIETpGtX/N39ubIg8WdXUtokeUCU5nDgryjulgF0lHDvbErLrGBhOu0c3zInIFVYCTJ0yfu0LwNQltdWrW2l3bvQSdVJQTV3FglPrJN1n2Ump5QcD0kKsSEdU211yoITD/4Kodw9gxiCb4+vH7imWlVI7/rq9D6P6VobbRUYfGXcQMtbtZXEKCZFl1Pz7Vju4o7OsG23+xfLHDU2nrGVsdWq8z6s44XZMl1oyoDVS1noBa81BK5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=2AeXbBCxj90LaZ2HeuIwseUzMSII6/1xQ89cs3jkL5Y=; b=C+jf1VwjYE3AxPGfSMUpF3CJ+LyevocZTGVtoZyWt25HVi5w7julmZXIvUZErplnJnKrHYia8iIOHywggmbaEDlh4dBfa8bGXgzIkJL4ZjAxF7WahcyYUQf3nDIPbXo2a++G5BmEcbuiegioushMKKi25KjsuUGg/H0gYZQ5RJxqRjGPrP8KHZa2cPMZ4R2iekpYgW3EcjiT+WCQEvxG668VuFyPypdwuaxDkfZmwo7Brxvzv5UGkd9wZTw1RzFpb6pY0NSrGLkrYmLMmqUWp497ioXXN04/T7Azp3xSv8KVDytoK28ZUosHxL4+cDvokbEQhAlUoudbrhslum3KSw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2AeXbBCxj90LaZ2HeuIwseUzMSII6/1xQ89cs3jkL5Y=; b=qDPEp1JDVHX0mhFKI0qItgoeiqYJiCKA7h7nFcdkzDnE/0VLbpMGxXwydhQ5FU6E4yXXHiU3MOVkqQfSUyYZtHsNo+vzDlFXMoDjV2YgQ23VwQscXEeGoYjTphsIR+NbkFs9MlkcoxMpPsZzOLg/FxDAQqw9KtaYIw/+s7KrU0TBmuqkkdK2Nl7RYgn+yqR6a2Ve9PVmBoo9QY99tphmez4vdixcaTri2lHQT39R6sT1vwkYPd/5rlv7aiuEkShVj4dzswX/8FfeTd5x1dzcifaHw+IPyIsY7Ph09qXuPjVRJyjnd6rU3oQ4E8IPdM6ScnF3WuTOF7ccmzE95hOg6w== Received: from DU0PR08MB9003.eurprd08.prod.outlook.com (2603:10a6:10:471::13) by DU0PR08MB8788.eurprd08.prod.outlook.com (2603:10a6:10:477::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Thu, 25 Jul 2024 04:12:54 +0000 Received: from DU0PR08MB9003.eurprd08.prod.outlook.com ([fe80::7261:fca8:8c2e:29ce]) by DU0PR08MB9003.eurprd08.prod.outlook.com ([fe80::7261:fca8:8c2e:29ce%5]) with mapi id 15.20.7762.027; Thu, 25 Jul 2024 04:12:54 +0000 From: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> To: Catalin Marinas <catalin.marinas@arm.com>, Andrew Morton <akpm@linux-foundation.org> Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wei Yongjun <weiyongjun1@huawei.com>, Chen Jun <chenjun102@huawei.com>, Aleksandr Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>, Pavel Tikhomirov <ptikhomirov@virtuozzo.com>, kernel@openvz.org Subject: [PATCH 2/2] kmemleak-test: add percpu leak Date: Thu, 25 Jul 2024 12:12:16 +0800 Message-ID: <20240725041223.872472-3-ptikhomirov@virtuozzo.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240725041223.872472-1-ptikhomirov@virtuozzo.com> References: <20240725041223.872472-1-ptikhomirov@virtuozzo.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: KL1PR0401CA0003.apcprd04.prod.outlook.com (2603:1096:820:f::8) To DU0PR08MB9003.eurprd08.prod.outlook.com (2603:10a6:10:471::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR08MB9003:EE_|DU0PR08MB8788:EE_ X-MS-Office365-Filtering-Correlation-Id: 4ff66e0e-d3f9-427a-7dd7-08dcac600eeb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|366016|1800799024; X-Microsoft-Antispam-Message-Info: oWrM6umRGuX+BNJPoRfBGg0RpFNefsUVq6MTPYQtj4SvkZynSgkaOqh5Ens17OdmhBaGap3aYY/Gqw3U1zjJO9gH4Sh7WBJq4tOBXAKcXR1dmgVz1ek+knhysCcsd8sfkQcbdX6c3KBBsk/rO8wNq/U8xBF860zr0QFNdNEWZplV+i3TFOiUZsxjUyNrHxjOGKhr1k3WoimrOawvm/EAvZbomcXKuNUyib7WaF3gzP52Bjd6le3ai2nE4uFhP5bXJJ6YloXP7e/Zl/o/EoTiiYsLtxcP3K7PsM/o6Efx7ZPOEwUjZ4mqwxscghSRHJKLUpW27tA+k4QkqCDypDmrBqjTAMBLwSKXwajj3TBYe9Y1IAMSSDkKXZapI6twzmyhHxwkpvzx8PlGx3tNYv/yWcJkMOlhH50Ru0dOGP07z7hAzQx+CXEwo43GQZlNBGQhfFRJ8CcX3OnDDRY29Xk7Hdqj2WQglc4TuBMUNzwLemOLPQps8nU/vARaPrFlatEe2F3iG9P5e3A7ZRHkXXlK8cJJhY6eIpx+eEG9t9J9O2x1ZmojhKJWQBCE2SYEuJVsnjWwgs21uCruMdqOtdElaQAaLrOpAfY5T3wdKO4fdysL2hTljixBEu1Ym6RV6vQTviH9p6f2W1CfxMeA/lm+fsEOT7jYXwaP9+ukPDPhmFOBiC0CBKI43g/DsVZG7wamtmX8EzxxhzIRq1RwgdbHtSy/OnZ9Cp7N1FNmrgg49gJlliYMNcCK9UfFmgtXjBRmsSnDBf37BcxJyhSdpoHacpHqbiWq1/TqJxgRHdS1ormEdP1CxOcJuSxbr8NsfS+P0YobWkhD0zikNgRd1yZ6R7+ZJdMI3jBTsvcK9bo9jCBCYF3GNubCcZcY7rvMWxRHH9Qurc28iY5jPCD2TVigH8tRmQ9ZsrXIqTrJz1+qygJB2JxhiTJLgA4/H+owJ4zLAzuV0QS4L3Fh52C7BzhHqAfFjHLY+s5G3hOITAxNA5chz+RY8VBd4v6JLIeCvqdVunTxj8MoCesY4eknI838nR+XOu2315KmD14fePqbKERBiLrzyAw3QyjnBa+F8/jhmEPTvfBSQSs8Kz+/OXJRXoSlgPI/wGgcw7X6OBJmdsFPXoLt2Tuc+KP+g9pPjU01fmdbfVXOroRTu1GyfO+WosO+wjKu76Eiw/tDzxfucWFOltwb0/UKgkB72Um5T11Zr+BhgaCsxjrYV/hTRAgoh+fIMBlPDUrX8jw5OJMbOt0j9wN19TfTUcFg2/iu5tmFQrcadlCEafgqk1/0P4VvJohM9CW3djAIDix3ssTTC2gCAwCcOWTjK/dp4ucebGNYbx+V3UK85IdP8ctP0CCIwQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR08MB9003.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(366016)(1800799024);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Z4wWr+metem0glRNrypD47wn5W+PSn1fg0ZWe5Id+KjTAElgCFbjX/spkfqrqD9fljtXHecvG3cvEAhq3eMq5ilCbwmuxp2SFkmOrGFDM6qdlyge0wBfRnfw5FORB2KY0Y+4/pd37e4asD4ZGMfldHq+CSrxPQJR18PCTKhYP8yHXewH+1peEmaTG/vAUW0q4ZzCRfSy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IAYLp77KiCbF0TbKKfieZ9/9r7q5fPebNbYxpd+NALKPVsw08NoAti4UC3v4acMj3XwR1J6b3i69v+9Rx9buJW4b0rAiLtTtbUuEG5Va3/TagJSZP2B5Qa2WwnKGm8Js41nOPQiEhh/VdHwKI4QxDzVa2DSDysuG8Y5YVUSUCQlr0KXi2NSmi6/XD2IfyemE30RlhTVqd8f/8Yl66L8BG5r8TjnHhL++NhAeJ1F5dmAbleWEYeFfY5xyZunq97kyJYUHv3rxxU9MhBTWVBN0TO+Wr5rcCZWDXZCmYX/HQMwKiLhvuZ3g7tO7VKvwi3IhY3+YU/tL1r1YpZRe/WoCuv+wjmysOZVLeh70xjV55C2hZw0JsvAMBi4uZdyNEGFe+dnDk92Ua1SB3erJC2IExRtYMqthzg== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4ff66e0e-d3f9-427a-7dd7-08dcac600eeb X-MS-Exchange-CrossTenant-AuthSource: DU0PR08MB9003.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2024 04:12:54.7955 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /8tU6St0EYov7MYFNFwvAP+s/moCDzSBKBTFWg43mD00zNiEMWL1OjHTa9mE40uUyn+tjroSyw+xNB21M7UNuOfQe2IsS4cTuwQyjR0k0BI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8788 X-Rspamd-Queue-Id: 5DC491C0010 X-Stat-Signature: uwt7cbxcr9rq4e85y9dopq3tjnud4r6f X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1721880788-573844 X-HE-Meta: U2FsdGVkX18uCayiYfw3WqNU155qGrIWQiQuGllYRR+W6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ux7YZ6rNETen6KxwSGKR+K7sOgObj+bTH7+pNW0l24+XQ58N0/PI2Yl7TOf2igzrdgmJNkzptOZezdygI8VGeuhD9ww7Rkbnbs1Gs9Ov9alUdHW5cp413ScY++npg2vuOuSlgK0KB2HRbIJWseFE0lIDlt422etgFX8WX5NuVmhVbdDNaLg= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
kmemleak: support for percpu memory leak detect
|
expand
|
On Thu, Jul 25, 2024 at 12:12:16PM +0800, Pavel Tikhomirov wrote: > Add a per-CPU memory leak, which will be reported like: > > unreferenced object 0x3efa840195f8 (size 64): > comm "modprobe", pid 4667, jiffies 4294688677 > hex dump (first 32 bytes on cpu 0): > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > backtrace (crc 0): > [<ffffffffa7fa87af>] pcpu_alloc+0x3df/0x840 > [<ffffffffc11642d9>] kmemleak_test_init+0x2c9/0x2f0 [kmemleak_test] > [<ffffffffa7c02264>] do_one_initcall+0x44/0x300 > [<ffffffffa7de9e10>] do_init_module+0x60/0x240 > [<ffffffffa7deb946>] init_module_from_file+0x86/0xc0 > [<ffffffffa7deba99>] idempotent_init_module+0x109/0x2a0 > [<ffffffffa7debd2a>] __x64_sys_finit_module+0x5a/0xb0 > [<ffffffffa88f4f3a>] do_syscall_64+0x7a/0x160 > [<ffffffffa8a0012b>] entry_SYSCALL_64_after_hwframe+0x76/0x7e > > CC: Wei Yongjun <weiyongjun1@huawei.com> > CC: Chen Jun <chenjun102@huawei.com> > Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
diff --git a/samples/kmemleak/kmemleak-test.c b/samples/kmemleak/kmemleak-test.c index 6ced5ddd99d43..a165a4d13137a 100644 --- a/samples/kmemleak/kmemleak-test.c +++ b/samples/kmemleak/kmemleak-test.c @@ -79,6 +79,8 @@ static int kmemleak_test_init(void) per_cpu(kmemleak_test_pointer, i)); } + pr_info("__alloc_percpu(64, 4) = %p\n", __alloc_percpu(64, 4)); + return 0; } module_init(kmemleak_test_init);
Add a per-CPU memory leak, which will be reported like: unreferenced object 0x3efa840195f8 (size 64): comm "modprobe", pid 4667, jiffies 4294688677 hex dump (first 32 bytes on cpu 0): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace (crc 0): [<ffffffffa7fa87af>] pcpu_alloc+0x3df/0x840 [<ffffffffc11642d9>] kmemleak_test_init+0x2c9/0x2f0 [kmemleak_test] [<ffffffffa7c02264>] do_one_initcall+0x44/0x300 [<ffffffffa7de9e10>] do_init_module+0x60/0x240 [<ffffffffa7deb946>] init_module_from_file+0x86/0xc0 [<ffffffffa7deba99>] idempotent_init_module+0x109/0x2a0 [<ffffffffa7debd2a>] __x64_sys_finit_module+0x5a/0xb0 [<ffffffffa88f4f3a>] do_syscall_64+0x7a/0x160 [<ffffffffa8a0012b>] entry_SYSCALL_64_after_hwframe+0x76/0x7e CC: Wei Yongjun <weiyongjun1@huawei.com> CC: Chen Jun <chenjun102@huawei.com> Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> --- samples/kmemleak/kmemleak-test.c | 2 ++ 1 file changed, 2 insertions(+)