Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4705776pxj; Wed, 12 May 2021 11:19:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/PDOTQ5GKH3a6bXC8aQAE1FIeH7MR01dYRd2YZK67l9CjXI6uqBLORe2LnWR70IOShaQP X-Received: by 2002:a17:907:75f6:: with SMTP id jz22mr38412651ejc.504.1620843545509; Wed, 12 May 2021 11:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620843545; cv=none; d=google.com; s=arc-20160816; b=cMJy3SUNvfEPz7iwrEizZz5eA+CZSrvzkI2YPb0+Xb3GMLq6+L4Ex5Vqi6X/quros7 1WBixTQGh+5oUDmQvjEPh1+Sk+zB4NoHFVK6V0LSR1+f8a5jzoGTbFYuWz3knY9f8G1A VSaMff+SFAA5Rnnv4hn/+2yhjIYzHuC3RqjooniQE23nyJotGO/ST8Rb2kGARwX3ZK4A CMUyltasdsD8KPVPizv5dCHOgRZ+/oyLML3svvQhEGVr7vGXw0uM/TjQSYQkjJXjwtd5 c17m8tiBofBn10Q+XI70EN02Pd1W9U2k1+FnDvvtw80rHfgSuUnqlYbd1Qa5QZhwvpqL dFWg== 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=OA2T3EfM3yuS2/g28AeCNtkAWuVuqdQFcc8kwJ1h0cQ=; b=GD2gp8lK9mpnygyad3c0FPkl1EV6gugZXXAuFJJl3oz7EOzquN0WtnaQi4s8Hcmnzq SYl5e7m7ogVPI0qOI7cg+wMlJHFkI2cCRdOkNa4pz+B+Fn2TjQZkpOt2pDal04FzcU4I Bgztq2SDM6gz5Q+y+7mDPRoy5wGRbwzMwfuL3OX0TlxkEyEBPrSA65Iiu3O3HzijxTwt BhHK0rxwpW5MitYAUMGfThnP35ccIcGgr1h2OzSTWTIPTfjCZ7npC93sspx3J1jgfLNl u15FACwLSSwUHNCoumtmV5N3Dl0Kt2qZQa6QJKv9BdNe3o8+NnwN4nMVXpuYyM7bhM30 27xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=kTjSthv6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t16si450746ejo.378.2021.05.12.11.18.41; Wed, 12 May 2021 11:19:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=kTjSthv6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1351832AbhELSCC (ORCPT + 99 others); Wed, 12 May 2021 14:02:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241157AbhELQ0m (ORCPT ); Wed, 12 May 2021 12:26: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 77052C0612EA; Wed, 12 May 2021 08:56:54 -0700 (PDT) Received: from zn.tnic (p200300ec2f0bb80077d55d62652951c8.dip0.t-ipconnect.de [IPv6:2003:ec:2f0b:b800:77d5:5d62:6529:51c8]) (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 AFF941EC0523; Wed, 12 May 2021 17:56:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1620835012; 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=OA2T3EfM3yuS2/g28AeCNtkAWuVuqdQFcc8kwJ1h0cQ=; b=kTjSthv6wlxUixi9Eb+guR9PkLPJL1RwsEu5iYG2Hgijh5pjb+n2/ok9Gk6p+CSlgBWDbN rxCKi8P0hxhseMjmi/Ghg82A32KwfMPftfsVz6qcqCYiF+0CignEDKIozxyVCO58/xqhh6 FzPH9upGhKsUwfA5fiurKGIWzVQTdKQ= Date: Wed, 12 May 2021 17:56:49 +0200 From: Borislav Petkov To: "Yu, Yu-cheng" Cc: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin , Weijiang Yang , Pengfei Xu , Haitao Huang Subject: Re: [PATCH v26 23/30] x86/cet/shstk: Handle thread shadow stack Message-ID: References: <20210427204315.24153-1-yu-cheng.yu@intel.com> <20210427204315.24153-24-yu-cheng.yu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 11, 2021 at 11:35:03AM -0700, Yu, Yu-cheng wrote: > io_bitmap_share() does refcount_inc(¤t->thread.io_bitmap->refcnt), and > the function won't fail. However, shadow stack allocation can fail. So, > maybe leave io_bitmap_share() at the end? Yap, makes sense. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette