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 X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 265FAC433DB for ; Thu, 4 Feb 2021 20:30:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A9A7264DAF for ; Thu, 4 Feb 2021 20:30:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9A7264DAF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2356F6B0005; Thu, 4 Feb 2021 15:30:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1C9806B0006; Thu, 4 Feb 2021 15:30:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 08F926B006E; Thu, 4 Feb 2021 15:30:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0146.hostedemail.com [216.40.44.146]) by kanga.kvack.org (Postfix) with ESMTP id DB3686B0005 for ; Thu, 4 Feb 2021 15:29:59 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A7516181AEF1A for ; Thu, 4 Feb 2021 20:29:59 +0000 (UTC) X-FDA: 77781726918.12.milk79_020f3b0275df Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id 846721801AAA0 for ; Thu, 4 Feb 2021 20:29:59 +0000 (UTC) X-HE-Tag: milk79_020f3b0275df X-Filterd-Recvd-Size: 4153 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Thu, 4 Feb 2021 20:29:59 +0000 (UTC) Received: by mail-pj1-f48.google.com with SMTP id d2so2488214pjs.4 for ; Thu, 04 Feb 2021 12:29:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=MzlCpCkLmxVsznheZI3EKTdR1f5kwqDGSaj2tE3igtU=; b=Gvshsbpw/2T8JIx2xC/Yj1b2gosWPoRbQqc9xnkQx6kZGmYOkUDhIB27gDkHZnhhkP YdNd6b0Qa3SsOJVZqFNbXe8+62GV0NeDEla1b6JqwqrIG28L1AlU7jaybevMTho6JcaU mRQIoa+gy6PKrbFD08moLs/Jau2larhRyAN+o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=MzlCpCkLmxVsznheZI3EKTdR1f5kwqDGSaj2tE3igtU=; b=bnaZzSMIzbgFOqtgOnJZxT1NwUUmlfuQwB+NZTBKSam0xipVh6Uxet0Ah1LXAzzG0I AktDoRrX08mHUDvLK/bn7nzuYgaWI6u4annlYrb6xrHKv8dYj+jrtYBtE8ycUWdAOlwi 5U7C7QK5CVV9wFz0xEn+V2H9Tjlo4/cdrU2Aasi0m3FqBTG0big1ykKk8mgI3aczds9r hWb6lCiWHnIwG0VX96StTGvihcWrRgvvD8Wj7kpYfKp6LLUi7jVybvkxdlqL80tMsFEm hTIAS0ixCQFpNvPflr69ufhZ0ACDPH1IRM7hBovf6ATgm/wJ7RXt1Vvv/9UQfOGdXYag I6Dg== X-Gm-Message-State: AOAM532yWDTr/CcG52NIvjr5/1cDmGBrEpW6AWke0WOeFnQIv2OZrWkw yoYxo3Z4KDmg3rmv/Q7LJbqwUA== X-Google-Smtp-Source: ABdhPJwZQMO8NMtHz9UcwGY1H2/3ntfrSkqcPsM14xB1bASd6IqHz3hxpya84TyWYDZMuPiE8WFqIA== X-Received: by 2002:a17:90b:949:: with SMTP id dw9mr788298pjb.20.1612470598230; Thu, 04 Feb 2021 12:29:58 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id j1sm6846456pfr.78.2021.02.04.12.29.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 12:29:57 -0800 (PST) Date: Thu, 4 Feb 2021 12:29:56 -0800 From: Kees Cook To: Yu-cheng Yu 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 , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin , Weijiang Yang , Pengfei Xu Subject: Re: [PATCH v19 20/25] x86/cet/shstk: User-mode shadow stack support Message-ID: <202102041229.237544D@keescook> References: <20210203225547.32221-1-yu-cheng.yu@intel.com> <20210203225547.32221-21-yu-cheng.yu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210203225547.32221-21-yu-cheng.yu@intel.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Feb 03, 2021 at 02:55:42PM -0800, Yu-cheng Yu wrote: > Introduce basic shadow stack enabling/disabling/allocation routines. > A task's shadow stack is allocated from memory with VM_SHSTK flag and has > a fixed size of min(RLIMIT_STACK, 4GB). > > Signed-off-by: Yu-cheng Yu Reviewed-by: Kees Cook -- Kees Cook