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 E268EC433E0 for ; Thu, 4 Feb 2021 19:50:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7B81664E49 for ; Thu, 4 Feb 2021 19:50:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B81664E49 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 082236B0075; Thu, 4 Feb 2021 14:50:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 057FD6B0078; Thu, 4 Feb 2021 14:50:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EAFE66B007B; Thu, 4 Feb 2021 14:50:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0125.hostedemail.com [216.40.44.125]) by kanga.kvack.org (Postfix) with ESMTP id D66C76B0075 for ; Thu, 4 Feb 2021 14:50:33 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id A01A83636 for ; Thu, 4 Feb 2021 19:50:33 +0000 (UTC) X-FDA: 77781627546.20.waves31_440406a275de Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 60FD3180C07AB for ; Thu, 4 Feb 2021 19:50:33 +0000 (UTC) X-HE-Tag: waves31_440406a275de X-Filterd-Recvd-Size: 4289 Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Thu, 4 Feb 2021 19:50:32 +0000 (UTC) Received: by mail-pj1-f42.google.com with SMTP id gx20so2438572pjb.1 for ; Thu, 04 Feb 2021 11:50:32 -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=XEd3fj8C4Ej+cJekaWRpKIX0Ali26hPYu3xkyPp+pQI=; b=V5fnl7iYb3ZfPR+qNCY00qtPY4Zo5HYT4FKsFoDpMe4St8xT2WymhYRfA9fonj0t3N Ry2p+pd8ObmedFtbRyxsyqpdCtPiUnK/CB8gzC4Rin9XIv5zwglllzt9qQtP3qrZnaNn Kw0ZealDwP8Jmc0Ncx2MO/2X5U9uN8ETdkHt0= 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=XEd3fj8C4Ej+cJekaWRpKIX0Ali26hPYu3xkyPp+pQI=; b=oriQcF5RATfl9+WvDGuHyD2llu7fb6L1Nna6lGgWEv+GyLxQSnHnb8ulJ4TkH/GWXH DEL0V+MK3WhiiitRd+uHF3alCFTpCtUFO0ldD38VPMaQSNH5Nke5xfyn1k8JqIE5QN8F GtxHZwVZfGe78tNrTRW1Sjv+Y2ubzEiBhhKKlD3sFBmo4eEBvSACOzzEq8F8syHcx0Kf 1rruRUVHi8mz8FhtloL5ofu+YP2p3S0c2U25F/DsCvMsW9NvAWAg5ZILa8aGAXIhxi4p Qf8pg8It2ssGxr4Iv0wKX3g8LijvY1ZYIgRcmTS6hbijwhnIRPi0frvRhViDcm/dYvlZ IwgQ== X-Gm-Message-State: AOAM5324UVlztHRQiphcsMwTYVfheYFsxwCFn28T9ADkj6Lnm4kP0C62 B6sxdvD4NF+sihMxygACFCAlew== X-Google-Smtp-Source: ABdhPJwfpfyghfmT/Ru4dywPKebiyk1pC42NUyPTKH7Ad7iGmSNe6CUYVTXcosUzU4cQj9KWOzUFPg== X-Received: by 2002:a17:902:8604:b029:e2:a249:4474 with SMTP id f4-20020a1709028604b02900e2a2494474mr651325plo.15.1612468232240; Thu, 04 Feb 2021 11:50:32 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id w13sm7059295pfc.7.2021.02.04.11.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 11:50:31 -0800 (PST) Date: Thu, 4 Feb 2021 11:50:30 -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 7/7] x86/vdso: Insert endbr32/endbr64 to vDSO Message-ID: <202102041150.20388FEF25@keescook> References: <20210203225902.479-1-yu-cheng.yu@intel.com> <20210203225902.479-8-yu-cheng.yu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210203225902.479-8-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:59:02PM -0800, Yu-cheng Yu wrote: > From: "H.J. Lu" > > When Indirect Branch Tracking (IBT) is enabled, vDSO functions may be > called indirectly, and must have ENDBR32 or ENDBR64 as the first > instruction. The compiler must support -fcf-protection=branch so that it > can be used to compile vDSO. > > Signed-off-by: H.J. Lu Reviewed-by: Kees Cook -- Kees Cook