Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8242158rwi; Tue, 25 Oct 2022 04:25:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6fYF5f9q35iIL0GX4CyFXuni1jVxwRljL092J1z1D3vEzthQ5qad9pbIhMLrlFFSVkU4lB X-Received: by 2002:a05:6a00:14d3:b0:567:6e2c:2f0a with SMTP id w19-20020a056a0014d300b005676e2c2f0amr35030156pfu.57.1666697149913; Tue, 25 Oct 2022 04:25:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666697149; cv=none; d=google.com; s=arc-20160816; b=Vjy0axzPfsLa7AJOdYBHd/ZvO8QrnjE83n+7O/8lttDsvuLP4e/9Rf+/FOwvx3uqab xZyycEz/ae7rgAqJfGeYvTy2HghgzNn6jIWiIxvHya/GxYgcunp7bLK2gSte4vbyvj+M b6TSRnzdCfCh3AgGLRL0Fh7i/pu2x9qwyK15h3ZFyqo3Zcu1GrcaU/2WiTYvhsSYzS1V rz+IUmePI+N+F8eTkl5VTrWlfnuelJupxrvtSIT/+eo4JTXqEdeOg8O4Si4OInZqCWkx yHYfl8KHNmuKHpl1ExuAVh208p181rK4anCqqgcYGSJei10uG54X17sXjlIu60YCaeAA LqmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=w7jyh7t+HSd8ls+5K8wYXg67ORftlivpSuWpTIAA1Ec=; b=GHaPNdDyddVtduQSMN/ETAEEHSbPvF3ypiNLddPkUCybkWpm1ktM2O2W0Pev7ExeLj sldq3BMvrtf6BewZKo5l7SRizSBdoiHRsi/J4AASPnFy34aLvajrpek0gRrNdiby5Jvn 4GDoWuDNH80Tu4cNCOvJ2g1VUm8PhwxCfP5eVOiP5jUjiql1MNgdaL1Sl9x7TLmufqKT OPLo3JAAuKNPbPl7Fyws9n2jbyAIMGfDNHYowL1hUU1bQdQrwyPwGJ7Mdeq+tq7KBK5e Oya0HE7y2HSTFMv6o6NlRNzH8Z9RgwLUjQDzl3wA1c1bQjYXcacF92fhHNZ1t/j4HA21 2mvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=pwDgHKGN; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v4-20020a17090a088400b0020d3fa4d1edsi11577347pjc.64.2022.10.25.04.25.37; Tue, 25 Oct 2022 04:25:49 -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=@infradead.org header.s=desiato.20200630 header.b=pwDgHKGN; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231940AbiJYKel (ORCPT + 99 others); Tue, 25 Oct 2022 06:34:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229800AbiJYKek (ORCPT ); Tue, 25 Oct 2022 06:34:40 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B80432045 for ; Tue, 25 Oct 2022 03:34:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=w7jyh7t+HSd8ls+5K8wYXg67ORftlivpSuWpTIAA1Ec=; b=pwDgHKGNYy+q7+1Zq4ibtxTn9f 4mH06Pa213DTyXq8WBhCs81sD2PBLHuokf5excD05nlRoKPtWjttOFmCAaMhiaXHbmSDTtc/ZoMh2 cXNJVIBtMFOZcxD7pzX0Iw87EWqdbxowVdSGxtUdkZfR3tfpRGlAC35X7mmUDzUgX3PrRBt8cZ+Yh BcNA4f04gCGPS4pPR6UR3MckTlYIwiUcCZXozXJzdCZyedGCKRw6V9OxIgeqC10xj6RatgblM8Iuy I1drWuXnnZOOoIoYiJ8vQIaND5k3Y+Zg/h/4biEtQsK8CqzwKK8fSDQ3cOT8VRi/7H+2so3BG/Fww 658t26TQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1onHFr-006I9L-Aw; Tue, 25 Oct 2022 10:33:55 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id BF151300169; Tue, 25 Oct 2022 12:33:54 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A028B2C431FAA; Tue, 25 Oct 2022 12:33:54 +0200 (CEST) Date: Tue, 25 Oct 2022 12:33:54 +0200 From: Peter Zijlstra To: kernel test robot Cc: oe-lkp@lists.linux.dev, lkp@intel.com, Dave Hansen , Seth Jenkins , Kees Cook , linux-kernel@vger.kernel.org, x86@kernel.org, Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , kasan-dev@googlegroups.com, "Yin, Fengwei" Subject: Re: [tip:x86/mm] [x86/mm] 1248fb6a82: Kernel_panic-not_syncing:kasan_populate_pmd:Failed_to_allocate_page Message-ID: References: <202210241508.2e203c3d-yujie.liu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202210241508.2e203c3d-yujie.liu@intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,URIBL_BLOCKED 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 Tue, Oct 25, 2022 at 12:54:40PM +0800, kernel test robot wrote: > Hi Peter, > > We noticed that below commit changed the value of > CPU_ENTRY_AREA_MAP_SIZE. Seems KASAN uses this value to allocate memory, > and failed during initialization after this change, so we send this > mail and Cc KASAN folks. Please kindly check below report for more > details. Thanks. > > > Greeting, > > FYI, we noticed Kernel_panic-not_syncing:kasan_populate_pmd:Failed_to_allocate_page due to commit (built with gcc-11): > > commit: 1248fb6a8201ddac1c86a202f05a0a1765efbfce ("x86/mm: Randomize per-cpu entry area") > https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git x86/mm > > in testcase: boot > > on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G > > caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace): > > > [ 7.114808][ T0] Kernel panic - not syncing: kasan_populate_pmd+0x142/0x1d2: Failed to allocate page, nid=0 from=1000000 > [ 7.119742][ T0] CPU: 0 PID: 0 Comm: swapper Not tainted 6.1.0-rc1-00001-g1248fb6a8201 #1 > [ 7.122122][ T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014 > [ 7.124976][ T0] Call Trace: > [ 7.125849][ T0] > [ 7.126642][ T0] ? dump_stack_lvl+0x45/0x5d > [ 7.127908][ T0] ? panic+0x21e/0x46a > [ 7.129009][ T0] ? panic_print_sys_info+0x77/0x77 > [ 7.130618][ T0] ? memblock_alloc_try_nid_raw+0x106/0x106 > [ 7.132224][ T0] ? memblock_alloc_try_nid+0xd9/0x118 > [ 7.133717][ T0] ? memblock_alloc_try_nid_raw+0x106/0x106 > [ 7.135252][ T0] ? kasan_populate_pmd+0x142/0x1d2 > [ 7.136655][ T0] ? early_alloc+0x95/0x9d > [ 7.137738][ T0] ? kasan_populate_pmd+0x142/0x1d2 > [ 7.138936][ T0] ? kasan_populate_pud+0x182/0x19f > [ 7.140335][ T0] ? kasan_populate_shadow+0x1e0/0x233 > [ 7.141759][ T0] ? kasan_init+0x3be/0x57f > [ 7.142942][ T0] ? setup_arch+0x101d/0x11f0 > [ 7.144229][ T0] ? start_kernel+0x6f/0x3d0 > [ 7.145449][ T0] ? secondary_startup_64_no_verify+0xe0/0xeb > [ 7.147051][ T0] > [ 7.147868][ T0] ---[ end Kernel panic - not syncing: kasan_populate_pmd+0x142/0x1d2: Failed to allocate page, nid=0 from=1000000 ]--- Ufff, no idea about what KASAN wants here; Andrey, you have clue? Are you trying to allocate backing space for .5T of vspace and failing that because the kvm thing doesn't have enough memory?