Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp246987imm; Thu, 7 Jun 2018 17:48:11 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKeZt1vlXpMmi+a4HSa8bf+GiP10qoGjrJmsSOw/WcFLp9wo6T6Q4RqToiVZKFytae5uh5y X-Received: by 2002:a17:902:42e4:: with SMTP id h91-v6mr4150685pld.27.1528418891512; Thu, 07 Jun 2018 17:48:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528418891; cv=none; d=google.com; s=arc-20160816; b=xKPHFfdoKCDTNLx7MDNsPNGhIEIzI+rD8Odjqf9bwBMVfkZEobVwL+jTXVUq1ViQD/ +HQ5ajlJGzv2ZAiAqq4tV2qQRnFet4vqyfW7dZ1SZzJ2IETRW49Q3zghWYp7pVSaj9Ei 0E4jnVsW4jedqKBdddokP/oYAKgOxYgbUqYBYJ0GRlpNUUdzERpUibfE8lMxxayAE6ya 1Qiw4PCtRm5CsbRqpi3rsUHRAZG2UrBs4R8cwRykd8WICtmFvlXx04fqyqFX/BC+TSt+ bkeJlDgG8FqMGmrcBL336F1tbuKE9xedopIOk+7GytCPH4YLVdI0mcZjcHALEPlQ7/v6 fSjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=1UQCV8RABLR0OQihWTNZoE/DqFWZnv2rqPz/9GkfY0A=; b=h4XXfdhYCfEBax7i9CvgVxubN+aBF7hMV8D/zUVrZIh7x0Kzf0nTFJYzEBkHOi/D+s IXQTAKTbRh1Evnavmzs+6fAk98PvcDvGyI5BVSygUrIg36gnRXmIO6hd04NSWbPnfj2X S6FH9WamyKl4rc/Slb9m+XHM/hq7yoP3WPsnrqzVQV7ailX/IncrL02g3DQGaahTsVz0 J8WLpQ0+bUsT7KTDcpop2FqFMxTP0LDLJQZAHOxclJaAWkMojkINkVieJxbR+KXYL80j 7Fa+e9Mwwxwn0GD4/O+QNjr/D659W/gaW2Tuq7rRT5d9rOy2CBHtUIp/nZq4MxzMe01q PQLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zRDyYmqC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z9-v6si12673538pln.250.2018.06.07.17.47.56; Thu, 07 Jun 2018 17:48:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zRDyYmqC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752630AbeFHAra (ORCPT + 99 others); Thu, 7 Jun 2018 20:47:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:47218 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752385AbeFHAr2 (ORCPT ); Thu, 7 Jun 2018 20:47:28 -0400 Received: from mail-wr0-f176.google.com (mail-wr0-f176.google.com [209.85.128.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DE06B208AD for ; Fri, 8 Jun 2018 00:47:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1528418848; bh=BFYsEP3KIs/UJ/g3xa53oBl8SbvI8q5sY2hMyWdX8vI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=zRDyYmqCFzoNu6H7TySb+PdmEKBktdpN96vW4VmOJcJtP/r2qt6Y6XSfHXM+vg+R0 Y6GhZNTXeEoxjGfvUg710d4Iw7tW8EWCIudM02/KmJ8uQo0C6vdj542DFqCqHWkxJg Vj7a8mebaTHttNeUQkYlVrk9jCuMj6Fb28KEJDPw= Received: by mail-wr0-f176.google.com with SMTP id d8-v6so11628356wro.4 for ; Thu, 07 Jun 2018 17:47:27 -0700 (PDT) X-Gm-Message-State: APt69E0aoOzBx8L2fS4rNaozlEiLej8Q2qQyo2lIpnjaZ63g+XMCMp3c I7fmSwnyfd8nYiL5Wb9bfIGFdhS8HiKP8w/BqDWvTQ== X-Received: by 2002:adf:b1ca:: with SMTP id r10-v6mr3085508wra.221.1528418846307; Thu, 07 Jun 2018 17:47:26 -0700 (PDT) MIME-Version: 1.0 References: <20180607143855.3681-1-yu-cheng.yu@intel.com> <20180607143855.3681-6-yu-cheng.yu@intel.com> In-Reply-To: From: Andy Lutomirski Date: Thu, 7 Jun 2018 17:47:14 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 5/7] x86: Insert endbr32/endbr64 to vDSO To: "H. J. Lu" Cc: Andrew Lutomirski , Yu-cheng Yu , LKML , linux-doc@vger.kernel.org, Linux-MM , linux-arch , X86 ML , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , "Shanbhogue, Vedvyas" , "Ravi V. Shankar" , Dave Hansen , Jonathan Corbet , Oleg Nesterov , Arnd Bergmann , mike.kravetz@oracle.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 7, 2018 at 5:31 PM H.J. Lu wrote: > > On Thu, Jun 7, 2018 at 4:00 PM, Andy Lutomirski wrote: > > On Thu, Jun 7, 2018 at 3:03 PM H.J. Lu wrote: > >> > >> On Thu, Jun 7, 2018 at 1:50 PM, Andy Lutomirski wrote: > >> > On Thu, Jun 7, 2018 at 7:42 AM Yu-cheng Yu wrote: > >> >> > >> >> From: "H.J. Lu" > >> >> > >> >> When Intel indirect branch tracking is enabled, functions in vDSO which > >> >> may be called indirectly should have endbr32 or endbr64 as the first > >> >> instruction. We try to compile vDSO with -fcf-protection=branch -mibt > >> >> if possible. Otherwise, we insert endbr32 or endbr64 by hand to assembly > >> >> codes generated by the compiler. > >> > > >> > Wow, that's... a genuine abomination. Do we really need to support > >> > CET on kernels built with old toolchains? > >> > > >> > >> Yes. GCC 7 should be able to build CET kernel. > >> > > > > Why? Presumably people running distros that use CET are going to have > > kernels build with a CET-supporting compiler. > > > > Good point. It was needed before GCC 8 was released. We can drop > arch/x86/entry/vdso/endbr.sh now. > Phew! We'll still need a patch to prevent configuring CET on a compiler that can't support it.