Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3711313pxj; Tue, 11 May 2021 10:11:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+ZnBsZHpAdIF/zxDEmp+9u5aKdF1+Ylm0F0XhuhGNGYmp2uo6Dxv4YCKSkXqdfxW9fZPP X-Received: by 2002:a17:906:c01a:: with SMTP id e26mr33094969ejz.300.1620753104789; Tue, 11 May 2021 10:11:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620753104; cv=none; d=google.com; s=arc-20160816; b=qVfCWZjd8GuGmbsIwzzGTPAG5W/cE14hnWMSQcWNzWowxAXauQueCk+bK9eWtzsxqa WIahAtr4sgQUJTUMeRb6R8qMz1dQAJLTUKLrt09EaURPSamg3itVThqYgoKIM0J7/QM4 C8j3I29fIUSwcf9fjbLX+J1rJ5L7oLsO9yZi+bvLNRMpN2FAhHKsazlc41WHeLhtE/FX 7u73OoJ0IgFq82bT7gDK1fpH+qnw7M5+LPkWbQr5Qi6PHhapTL5C5naFHotE1Q6vy3yO m6QupXutG4uthI3YrIb/5mj5E2ygSA+/f8UCIslH8xwI87cMiXQiW0to0PX8ZVOJnQHK VsIw== 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=oXj+aT1NLTLdq4xvPpDkmK4mlSpKcyX1kXRzqY9sy/I=; b=PWAowRSHle8TS4pk4k3kt7PkEDj2SYYT3G1vwmLcRGqgSYoQ4Li4lDB9EqX2bNIMrg t7ka5cVOWcJam0oa1d6Q89AdpyhLtRWsNKPfMmzmr7GnDFXgtMLyCVDbDK/5QqpdLLhY B1jIaTDqJYMbaBgZPITApmGC6nFtp0oeClZ/pz9jZtZu1cRB6D2QKqOiQQrTpclPLpsu h4XPtTUyLOk1HZAJi/J55T/M5+0qdtjZcXn2CTZe4ahFft0/Sx8poTA20HF+smsVoNfI qh9feU8jhhQOan/npXE+ehfuKHyD7lBO82ZFFIklgEajw8AJGY+vRlLuG4XOXFBA2VBP MaqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=bLcn8++C; 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 b8si11766039edd.8.2021.05.11.10.11.18; Tue, 11 May 2021 10:11:44 -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=bLcn8++C; 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 S231437AbhEKRKz (ORCPT + 99 others); Tue, 11 May 2021 13:10:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230315AbhEKRKx (ORCPT ); Tue, 11 May 2021 13:10:53 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 521CBC061574; Tue, 11 May 2021 10:09:47 -0700 (PDT) Received: from zn.tnic (p200300ec2f0ec70020ab858661d7f414.dip0.t-ipconnect.de [IPv6:2003:ec:2f0e:c700:20ab:8586:61d7:f414]) (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 134C61EC02E6; Tue, 11 May 2021 19:09:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1620752985; 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=oXj+aT1NLTLdq4xvPpDkmK4mlSpKcyX1kXRzqY9sy/I=; b=bLcn8++CHPCwI1r2+fGHgbqQmPMj0/Kw1DAyubBcNj+IKE9PD5aHN82t0EOQYgw9zkmX8U VMpPrqq8dwdNUvdWd3XkPDW+VrSH9QT2L5Yp2JzKL44ITn0WeVVb2mlJjcR4IxfCdcZh0e tVqiaLj/s+Svo/KGRT6NwRVyr9HxLRg= Date: Tue, 11 May 2021 19:09:41 +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> <89598d32-4bf8-b989-ee77-5b4b55a138a9@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <89598d32-4bf8-b989-ee77-5b4b55a138a9@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 10, 2021 at 03:57:56PM -0700, Yu, Yu-cheng wrote: > So this struct will be: > > struct thread_shstk { > u64 shstk_base; > u64 shstk_size; > u64 locked:1; > u64 ibt:1; > }; > > Ok? Pretty much. You can even remove the "shstk_" from the members and when you call the pointer "shstk", accessing the members will read shstk->base shstk->size ... and all is organic and readable :) Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette