Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2951372imm; Thu, 24 May 2018 19:45:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoXcbsF5qjPXDNiF9nhOGanN6ds9iLLSMi+27kVjfDYDzrfkjW3UqLTN9Gd3qqj8V7+Ny64 X-Received: by 2002:a62:7682:: with SMTP id r124-v6mr617266pfc.80.1527216322987; Thu, 24 May 2018 19:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527216322; cv=none; d=google.com; s=arc-20160816; b=DpFY92DDxtMknywafg3JJLI7ghJeOTCdGqcsC2KSVLjInFdgyFEfFX1i+KyDbYTpbi thTykjg/JM2uGNhJVBNqotDRFcub8XRRWS59zkougxD/u5Zf5iGKOp2ljBJbiHUGBqj7 q99bTZc8rHVV43q8/4FrnDADXTrTQOGT/RPkFtSgK+IqgrDfPrQJ1T4McxQ4xk71qBAq WXwjq/iiGIeSFqGN0X6tQkq4/TCCcIkuwN2YQIzUm2y+QE85UBof9aU0Zc0GDaI5oiAm iPMlUtl5vFA1/hyPDkZj5+XAxq3/1oqCIylDbpzERZYqfsgz51TIWDO6uQo5iS7c7NNs 1r3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=XHigl/EzmCRIQ6ezhCIoyjFeA8jgxSmSqdhP//GyqQs=; b=mqNSfSLxr6gY8ckVOin5ztXDKgVnq4vmMkPKdK06N2jBLofaCjfFVdfNYljD9ZtW3K e9q0EJuO7VydXtBbOd8bDj0aGGlr5BiJyMExcj6/KkeHlE6DmQ860GPtA00CqBCldGD1 EfQK0OelK2CLYKMqfk0/ASNaJeAHrGeKUp6KoquQ9VRxW/7TcXxdV4BdPHKRF+n4sGsv GX7ZqDD0peGIpEIFOWCwxEZxG0Cbb1VMm185+8nOXsWoLLGFYJbSu+C4R4aDiFa6fvpp T09VmfPCIIXHPpZEX0x7ws+Dz1/V84KNAcHuzsn+wiS7C4THlXNDkYTe+qHmLIfIqQ8P im5Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v61-v6si22638816plb.499.2018.05.24.19.45.08; Thu, 24 May 2018 19:45:22 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161558AbeEXVtp (ORCPT + 99 others); Thu, 24 May 2018 17:49:45 -0400 Received: from terminus.zytor.com ([198.137.202.136]:42261 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966099AbeEXVtl (ORCPT ); Thu, 24 May 2018 17:49:41 -0400 Received: from hanvin-mobl2.amr.corp.intel.com ([192.55.54.40]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id w4OLnaPY788193 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 24 May 2018 14:49:37 -0700 Subject: Re: [clang] stack protector and f1f029c7bf To: Nick Desaulniers Cc: Alistair Strachan , Manoj Gupta , Matthias Kaehlcke , Greg Hackmann , sedat.dilek@gmail.com, tstellar@redhat.com, LKML , Kees Cook References: From: "H. Peter Anvin" Message-ID: <40166a47-749e-e6a8-41fa-e5dc0defaaab@zytor.com> Date: Thu, 24 May 2018 14:49:32 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/24/18 14:12, Nick Desaulniers wrote: > > Looks like those builtins got added to GCC around the 4.9 timeframe: > https://godbolt.org/g/9VS2E9 > > Problematically, it seems that GCC does not have __has_builtin to do > feature detection: > https://clang.llvm.org/docs/LanguageExtensions.html#feature-checking-macros > https://godbolt.org/g/oku8ux > We have support in the kernel build system for doing that, though. I just added a concurring opinion to the gcc bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970