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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 421A4EB64DC for ; Mon, 17 Jul 2023 18:52:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231366AbjGQSwU (ORCPT ); Mon, 17 Jul 2023 14:52:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231352AbjGQSwU (ORCPT ); Mon, 17 Jul 2023 14:52:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 920A191; Mon, 17 Jul 2023 11:52:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 30E28611FB; Mon, 17 Jul 2023 18:52:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C662C433C8; Mon, 17 Jul 2023 18:52:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689619938; bh=P87FuhTc8IahWEgTuqdfWe67jrGdK6SDRTgOReZthFE=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=qlnofnqnii1cMegZYZVF2HqyH5omZ2b7OXOzmWHw5owzA1KLmpBqePrWEhzN9hyCR EgR9GGacPYBjYMMZQa98po56ewrU0hMXaaaBFhZemBR39eJ2uX89yeX+VEdPYKCpzh tUligDoFnNONCEqCbtyjpccJwznUBXbrwaULtWW8E2fMJTAEE2T54XqBqPX4dOooa8 ANYFBYQ4kdLadlWlMLKbMr7bBU5dX3bjyEfnBkRBeBIXkYIl8lhjDERZycLmNwGERo /wm5YTgYyujAZtS4ESNh74V6tGcAXY2BCvK2/cxVYCl9Z5FM9PbeBdBS1Knz5Z+Bc2 JmMSrfHkPFtvA== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 17 Jul 2023 18:52:13 +0000 Message-Id: Subject: Re: [PATCH v3 17/28] x86/sgx: fix a NULL pointer From: "Jarkko Sakkinen" To: "Dave Hansen" , "Haitao Huang" , , , , , , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , , "H. Peter Anvin" Cc: , , , , X-Mailer: aerc 0.14.0 References: <20230712230202.47929-1-haitao.huang@linux.intel.com> <20230712230202.47929-18-haitao.huang@linux.intel.com> In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-sgx@vger.kernel.org On Mon Jul 17, 2023 at 3:49 PM UTC, Dave Hansen wrote: > On 7/17/23 05:48, Jarkko Sakkinen wrote: > > On Wed Jul 12, 2023 at 11:01 PM UTC, Haitao Huang wrote: > >> Under heavy load, the SGX EPC reclaimers (ksgxd or future EPC cgroup > >> worker) may reclaim SECS EPC page for an enclave and set > >> encl->secs.epc_page to NULL. But the SECS EPC page is required for EAU= G > >> in #PF handler and is used without checking for NULL and reloading. > >> > >> Fix this by checking if SECS is loaded before EAUG and load it if it w= as > >> reclaimed. > >> > >> Signed-off-by: Haitao Huang > > A bug fix should be 1/*. > > No, bug fixes should not even be _part_ of another series. Send bug > fixes separately, please. Yes, that would be of course a better option. BR, Jarkko