Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3144877imw; Mon, 18 Jul 2022 02:59:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tAeBWbGEYw8yM7zDGDmJ9nliJoDgtAHp6FDeQsPEPUvVkT0vl5aDZrsVYqpQUeKnzvbEqV X-Received: by 2002:a05:6402:1f0b:b0:43b:4188:8019 with SMTP id b11-20020a0564021f0b00b0043b41888019mr20093162edb.11.1658138355152; Mon, 18 Jul 2022 02:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658138355; cv=none; d=google.com; s=arc-20160816; b=UGhJUUq4jUFqooC4ISsadyjRZfTmxbhqzmtaXanwgkekiNjDXbi7E+Z5ck0nCIPj8a +SzupZRFNICQjOSoAkheStqVN79ybLVQgj3tNUlGf8EgnanZovaDtGkuhiZcm6z8muYu tsUyAXgAt/BVdB99oX03fESZp5YjeGd5/XAqxuw3aCf0ziAjJdtgcAphTfoI8FkJxsUU A0iFrXbDwJwtHlEmCgWnra3od8+ch+d4TFCLeobhCNOd9LSCTKPoLEWcmdU1iNIn3xkI m4clmtq98iA1xP5IapzsI6Sgs+2Jz1Rk5+tqbJ+pYkJTy1FVPdV91urwpoyBXsX9tSHQ UZMA== 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=6DTNQWLWEiUavjwO5kJULSizhPzyAq+tui1+RbSI3to=; b=xZxvE6QNOwQy48BLjrSmXPRnWVijNwO5yVaXI5zTGEnkr2spsJo3/eGvrAL53taOqC KXn2BfTqkhtL8E88lTwzGn6izb25+Nt2x9STQN24TI7ewJSIrl/NYJeef1Nttivlu6+h 9uhtScy0NlD1yALyLWu4aiWwH3Bp5z3h5Y4yx6PYWgPDcxHz3uu5KbNO90NoX7I6Wlej l8VLWw8/LOzkXJTAkQDdHh+zFPBDZNvO4/GUggRJAtX9T6AfwOdS118Q+4sZlaOhVee3 0IGyX40fTW73dIC7oi/5Me+6GKO2G82CLci/yjgQ04K3vZiVQllo5WmO40Cn56dEqjW8 /+Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Qmed7QwQ; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j16-20020aa7c410000000b0043b0e7cf010si12617933edq.331.2022.07.18.02.58.50; Mon, 18 Jul 2022 02:59:15 -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=@alien8.de header.s=dkim header.b=Qmed7QwQ; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234271AbiGRJuo (ORCPT + 99 others); Mon, 18 Jul 2022 05:50:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234221AbiGRJum (ORCPT ); Mon, 18 Jul 2022 05:50:42 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B19817E1C; Mon, 18 Jul 2022 02:50:42 -0700 (PDT) Received: from zn.tnic (p200300ea972976d7329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9729:76d7:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id AA5EE1EC0502; Mon, 18 Jul 2022 11:50:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1658137836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=6DTNQWLWEiUavjwO5kJULSizhPzyAq+tui1+RbSI3to=; b=Qmed7QwQmwlZAx3wTCKTdlbnmYeSkWHZHxr1h6oGAYLv9gtqXlnVtxOSXZyFCX181p8hmd Ew+uewl/NT15cquSaq3S9k+run5XXoZzItGd8C/nDFjgnRmDCeg+dAwiWuPPFULPZAWjit wqywj86pi9Bfjh2GilMP+bMFyqJhSGM= Date: Mon, 18 Jul 2022 11:50:33 +0200 From: Borislav Petkov To: Kristen Carlson Accardi Cc: linux-tip-commits@vger.kernel.org, Kristen Carlson Accardi , Dave Hansen , Shakeel Butt , Roman Gushchin , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [tip: x86/urgent] x86/sgx: Set active memcg prior to shmem allocation Message-ID: References: <20220520174248.4918-1-kristen@linux.intel.com> <165419442842.4207.2566961916839377924.tip-bot2@tip-bot2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <165419442842.4207.2566961916839377924.tip-bot2@tip-bot2> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 Just what I think looks like a discrepancy I noticed while merging tip/master: On Thu, Jun 02, 2022 at 06:27:08PM -0000, tip-bot2 for Kristen Carlson Accardi wrote: > diff --git a/arch/x86/kernel/cpu/sgx/encl.h b/arch/x86/kernel/cpu/sgx/encl.h > index d44e737..332ef35 100644 > --- a/arch/x86/kernel/cpu/sgx/encl.h > +++ b/arch/x86/kernel/cpu/sgx/encl.h > @@ -103,10 +103,13 @@ static inline int sgx_encl_find(struct mm_struct *mm, unsigned long addr, > int sgx_encl_may_map(struct sgx_encl *encl, unsigned long start, > unsigned long end, unsigned long vm_flags); > > +bool current_is_ksgxd(void); > void sgx_encl_release(struct kref *ref); > int sgx_encl_mm_add(struct sgx_encl *encl, struct mm_struct *mm); > -int sgx_encl_get_backing(struct sgx_encl *encl, unsigned long page_index, > - struct sgx_backing *backing); > +int sgx_encl_lookup_backing(struct sgx_encl *encl, unsigned long page_index, > + struct sgx_backing *backing); > +int sgx_encl_alloc_backing(struct sgx_encl *encl, unsigned long page_index, > + struct sgx_backing *backing); > void sgx_encl_put_backing(struct sgx_backing *backing); So this is making the sgx_encl_get_backing() thing static but its counterpart sgx_encl_put_backing() is not and is still called by other places. Perhaps something wrong with the layering or is this on purpose? Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette