Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1338166imm; Wed, 10 Oct 2018 12:55:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV62oq8CW7LX2EjhHvibt6Y8xQ2nZvYbfXyQMMEH+oJ2ITSzJCn0jGICnCAtq0CMpPwY+Rgga X-Received: by 2002:a62:3a43:: with SMTP id h64-v6mr35910628pfa.119.1539201356196; Wed, 10 Oct 2018 12:55:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539201356; cv=none; d=google.com; s=arc-20160816; b=CoKfk9z4AjTWcOpEbhC3ll1GIh5PUus7Ei1ek306q2psJpejrziIHeSzW0K5TeFsDD xf2aX7UTnsP+qIeKvvKex/AF51PejwEW5+njnD1DpXwlU6nEqoOcxOD8T49R5SWzLlTg aoPOB4Qv7u3zndOyog5Y+PvWH6YXwJDuVOQg5GQ6ocv3juY/cZ0YRX+CDHcdao2wJhgz uicD24bKVnnxp2xBWkpIhE1f+7nQsxInvRdvpuLAMK+trWHYP1y2xTrWeWe2SJsB6yj2 nenJjbGVrtfWzoyszVu8qZ5fVI3a5tuwSQMjXG1cWGBIQbpSFO6/MDlp3Z6HYFDm0eZz /AiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=satEcIaVE46Ivvy6mQ3r69sWumGmL6nd8DbdoYTT8Uw=; b=wOe9O30FsyhuZxjK0Go81mshjmfYGwnyhXMTeVxPRXP9PuUX7H4i+JM6RyvnMDuYXs c8SYhjqN3GuPFz52f0hNC708jovzRm6m8NhNfe+utjg+dxEGsZqoRGCMACoLuw/PLR6v erb6DH1os4ccQYcdLhK+l9TiNSkkoL1loh2Lxp/JzvbFHjMLa/9n9XnJxHjgm13Blo8F WpIt3yqovGDjQXp5H0GXrzqj+C2+zYv9dflPN1bFPODtCx/cKRRSCLRReanWpdg7/uJq G7FgKmtJ1TfCGqPje0+GNjDVXpO9vkUwPg9irkN7Ylhv/dzdnhePtZ09TkImGkDxYM6a ZS0A== 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 r144-v6si31775544pfr.100.2018.10.10.12.55.34; Wed, 10 Oct 2018 12:55:56 -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 S1727569AbeJKDSm (ORCPT + 99 others); Wed, 10 Oct 2018 23:18:42 -0400 Received: from gate.crashing.org ([63.228.1.57]:36179 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727360AbeJKDSm (ORCPT ); Wed, 10 Oct 2018 23:18:42 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w9AIseq1011514; Wed, 10 Oct 2018 13:54:41 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id w9AIsZJK011445; Wed, 10 Oct 2018 13:54:35 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 10 Oct 2018 13:54:33 -0500 From: Segher Boessenkool To: Borislav Petkov Cc: Ingo Molnar , Richard Biener , Michael Matz , gcc@gcc.gnu.org, Nadav Amit , Ingo Molnar , linux-kernel@vger.kernel.org, x86@kernel.org, Masahiro Yamada , Sam Ravnborg , Alok Kataria , Christopher Li , Greg Kroah-Hartman , "H. Peter Anvin" , Jan Beulich , Josh Poimboeuf , Juergen Gross , Kate Stewart , Kees Cook , linux-sparse@vger.kernel.org, Peter Zijlstra , Philippe Ombredanne , Thomas Gleixner , virtualization@lists.linux-foundation.org, Linus Torvalds , Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org, Andrew Morton Subject: Re: PROPOSAL: Extend inline asm syntax with size spec Message-ID: <20181010185432.GB29268@gate.crashing.org> References: <20181007091805.GA30687@zn.tnic> <20181007132228.GJ29268@gate.crashing.org> <20181008073128.GL29268@gate.crashing.org> <20181009145330.GT29268@gate.crashing.org> <20181010072240.GB103159@gmail.com> <20181010080324.GV29268@gate.crashing.org> <20181010081906.GA5533@zn.tnic> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181010081906.GA5533@zn.tnic> User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 10, 2018 at 10:19:06AM +0200, Borislav Petkov wrote: > On Wed, Oct 10, 2018 at 03:03:25AM -0500, Segher Boessenkool wrote: > > The code immediately after this makes it size 1, even for things like > > asm(""), I suppose this works better for the inliner. But that's a detail > > (and it might change); the description says "consider this asm as minimum > > length and cost for inlining decisions", which works for either 0 or 1. > > Thanks for implementing this, much appreciated. If you need people to > test stuff, lemme know. It would be great to hear from kernel people if it works adequately for what you guys want it for :-) > > You can think of it as meaning "we want this asm inlined always", and then > > whether that actually happens depends on if the function around it is > > inlined or not. > > My only concern is how we would catch the other extremity where the > inline asm grows too big and we end up inlining it everywhere and thus > getting fat. The 0day bot already builds tinyconfigs but we should be > looking at vmlinux size growth too. But this isn't really different from other always_inline concerns afaics? So you should be able to catch it the same way, too. Segher