Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4304510rwb; Mon, 31 Jul 2023 05:05:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlEo2BBwlJL6rcTPAnpQbSJwE2CM4iA86zc1Gl7Hl89vbOqH/i9GeV9vt0VGzY7BL7N1WwrF X-Received: by 2002:a17:906:2216:b0:99b:f3d1:7735 with SMTP id s22-20020a170906221600b0099bf3d17735mr6145578ejs.29.1690805150903; Mon, 31 Jul 2023 05:05:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690805150; cv=none; d=google.com; s=arc-20160816; b=WHLP+KXBJOhT0nDtj4WDRoWTplTiZ1A7XfsfddDPmK4RKPGdkjIZmTOTULUUr3AlkP I1gF9BzWL2L1tpsS9uYGtau7/c4NXZ9PL2Q6m3/hoKllvjhYFCFNMimD2+EaswDb3BsR UA+UsRNh7bLtMTwDXjrn78ggB0pUp/V3z764OszIG+Y9XZUWMK2+ZnHHluuY8gTP4q0u ReuX1vxiU79NtKtg3aOpV21L9xvH2ECyS9bl3lk1IDeWIBM8vsUS+Htho3bBJJ/3/g+2 59Ju6gr1QnZQRaTVCkw9UR36LNZaKxpHnGva+AFPSZ+AjfOzpRl7YhJyuk7EODehf6Lc ZuxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:user-agent:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=A41UbC66yyqt5RGmWL7NDOVJoJizWLnXIEJc5GeRbAM=; fh=BKHJ6rvSwRTzIS71TuI0MQm5oQ8R7bqsh9iS1ec0RXM=; b=NFK1yGNRC7LMJq3Z4OITpUHbNGbKsPmucYCbo+GJ+WzdUoVV60d2qkf5dmbclaNt6y wmS9f9tvv7yP4FjcwyPb9tx15pMq2u2VpfbDCAKy+9bGVoQz8boYfzY5N/ftR2jryvoi QooepMU8XqMSZgNKGy3ohMbTet447bbAaI1mJSClHTQD81bf3LDvplsBnry7EGmaV6PK BaBIgOu4Ams94rnFX9Unzq3L2jkUfeYJjO2qdbyPjNZPL4xeaEwt3aqWjPpD90K0a85C fm5KYaZgoXmA7Wz7w4NG17Wb8ybz0t7PSJBPmkVELNSqemM1Hx3aTAeSIGYv/Vgj+rsf Ofmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=EnpUksuE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y20-20020a17090629d400b00992beea60c2si6696955eje.826.2023.07.31.05.05.24; Mon, 31 Jul 2023 05:05:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=EnpUksuE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229891AbjGaLhb (ORCPT + 99 others); Mon, 31 Jul 2023 07:37:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbjGaLha (ORCPT ); Mon, 31 Jul 2023 07:37:30 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CACFCC3 for ; Mon, 31 Jul 2023 04:37:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1690803424; x=1691408224; i=efault@gmx.de; bh=dyXJz749kJv3ruX20121R33BFCwNLgjk2KT6tCDfzlQ=; h=X-UI-Sender-Class:Subject:From:To:Cc:Date:In-Reply-To:References; b=EnpUksuEs7z7ljhCp9ZHRC5yrRe/20JFQwae7BP0lz9wJYDpoO/kXdyiCDewgcL+Q0TagN5 PQJ/HhrNbiQcQ2XqYgvsvoYuuF11qQGviHniPLQB8nGFxSPCPOneWzlK7ioRfmKC35JNdV2T4 mChiucEJVJW4kVmCYxq4RAfpYLfE0UtJzk9YCFwPYRRGiAb1RnfpIntyWWEoqUo4lGr08jrHw L4lu/cvjzxWEfYvcK7ZyX10rMPCZas3yeeMY+1/HXvBovNdzkj7x4rpfVHelmNGvwEmqmGxzY 3uOHplu5/9kaQSHt4CJGb+McecZK7bvjFJGQYWLbL3m3BdTHap9w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from homer-2.fritz.box ([185.191.216.56]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M5wPb-1qWBqN2uDb-007SdW; Mon, 31 Jul 2023 13:37:04 +0200 Message-ID: Subject: Re: arm64: perf test 26 rpi4 oops From: Mike Galbraith To: Will Deacon Cc: lkml , Mark Rutland , lstoakes@gmail.com, wangkefeng.wang@huawei.com, catalin.marinas@arm.com, ardb@kernel.org Date: Mon, 31 Jul 2023 13:37:04 +0200 In-Reply-To: <20230731104340.GA24767@willie-the-truck> References: <20230728141852.GA21718@willie-the-truck> <8c56256399e2e6c41bc574749d6170d5529f24fc.camel@gmx.de> <20230731104340.GA24767@willie-the-truck> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:MMUQKeREATw9F48Hkh5KH8jwtgPTb3jIthu8Yo1s+5qczF1kWvH D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ZZ/tWIM2Lstk5p2LSFn0qRaWDR+gZHO7Oiwd2+ BeBoycG2WMx0kRq8fNo7c0/EABvNnE9Oy2aBlYt7SQZMHS7R5ynlXB0LXPXblex9GinD/vBQ5 CJKEPtEEeMxjCl2yB6hNEDYREZc= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Mon, 2023-07-31 at 11:43 +0100, Will Deacon wrote: > The easiest way to trigger the problem is simply: > > # objdump -d /proc/kcore > > Looking at the history, I wonder whether this is because of a combinatio= n > of: > > e025ab842ec3 ("mm: remove kern_addr_valid() completely") > > which removed the kern_addr_valid() check on the basis that kcore used > copy_from_kernel_nofault() anyway, and: > > 2e1c0170771e ("fs/proc/kcore: avoid bounce buffer for ktext data") > > which replaced the copy_from_kernel_nofault() with _copy_to_user(). > > So with both of those applied, we're missing the address check on arm64. Hm, I see trace_printk() in the future of self and x86_64 desktop box. While my attempt to bisect the two arm64 allocation failures was doomed by an apparent inability to reliably type sudo perf test 26, I still suspect they might be a part of this fossilized bug.. see last two with funny looking addr/len. dmesg|tail -2 [ 1506.732999] __vm_enough_memory: pid: 3824, comm: objdump, not enough me= mory for the allocation of 64913409 pages [ 1506.733050] __vm_enough_memory: pid: 3824, comm: objdump, not enough me= mory for the allocation of 64913441 pages cat trace|grep 3824 ... objdump-3824 [000] ....... 1506.708497: vm_unmapped_area: addr=3D0x7fa= 9ac8000 err=3D0 total_vm=3D0x52f flags=3D0x1 len=3D0x2e7000 lo=3D0x1000 hi= =3D0x7faa24e000 mask=3D0x0 ofs=3D0x0 objdump-3824 [000] ....... 1506.708657: vm_unmapped_area: addr=3D0x7fa= a213000 err=3D0 total_vm=3D0x816 flags=3D0x1 len=3D0x7000 lo=3D0x1000 hi= =3D0x7faa24e000 mask=3D0x0 ofs=3D0x0 objdump-3824 [000] ....... 1506.709740: vm_unmapped_area: addr=3D0x7fa= 86f7000 err=3D0 total_vm=3D0x81d flags=3D0x1 len=3D0x13d1000 lo=3D0x1000 h= i=3D0x7faa24e000 mask=3D0x0 ofs=3D0x0 objdump-3824 [000] ....... 1506.732991: vm_unmapped_area: addr=3D0x179= 95df000 err=3D0 total_vm=3D0x831 flags=3D0x1 len=3D0x3de8001000 lo=3D0x100= 0 hi=3D0x7faa24e000 mask=3D0x0 ofs=3D0x0 objdump-3824 [000] ....... 1506.733049: vm_unmapped_area: addr=3D0x179= 95bf000 err=3D0 total_vm=3D0x831 flags=3D0x1 len=3D0x3de8021000 lo=3D0x100= 0 hi=3D0x7faa24e000 mask=3D0x0 ofs=3D0x0 objdump-3824 [000] ....... 1506.733846: exit_mmap: mt_mod ffffff814999= 1980, DESTROY