Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp257045rwe; Wed, 24 Aug 2022 22:38:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR6SfJj5is+VCVyd4qU/uWvz0keDSbnHGQHf7d1d0y4u4MahzLANihR7PTth1HxVjZ6lcvNe X-Received: by 2002:a17:907:3f87:b0:731:7702:50b9 with SMTP id hr7-20020a1709073f8700b00731770250b9mr1315075ejc.735.1661405914661; Wed, 24 Aug 2022 22:38:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661405914; cv=none; d=google.com; s=arc-20160816; b=VfqfxzO2xqAg9bWhM9GTYV2RyBkPxeSVENIyUt3g6fVA1YJtH8anLit3glP0dICZ/9 dCyT8Be3D93ZQcXMlH5FhxzZowT8cJGuNpAJfSDXLFFZeSUVg+TUh+Sqjt+RdkIhhbew zYoGWzIMPxgGlyVULfDebc1K7Gr429wSKpnvazbaJconv3m9rhcNfFLTETAeIrw9I4K6 0SyUo34a69MCDjE3AUz73Yfx/uI1LrxUzAR3xRM4yYTAL9GSENlRdz3wc5EVPejO3x2F dG9nnQGHosLHOS31kt4dVZTbBBMQIXRkE2WABxhRErlsfhy33BEb3kmFSVX7AuL1traf Atug== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zVuD9pRZbUT1O6nBLy3VWA5ZyTy9cP/z2HZIrU8Uv5s=; b=M0pcRBpl+WbF495m2SB3ohS0LTEuaxbGd+YTOeQVW3odtvbXGI4Kp5svLrPU+6wenh QUSmmDfL7hwHI3zZSmaHyStFobgYjT9W1D09w1HM+B/0nDnOfYLZdMO8jpVAgqw7/jOY sHSldaqEgd27MSp6CBeq/ld/NXzZMlzeawI2whLsAYYX7pwLKxTKLcx4mItKEN4fFUw/ JrSgHVHO/9mluXRJtuyliaJ0pCez7Wz0Fg+T2ofBtmplcUimQTPKR0YbDS6Xm3zw5U+5 xORNnAvWwOhCh9kftm6/dtQVou7R6IX+KbvswU1NgBkH8wUwvltgnijn9JrBNb5CS0w5 rXdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t7OJ6QRq; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc35-20020a17090716a300b007309e3ce06csi3789749ejc.647.2022.08.24.22.38.08; Wed, 24 Aug 2022 22:38:34 -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=@kernel.org header.s=k20201202 header.b=t7OJ6QRq; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232970AbiHYE5k (ORCPT + 99 others); Thu, 25 Aug 2022 00:57:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbiHYE5j (ORCPT ); Thu, 25 Aug 2022 00:57:39 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72D2C9E123; Wed, 24 Aug 2022 21:57:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id CA943CE2550; Thu, 25 Aug 2022 04:57:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8D73C433D6; Thu, 25 Aug 2022 04:57:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661403454; bh=Pg4ZVXtnQv/FMSmoj3+68h6Hrxo+qoEdyYM3we1niEE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=t7OJ6QRqrLY9YNh/95dhZF7RAM+XW9Ck6lOrIZuAL6a2E7D5k5V3uJxfuWjYSMQV1 ELAUtY0h28k0mPC8Yl0s+dA4tLmKFZahiR5t/wLFjBC9r8nxUTT0PZ7TX/xodmnDCY 46CFeF9126ps9VlNij47FPsJDV+ovS8FpwFQUuE4i3qoMvCPc4+AIKNx+G3GilYeij VDBnJMbDaU8ty4YfsohSsF+L4qmF/HltjoxDwjxYR+fdR1pVW3s3O5UBGBm8sgEenQ 8EWY4QEWD2+Y2vuYB0YIY8aBpWoVEFgcLH9Mqy3jv6JDyVG2aY106fh1LuElOrASe1 VWaGu6TOR7QVg== Date: Thu, 25 Aug 2022 07:57:27 +0300 From: Jarkko Sakkinen To: Dave Hansen Cc: Paul Menzel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "Chatre, Reinette" , linux-sgx@vger.kernel.org, LKML Subject: Re: WARNING: CPU: 1 PID: 83 at arch/x86/kernel/cpu/sgx/main.c:446 ksgxd+0x1b7/0x1d0 Message-ID: References: <4253695b-85aa-a2fb-fbf6-718db8b6c20c@molgen.mpg.de> <46e3483b-a5ab-2a05-8a28-f9ea87e881c3@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <46e3483b-a5ab-2a05-8a28-f9ea87e881c3@intel.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Fri, Aug 19, 2022 at 11:28:24AM -0700, Dave Hansen wrote: > On 8/19/22 09:02, Paul Menzel wrote: > > On the Dell XPS 13 9370, Linux 5.18.16 prints the warning below: > > > > ``` > > [    0.000000] Linux version 5.18.0-4-amd64 > > (debian-kernel@lists.debian.org) (gcc-11 (Debian 11.3.0-5) 11.3.0, GNU > > ld (GNU Binutils for Debian) 2.38.90.20220713) #1 SMP PREEMPT_DYNAMIC > > Debian 5.18.16-1 (2022-08-10) > > [    0.000000] Command line: BOOT_IMAGE=/vmlinuz-5.18.0-4-amd64 > > root=UUID=56f398e0-1e25-4fda-aa9f-611dece4b333 ro quiet > > […] > > [    0.000000] DMI: Dell Inc. XPS 13 9370/0RMYH9, BIOS 1.21.0 07/06/2022 > > […] > > [    0.235418] sgx: EPC section 0x40200000-0x45f7ffff > > Hi Paul, > > Would you be able to send the entire dmesg, along with: > > cat /proc/iomem # (as root) > and > cpuid -1 --raw > > I'm suspecting either a BIOS problem. Reinette (cc'd) also thought this > might be a case of the SGX initialization getting a bit too far along > when it should have been disabled. > > We had some bugs where we didn't stop fast enough after spitting out the > "SGX Launch Control is locked..." errors. For some reason the pages do not get properly sanitized: /* sanity check: */ WARN_ON(!list_empty(&sgx_dirty_page_list)); EPC should be good, given that EREMOVE does not fail. If SGX would be disabled, also EREMOVE should fail. BR, Jarkko