Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp54497imm; Fri, 25 May 2018 14:07:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq5OMjpeJcNdNpsDGq7Og2gyn5RS6SStyBgP/IaPXr/xoEFonWQ1RRT+H7tJpm4MmCTYcgy X-Received: by 2002:a65:4502:: with SMTP id n2-v6mr3120210pgq.95.1527282423685; Fri, 25 May 2018 14:07:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527282423; cv=none; d=google.com; s=arc-20160816; b=m2Lcerk79n+Bfd0Du0gn3ay5evgfNZxwatgtg+LoFC2tnuOQty/Z7ZiRnAByio/aZK G/Ay6aUSUlBaJZ4WafVO+ZjdzHyM3dN7kVtnTfcQOxC2M2wymCnsRyXdi7lGHt/9S73o VMkUgG9aKoTlNCLq0GLrGGq0jeMl2zsj5gLCUr4R/YCSQkQSe3pE1OFFHxA/c4mjzlCX TvZllMKj7leRjCYg6Mfc8pIVZc+0ceiNATaqQ69xcAzC24sxDihmUs3W30az85bgOJh/ KCD77RxreluHzewalzectH8wVWFIjdKtqg3QwH/ip9YvjjPCRelFKi4mzrMp4u5nm9Dh yFxA== 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=u9hftj6C7LCRDiL0ScHkOX8x0+47Kv3WaF+hul6dwtY=; b=taUQAL2Zig9U6DdAPh6RKYEZScP9oI3IQARQVePMhD7nU3cs646GMH3xyooZJdqtQ4 iNK6khBWGJ4S3186ELa+GKNAoU//yiwk5wn5wLAaQQOzDwKPhgd1DES96Gpi/6UJhSf4 eNrJzFOGb3WISwmMuVhvvqpn9P7dmuAySIs9gX/DhWBfpg+/RoVdOylRbc31qLdxa/UK giJnQnOMQatBzALjm1Khiinm4+RJyy+21GytUdBugO1BaJ77gXquvtGz0rX+rNz81ajU mu/hpcThrJaNBiTMx+ehuyn18WnmHe+VhYwEGHGkqZL25/9+EdU6kCT9O5VQ6phoViqV ZiTA== 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 c13-v6si18110869pgq.616.2018.05.25.14.06.47; Fri, 25 May 2018 14:07:03 -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 S968451AbeEYVGh (ORCPT + 99 others); Fri, 25 May 2018 17:06:37 -0400 Received: from terminus.zytor.com ([198.137.202.136]:40265 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968376AbeEYVGg (ORCPT ); Fri, 25 May 2018 17:06:36 -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 w4PL6URp1204678 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Fri, 25 May 2018 14:06:31 -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: <26B017D5-4063-46CB-8768-B0E5E7CD3838@zytor.com> <319FB971-ABB6-4BE7-969B-D87D84853196@zytor.com> <31A5469A-176F-451F-886A-ECD649DDC78C@zytor.com> From: "H. Peter Anvin" Message-ID: <38f21c66-fa34-3a77-33bc-d15065c15af9@zytor.com> Date: Fri, 25 May 2018 14:06:28 -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/25/18 13:36, Nick Desaulniers wrote: > On Fri, May 25, 2018 at 10:56 AM wrote: >> You need the extern inline in the .h file and the out-of-line .S file > both. > > But the out-of-line .S file looks like: > > ... > 10 ENTRY(native_save_fl) > > 11 pushf > > 12 pop %_ASM_AX > > 13 ret > > 14 ENDPROC(native_save_fl) > > 15 EXPORT_SYMBOL(native_save_fl) > ... > > I don't see how you can specify to the linker from assembly source that > this function should be treated as `extern inline`? > "extern inline" is a C directive. In the header file you should provide the inlinable implementation (which is already there.) It means that "if you don't want to inline this there is an external implementation available." > I assume you don't literally mean the C keywords `extern inline` but > whatever the equivalent incantation is needed in terms of assembler > directives (which I also don't know). > > I'm beginning to think that what you'd like to see cannot be expressed (at > least via `extern inline`). >