Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5741874rwd; Wed, 24 May 2023 06:16:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6U8QFevNrizcebKW1f6Le4ioSWijLz7j9q18mueXQPSeAxE5yq5uNl5cbMex7+cObposcN X-Received: by 2002:a17:90b:194:b0:253:8abb:b613 with SMTP id t20-20020a17090b019400b002538abbb613mr15823077pjs.46.1684934176282; Wed, 24 May 2023 06:16:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684934176; cv=none; d=google.com; s=arc-20160816; b=J+KaQv1+heCvyMlFwAhTxQzeXNttwxRc0911mZipfhDEo/CUBYO3rFvEghNa3f5Ynt 5heZKR3i7oRK4KlaP9JyyBVj/fhkAuf+XH12X52NjASKiVKzru32o1NE81atGTzwpObv d04oOzuN3PF2xo8V/KZVsxNOgEFwFoNfQpedJwfdOvyKE0VT3knX19rczPCffoxgoQB6 j5f8kA0c5ZftNvVEGf4+dC3FmXcKtwU6MikT3GWtWb72w6vPJQHbV+O6W1074xuGuxgo f/IEOuFcbWAXCrAHA3QbvarbrkC5daBH5e3rE7o2BWmG7oXeuR6rVBgVBevGl5vW/9YR eKzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=RVxGg2wIuZL6G36dgxKVPOWeBOtxjALdHB1xUMvfv7c=; b=HcuX+IInSv+4TFm7DZSnhKT0hOpsjnsv0U9SOysHuJMUq1SUtgMS3N0j46vWoB5H66 0EPEPpc++Z92XYef7k4AenorGu+roq8AJkXx1R9Twjic9bNdKyBl+EWoE+7EX1Ajv9DJ U7iZDZ7HnMUdjcPHCkCOZL5R8W5X/dqbw2LXC8/IWH6Scq3/hpV2FkaGCwDth0Ii/Gvj GByCC/fCDFFhyZ2/Y1aEbqliVxYL2OD4AGBE3dZS9MYEeVAxYiPVQqLwXi05BGb2f5CV vwYDzQNmdJuBNAeXOViPRaM7oy4t0k1aF1Lae0/+wj+xlh/zbNPGelVV22rsuyzjV4xf w2eg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id on11-20020a17090b1d0b00b0024bf50a83e7si1322363pjb.174.2023.05.24.06.16.02; Wed, 24 May 2023 06:16:16 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234766AbjEXMyb convert rfc822-to-8bit (ORCPT + 99 others); Wed, 24 May 2023 08:54:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234656AbjEXMy3 (ORCPT ); Wed, 24 May 2023 08:54:29 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAED5AA for ; Wed, 24 May 2023 05:54:24 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-239-Yfj8il36OwiJ2kUaRuBpBw-1; Wed, 24 May 2023 13:54:21 +0100 X-MC-Unique: Yfj8il36OwiJ2kUaRuBpBw-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 24 May 2023 13:54:20 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Wed, 24 May 2023 13:54:20 +0100 From: David Laight To: 'Arnd Bergmann' , Naresh Kamboju , open list , linux-stable , linux-mm , "LTP List" , "lkft-triage@lists.linaro.org" , X86 ML CC: Thomas Gleixner , Andy Lutomirski , Ingo Molnar , Dave Hansen , Andrew Morton , Dan Carpenter , Anders Roxell Subject: RE: qemu-x86_64 compat: LTP: controllers: RIP: 0010:__alloc_pages Thread-Topic: qemu-x86_64 compat: LTP: controllers: RIP: 0010:__alloc_pages Thread-Index: AQHZjjGxuHnxTw0F/kqC+Nbr0ednxK9pYAcQ Date: Wed, 24 May 2023 12:54:20 +0000 Message-ID: <8414a2adfee94b589458766b52f49421@AcuMS.aculab.com> References: <3a055da0-fd88-4ec0-b006-9ccd382e9cc6@app.fastmail.com> In-Reply-To: <3a055da0-fd88-4ec0-b006-9ccd382e9cc6@app.fastmail.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,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 From: Arnd Bergmann > Sent: 24 May 2023 12:18 > > On Wed, May 24, 2023, at 11:02, Naresh Kamboju wrote: > > While running LTP controllers following kernel crash noticed on qemu-x86_64 > > compat mode with stable-rc 6.3.4-rc2. > > > > Reported-by: Linux Kernel Functional Testing > > > > Linux version 6.3.4-rc2 (tuxmake@tuxmake) (x86_64-linux-gnu-gcc > > (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 > > SMP PREEMPT_DYNAMIC @1684862676 > > .. > > ./runltp -f controllers > > ... > > cpuset_inherit 11 TPASS: cpus: Inherited information is right! > > cpuset_inherit 13 TPASS: mems: Inherited information is right! > > <4>[ 1130.117922] int3: 0000 [#1] PREEMPT SMP PTI > > <4>[ 1130.118132] CPU: 0 PID: 32748 Comm: cpuset_inherit_ Not tainted > > 6.3.4-rc2 #1 > > <4>[ 1130.118216] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), > > BIOS 1.14.0-2 04/01/2014 > > <4>[ 1130.118320] RIP: 0010:__alloc_pages+0xeb/0x340 > > <4>[ 1130.118605] Code: 48 c1 e0 04 48 8d 84 01 00 13 00 00 48 89 45 > > a8 8b 05 d9 31 cf 01 85 c0 0f 85 05 02 00 00 89 d8 c1 e8 03 83 e0 03 > > 89 45 c0 66 <90> 41 89 df 41 be 01 00 00 00 f6 c7 04 75 66 44 89 e6 89 > > df e8 ec > > I haven't figured out what is going on here, but I tracked down > the trapping instruction <90> to the middle of the 'xchg %ax,%ax' > two-byte nop in: > > ffffffff814218f4: 83 e0 03 and $0x3,%eax > ffffffff814218f7: 89 45 c0 mov %eax,-0x40(%rbp) > ffffffff814218fa: 66 90 xchg %ax,%ax > ffffffff814218fc: 41 89 df mov %ebx,%r15d > ffffffff814218ff: 41 be 01 00 00 00 mov $0x1,%r14d > > which in turn is the cpusets_enabled() check in prepare_alloc_pages(). Does that code actually match the call/return stack? It is pretty much impossible to get a trap on an 0x90 byte. I think you'd need to jump to it and then get a page fault. So I bet that isn't the code that was actually being executed. So either the fault address is garbage or something horrid(tm) has happened to the page tables. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)