Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2945665imm; Thu, 24 May 2018 19:37:57 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqE+kHnXz4gInyKr9sqwlgHYN4DWs6JiHsU9Ods+TJ3+ZQ1nX/hXb3beTjvKUH3ZlHQ6JBb X-Received: by 2002:a17:902:a702:: with SMTP id w2-v6mr626124plq.8.1527215877037; Thu, 24 May 2018 19:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527215877; cv=none; d=google.com; s=arc-20160816; b=jVcA1Zerj+IpfMvSWKBobhyA2cWHoMMcq8EfewFkdEQyYCtptgo31aC07agpIb/Ell HAIcdMm5ijE0Fnq+dDcNN7AHKZD3C7bp432EnpqJw035rdaovKQmxCNVxt0j8o00CWz5 6Y3tNn7JFqNpCii5Bm9x6dcUr40ziGR1Vqfc43NMt5OdfmPvJNdaPSnE/25wFjoy+S5L izrJv5HVi1GNean1xCcTsYqDI/Lm2dvYt8gM74Ung4PRTMPYQjLsilCnrZdTGx9Za+fM 5M5ke8NGaNvFtMPDrhPbN7EYkGA9Xzt0aw5AMtyzZbUA+NMZv+6lDQ1dJq+jlj842LRX l5Vg== 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=QbT3hFjKUjMPZDOkW7JsZZF3WumKr64V2wO27gegU08=; b=yGEAoh1anhEIWPBGpEG/QkRlzGJ8+iuLhmqHKK4iXeBQlPPx3Sb2aamuyZ8mVuxwGv Gg1ODmSHbZuhi9f3aWPkjTbWf+5gDwjjx+mE3anCqjuIf4J0Y9I4GkWwr97A5h2k/Z/8 /kiumbZ5sSFueGBrjF/fpWFJxbAkkD//agOjcx4JNxsRwdhr5Wt6yn2g2l8Dmj9fs5Ji /9mcUlg67q+RczSU2HmnWDAG3lb2j3Uyf/4TLOYGUw8cnv4SafbQ1BFETZOZS6JjrYz+ /nC3Aj4JRoZIAi3ZtiQsf5Oa+0hxjVYETDqGMo7XGwwEzpx4zt6Htvy0lThEz95p0CAX UIqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=givPUkhU; 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 b96-v6si22925974pli.172.2018.05.24.19.37.42; Thu, 24 May 2018 19:37:57 -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=givPUkhU; 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 S1034351AbeEXSsy (ORCPT + 99 others); Thu, 24 May 2018 14:48:54 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:39965 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030220AbeEXSsw (ORCPT ); Thu, 24 May 2018 14:48:52 -0400 Received: by mail-it0-f65.google.com with SMTP id j186-v6so3717145ita.5 for ; Thu, 24 May 2018 11:48:52 -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=QbT3hFjKUjMPZDOkW7JsZZF3WumKr64V2wO27gegU08=; b=givPUkhUNCNbFgTjOOOLys5ifQyF8scwHwyhO+ugtS5tAm8ym48IItbPd+vJ89Hph/ FOchV3pxzeV7wSGz47ZQNLQyosTYk9FRNvlalIiQb+1UhaUZnaSyouzkscBb4v4wevuP thBQf21pVoQgEQ11EJIwhZ1HcUe0U+AcXVEZ16nQeDCYkYw4sU5+cVrSDH364tDWCMHU x3oCfAOZCtSSFpYzvp7NDvxCHd0owcRrTHRGII5Rfljeh52iZ1adajQcAHswV402rbNZ J+aY+JwBfYXNPeVY0o+ljduMk20GAAvZkS7E5ZaIjpbuk1v3fl26/7CVfksTyTw3t0ua OGKg== 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=QbT3hFjKUjMPZDOkW7JsZZF3WumKr64V2wO27gegU08=; b=pdzBL4Aq9OKFtZWVF/nCKRIiQE5XWJBLG0WKAw0k054TsazQuDfA5MI0pCQFr8LUSE /Vqqag92nP2tko/DSoSonGFZE1jb2jOg6FgM6XhwSl/cYWhf5CUdmNSioQ2e9dUh0hg7 mhZWCpMC7aTvryHHvu4JF+JTeLKLIb2UCggjA1pJxUfcUhVhISL7r3AQN5xaVTKxNEV5 FcGSdjrbj5Wowlh9RmEw4ECiB6kMUNSy2lpAodGA5mgWdg7kd5pQgm42iC/V/alPoA7B UpKBpd21QU6f5T5K4J2j/CQLQlD1fclbtvMqyefeRJiacVSSnV/gvdNh05cJyl89iuDx oIXA== X-Gm-Message-State: ALKqPwe2O4Fz8QfSYM16LEvMUCRl/eMSCg7wFQY6gSgJG3Pg4IzBZFA/ WCeNSFNJE3Wx2BOYBlQuCgCYCB7u1PpmIKsU+S+e7g== X-Received: by 2002:a24:f5c3:: with SMTP id k186-v6mr10651738ith.141.1527187731896; Thu, 24 May 2018 11:48:51 -0700 (PDT) MIME-Version: 1.0 References: <57C635C3-716C-4FC3-90C7-E394AA7242BA@zytor.com> In-Reply-To: From: Alistair Strachan Date: Thu, 24 May 2018 11:48:40 -0700 Message-ID: Subject: Re: [clang] stack protector and f1f029c7bf To: Nick Desaulniers Cc: hpa@zytor.com, Manoj Gupta , Matthias Kaehlcke , Greg Hackmann , sedat.dilek@gmail.com, tstellar@redhat.com, linux-kernel@vger.kernel.org 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 (Resent plain text) On Thu, May 24, 2018 at 11:24 AM Nick Desaulniers wrote: > On Thu, May 24, 2018 at 11:20 AM wrote: > > A stack canary on an *inlined* function? That's bound to break things > elsewhere too sooner or later. > But it's *not* inlined by GCC or Clang. FWIW, GCC can also insert a stack guard in an out-of-lined inline function, it just doesn't for this one. The -fstack-protector and -fstack-protector-strong flags are heuristic and the heuristic does not match between gcc and clang for this function. It is working on GCC purely by chance. > While the function is marked `static inline`, it's not in > arch/x86/kernel/paravirt.o due to: > arch/x86/kernel/paravirt.c:326 > 325 __visible struct pv_irq_ops pv_irq_ops = { > 326 .save_fl = __PV_IS_CALLEE_SAVE(native_save_fl), > see comparison of disassembly attached in: > https://bugs.llvm.org/attachment.cgi?id=20338 > -- > Thanks, > ~Nick Desaulniers