Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp31149imm; Fri, 25 May 2018 13:37:08 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpLbF5bRSBuqLb2IljQME3QEEz8jHfYjlyixLOknlMCVIX4I7ceA1Ljr6iKWF8MALl/ljy1 X-Received: by 2002:a62:981d:: with SMTP id q29-v6mr4022597pfd.65.1527280628366; Fri, 25 May 2018 13:37:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527280628; cv=none; d=google.com; s=arc-20160816; b=R8+22JdN3Xo0U03jNhy9u5LLjDX70QkI7n9PIpzmADviLvpaSyZ28sJBlXXsgvMp6K UqvWunibZkKlmd76MP5B2tcInqut1677dCfXzDxVwTwQJINIeMWofbMWLeFl2LdiIIxJ Nvlldjff64p3Lml2R/hmeNyv9vtSEyq44e4ylSTzrhwLGZEpRJ/G3awQSYGE4Sqd31su 806sJ7Tzzvqy/NSMfxL4/9+PvSeYJORoyUeuRMeRlfRMv8kp+oHKwAjamFHGRGpwRST/ n6hvl/84r1WOqKjHb/0+3ISeCK6Xc9Lu61V0+tpxO1x59bIUpH+ystKGbeYAG1105FEV rk9A== 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=fxyKmIBGFsB+HptZu/Tmce3uTqQzDa4VelJugeO5/bk=; b=EBGLpHaVcNTFnht0PrsPCxBW+2xQod6mEecY4ZiA4Iai9MFjO1b8+zjD9VNGrUW4tj bRviSZZK8dXg3DpRHr3PG8LvYrkLafRtAZXhZaR5Gr+lM2iEXXiBjfG45GOvS67Q6tHr bbqZmhXjIHwdChbQb0zfOwAY9bXzae3QAPw8fCN2LgQcA4ycj9qG9+RjWGblKkYnTW9z jvuN5eK3BtccXKuaERHhIB+QwfZ3do45psg1RXvlV506gp9wKf705mUxnAC2WKDhWVVs G3f1Ix6WKFh2rb4pHSLKa58/jwUONjO48edSJsjI7lNwxQrdr89dAbYLhnvsNFeieU/7 vdRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=rQnxEzuO; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e129-v6si24940043pfa.217.2018.05.25.13.36.53; Fri, 25 May 2018 13:37:08 -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=@google.com header.s=20161025 header.b=rQnxEzuO; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968354AbeEYUgl (ORCPT + 99 others); Fri, 25 May 2018 16:36:41 -0400 Received: from mail-pl0-f48.google.com ([209.85.160.48]:35030 "EHLO mail-pl0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968220AbeEYUgj (ORCPT ); Fri, 25 May 2018 16:36:39 -0400 Received: by mail-pl0-f48.google.com with SMTP id i5-v6so3773627plt.2 for ; Fri, 25 May 2018 13:36:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fxyKmIBGFsB+HptZu/Tmce3uTqQzDa4VelJugeO5/bk=; b=rQnxEzuObl341Bl3x1/Yq0UmmkSKdSF65mRQ2jrlZr8LZHjZmCG7mqTFZsxanVdYLg zp24cmfhQkzBWizL8XAGbPWDnAT407npoafGV5WONw0wUCVAJzRzKRRsFbjgvM2B0Hjw 1N2qnxmD2c1G3H+aHAHfkDYFyo1jaj7ua+UfAnmUBDyb1bbuTRDk3y9iqxB/x73dt2v9 wfSercyVXYan2HbJuaDzmKdTa1BDXEOaCXeqxMgcE21Xs2eRfC+akbsUmtob3+x97rz+ HNLp80JXt9C7fa/F/dLBs1UJZ6/tzevo6oGBZyBm0SP/2TVXoK2Rrczfi9cBDKBK7c4I sa3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fxyKmIBGFsB+HptZu/Tmce3uTqQzDa4VelJugeO5/bk=; b=M/Y3o2750695tR0ZQz4ruHczp611tKJJv5vvGU2TEVEyCO4kXgcwCpBQrrYFLyNjCI 2/KmPv1sQ7xhl5N53SOAZku9uaPLOd98uAsW0Wf0GyQxyjmPm5OOJSrfcjvC4R5Pn5o0 z+/EhmnZzqDfS+AFo/UF8j6kSWT6wXpi8VjV89cTBZU6Ak9NUOu0HV0vBgNmJ4HTN2VG wxJDrpjLiC60mveTvn6atfqVzl34L/h+iWNv+PwXEiJ8u2M2c97f1+v4pie3T7vM6mWl hY0a/+LVfA0yT9E1YDcaAQaU1em4aib91oow62XsE+aSNy1TlyfJ7Ew1U7b3GP2h7N3Q T7rw== X-Gm-Message-State: ALKqPwcifd6OwlOUFDj6atvfSDbYGLrDdUYhYJZc7Bl//Oyl+wrbgqDz Gx2DdJZvJU7Hwa7/2fvEkfddK+BF39pdnoF3p4KTzw== X-Received: by 2002:a17:902:a60e:: with SMTP id u14-v6mr4020102plq.233.1527280598851; Fri, 25 May 2018 13:36:38 -0700 (PDT) MIME-Version: 1.0 References: <26B017D5-4063-46CB-8768-B0E5E7CD3838@zytor.com> <319FB971-ABB6-4BE7-969B-D87D84853196@zytor.com> <31A5469A-176F-451F-886A-ECD649DDC78C@zytor.com> In-Reply-To: From: Nick Desaulniers Date: Fri, 25 May 2018 13:36:26 -0700 Message-ID: Subject: Re: [clang] stack protector and f1f029c7bf To: hpa@zytor.com Cc: Alistair Strachan , Manoj Gupta , Matthias Kaehlcke , Greg Hackmann , sedat.dilek@gmail.com, tstellar@redhat.com, LKML , Kees Cook 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 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`? 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`). -- Thanks, ~Nick Desaulniers