Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2952910imm; Thu, 24 May 2018 19:47:25 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq8cwR7VOwU5Q4nh6ZmEnqWxd6JZtGYicDtxZSq1JlmvM+h1F8diQ6OSFDkhc++Ze2gfZXh X-Received: by 2002:a17:902:4603:: with SMTP id o3-v6mr643551pld.49.1527216445203; Thu, 24 May 2018 19:47:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527216445; cv=none; d=google.com; s=arc-20160816; b=0HWhQZSB8PxNl95TMHJcdW1eC3BDJnpGSn91Y3d+hHCUpXQM0kdAoTxn5DcCWBtEk1 nW+O3UgBhY6tsHTeRtrgyx0jJinCdoDHawVFfrWV/6xyyS9VFoBgvOE8eDR84Hwbvl6/ V3rDFvjpIsdSzi2AkacKLP2+IqWJuQJ/T/LIABoeAK9JKRuMxnFPoWPeuc0CUgjggkF0 cwUVoGpHGGSaJzOQC/jKEevlv5o32r+jU8OEMEUu95ksDieZWD3yGkASuA7L3eoX4OpB Hl3NaqNgajwk79/aR9R2X+fUM4ecAV49MMiIQ1TtBNOjv/c+/H8EyId1LLJ49/p9JGHQ QUSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:arc-authentication-results; bh=FGVQ6iZaHQFXA46PFTLaeHksmiYJSNj3HQl3y2f+lis=; b=F+xKPnd/Vn7N6UnGH1tWadmrMvtMbU3CcPWCL/6kdbsb638ET5A1srDHTR70Ko8RXx 6Zn7t7cCj1bV6y0JqKY/ewYX86MpX8vzCmeHFueu2c9DxG6DUkPlmtlLaDlHvyVPvVVs 1S8G5kX4hTK7pVglOTTFSzJ4kkeBd34LrBGtgW3wYX3zqs1yLTbuTQI0rd2y4PVcMz21 SXHhx4PjDLPGm/Zob3sZxZgRMLdkGLa1WVi5cwJ5nzew0UYbMZssmrKJzo8yyvybenEz 2qiSAobSW4wJ3X2S1BaxVLJJEjFu/F+dCdXi8DKSAauPxqCClKz1JaNcloF/6R6ZfEUI 3Gow== 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 c23-v6si22785788pli.540.2018.05.24.19.47.10; Thu, 24 May 2018 19:47:25 -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 S935887AbeEXWn2 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 24 May 2018 18:43:28 -0400 Received: from terminus.zytor.com ([198.137.202.136]:41593 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935803AbeEXWn0 (ORCPT ); Thu, 24 May 2018 18:43:26 -0400 Received: from wld62.hos.anvin.org (c-24-5-245-234.hsd1.ca.comcast.net [24.5.245.234] (may be forged)) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id w4OMhM5c803490 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 24 May 2018 15:43:22 -0700 Date: Thu, 24 May 2018 15:43:14 -0700 User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT 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 From: hpa@zytor.com Message-ID: <26B017D5-4063-46CB-8768-B0E5E7CD3838@zytor.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On May 24, 2018 3:31:05 PM PDT, Nick Desaulniers wrote: >On Thu, May 24, 2018 at 3:05 PM H. Peter Anvin wrote: >> COMPILER AR: "=rm" should NEVER generate worse code than "=r". That >is >> unequivocally a compiler bug. > >Filed: https://bugs.llvm.org/show_bug.cgi?id=37583 > >> >> You are claiming it doesn't buy us anything, but you are only >looking >at >> > the paravirt case which is kind of "special" (in the short bus kind >of >way), >> > >> > That's fair. Is another possible solution to have paravirt maybe >not >use >> > native_save_fl() then, but its own >non-static-inline-without-m-constraint >> > implementation? > >> KERNEL AR: change native_save_fl() to an extern inline with an >assembly >> out-of-line implementation, to satisfy the paravirt requirement that >no >> GPRs other than %rax are clobbered. > >i'm happy to add that, do you have a recommendation if it should go in >an >existing .S file or a new one (and if so where/what shall I call it?). How about irqflags.c since that is what the .h file is called. It should simply be: push %rdi popf ret pushf pop %rax ret ... but with all the regular assembly decorations, of course. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.