From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 143FBC433EF for ; Thu, 9 Jun 2022 03:44:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 52ECC6B0073; Wed, 8 Jun 2022 23:44:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4DE5A6B0074; Wed, 8 Jun 2022 23:44:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3A5D96B0075; Wed, 8 Jun 2022 23:44:23 -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 281536B0073 for ; Wed, 8 Jun 2022 23:44:23 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id D59FAB15 for ; Thu, 9 Jun 2022 03:44:22 +0000 (UTC) X-FDA: 79557304764.07.4F7F460 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf15.hostedemail.com (Postfix) with ESMTP id C9059A0050 for ; Thu, 9 Jun 2022 03:44:21 +0000 (UTC) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LJVHZ3v74zRhVr; Thu, 9 Jun 2022 11:40:58 +0800 (CST) Received: from dggpemm500001.china.huawei.com (7.185.36.107) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 9 Jun 2022 11:44:11 +0800 Received: from [10.174.177.243] (10.174.177.243) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 9 Jun 2022 11:44:10 +0800 Message-ID: <44530040-0384-796e-143f-b7293886753c@huawei.com> Date: Thu, 9 Jun 2022 11:44:09 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [next] arm64: boot failed - next-20220606 Content-Language: en-US To: Vasily Averin , Naresh Kamboju , Shakeel Butt , Linux ARM CC: Stephen Rothwell , Linux-Next Mailing List , open list , , , linux-mm , Andrew Morton , "Ard Biesheuvel" , Arnd Bergmann , Catalin Marinas , Raghuram Thammiraju , Mark Brown , Will Deacon , "Roman Gushchin" , Qian Cai References: <20220607162504.7fd5a92a@canb.auug.org.au> <2a4cc632-c936-1e42-4fdc-572334c58ee1@openvz.org> From: Kefeng Wang In-Reply-To: <2a4cc632-c936-1e42-4fdc-572334c58ee1@openvz.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.243] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1654746262; 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; bh=bV0M63VTu5gLkZ/3CicoprVdCbkOcS1t74BkefZF/2M=; b=pxqDFdi7jEokhoQtVpFGaW1e2UCMoGAETDY6hUZyJiUgaABwTGgVggFIh9JXd0K+iQuR85 y+u/Ul282wEbNZ36nFLAVflehL9Om4PyKU/IJVkNvzt+8jjI3hoQrNx+LcV8SBq1NYJ/yp epTD2nUa2fbYW58ga3HmUH5awqy4Pmc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1654746262; a=rsa-sha256; cv=none; b=8CfMVqRZP3tCWBp2v3hvxEejp3ZcwzSiWghnQ/tsbEcO0uPBZgLFGdZNg5S2txiWYqMUNf A+A9wlsNcftkHMxY2PEiAqcYIw+tfXMGCKz6hqyUwq2CPARTaS/oiPo5/BKoUzl2Ry9r5w 4X0BrBPnFnO0Gnh3UM+9MNF1801RSdk= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf15.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com X-Rspam-User: Authentication-Results: imf15.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf15.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com X-Rspamd-Server: rspam03 X-Stat-Signature: nnacepicg6476twuz453cuijztjxcqn3 X-Rspamd-Queue-Id: C9059A0050 X-HE-Tag: 1654746261-242254 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: On 2022/6/9 10:49, Vasily Averin wrote: > Dear ARM developers, > could you please help me to find the reason of this problem? Hi, > mem_cgroup_from_obj(): > ffff80000836cf40: d503245f bti c > ffff80000836cf44: d503201f nop > ffff80000836cf48: d503201f nop > ffff80000836cf4c: d503233f paciasp > ffff80000836cf50: d503201f nop > ffff80000836cf54: d2e00021 mov x1, #0x1000000000000 // #281474976710656 > ffff80000836cf58: 8b010001 add x1, x0, x1 > ffff80000836cf5c: b25657e4 mov x4, #0xfffffc0000000000 // #-4398046511104 > ffff80000836cf60: d34cfc21 lsr x1, x1, #12 > ffff80000836cf64: d37ae421 lsl x1, x1, #6 > ffff80000836cf68: 8b040022 add x2, x1, x4 > ffff80000836cf6c: f9400443 ldr x3, [x2, #8] > > x5 : ffff80000a96f000 x4 : fffffc0000000000 x3 : ffff80000ad5e680 > x2 : fffffe00002bc240 x1 : 00000200002bc240 x0 : ffff80000af09740 > > x0 = 0xffff80000af09740 is an argument of mem_cgroup_from_obj() > according to System.map it is init_net > > This issue is caused by calling virt_to_page() on address of static variable init_net. > Arm64 consider that addresses of static variables are not valid virtual addresses. > On x86_64 the same API works without any problem. > > Unfortunately I do not understand the cause of the problem. > I do not see any bugs in my patch. > I'm using an existing API, mem_cgroup_from_obj(), to find the memory cgroup used > to account for the specified object. > In particular, in the current case, I wanted to get the memory cgroup of the > specified network namespace by the name taken from for_each_net(). > The first object in this list is the static structure unit_net root@test:~# cat /proc/kallsyms |grep -w _data ffff80000a110000 D _data root@test:~# cat /proc/kallsyms |grep -w _end ffff80000a500000 B _end root@test:~# cat /proc/kallsyms |grep -w init_net ffff80000a4eb980 B init_net the init_net is located in data section, on arm64, it is allowed by vmalloc, see     map_kernel_segment(pgdp, _data, _end, PAGE_KERNEL, &vmlinux_data, 0, 0); and the arm has same behavior. We could let init_net be allocated dynamically, but I think it could change a lot. Any better sugguestion, Catalin?