Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1006610ybf; Fri, 28 Feb 2020 11:58:09 -0800 (PST) X-Google-Smtp-Source: APXvYqwZQ53PNBJttG9dkCj8dbt00WKZOXx6iB7nHkvyuPloF6o/N/Z5o5PLncOb5UqJTLn5fV7G X-Received: by 2002:a9d:5e9:: with SMTP id 96mr4667955otd.307.1582919889278; Fri, 28 Feb 2020 11:58:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582919889; cv=none; d=google.com; s=arc-20160816; b=jWPOex7ZBa0k+bFhchTVDuRBLLYSUvCG4pCbgiENiKix20NIwR6/b8Aj75zIoyp58H MyJD4QEy7n3/fKirN7Yey1hTlvzf5k7yz+ULQxqzDxGfcQqYj/77+NArGqUV8fURjFfO 4LvI2quJ1wI10qvXJYVU+G9Zs2pLNq74u4SisjzuDi1uFuafGkabqLNzb03Rzm8rDDVV gxSQ65llIsvxBSLPAfyeswXcTp/nAOVQYgreax9DTlH4+4l2CfOOOcA576RqJsqMG0Dx f4652E9LmLx5QSjosoDx5Yw0aaIDbIhX8YBckOGoTBHQvDTr1W/2r+7+qWXNaHyc35gA rrXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=qzyPMbc5DGWcD+LKGXVvDftxPOX7js/taprX6IXoYpg=; b=LECobl2Gi3xFgpi0VGpR8OFNAAQNAFQgDEFIM1W4yEpepKthf5/1/1OAp/LHd7k/f8 heiX8AOjTvcofX7kEcLCUHanrFrUkuiZ7UaYWuZVvog2ZfbIipcXPDkaXSPqhQlIOtUy Q93C5BzjOITnr9mJryyIGVbFeu2tiHoaSIgPW3HvqabgML71UfnN38JGs7j/3LTTKgiy fFMFcYrWo1c9a9Wpebid9pKUEn7NLicTNwKwnzFN5j0ek8g9ZFN2rP503vuwLyYN8Nrr TYEvkcqkKAPGglRztIdPPLm1qy3+smUc8JjXDfuENCHz82rf71ARSb+wHIUMrom8rnn8 ey0Q== 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 67si2069812ott.243.2020.02.28.11.57.57; Fri, 28 Feb 2020 11:58:09 -0800 (PST) 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 S1726980AbgB1T4p (ORCPT + 99 others); Fri, 28 Feb 2020 14:56:45 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:36826 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725769AbgB1T4o (ORCPT ); Fri, 28 Feb 2020 14:56:44 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j7lkV-002ZFK-P1; Fri, 28 Feb 2020 19:56:39 +0000 Date: Fri, 28 Feb 2020 19:56:39 +0000 From: Al Viro To: Peter Zijlstra Cc: Josh Poimboeuf , Chris Wilson , linux-kernel@vger.kernel.org, Randy Dunlap , intel-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/i915: Minimize uaccess exposure in i915_gem_execbuffer2_ioctl() Message-ID: <20200228195639.GL23230@ZenIV.linux.org.uk> References: <20200227223542.GE23230@ZenIV.linux.org.uk> <20200228010342.3j3awgvvgvitif7z@treble> <20200228180441.GL18400@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200228180441.GL18400@hirez.programming.kicks-ass.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 28, 2020 at 07:04:41PM +0100, Peter Zijlstra wrote: > On Thu, Feb 27, 2020 at 07:03:42PM -0600, Josh Poimboeuf wrote: > > > And why not mark gen8_canonical_addr() __always_inline? > > > > Right, marking those two functions as __always_inline is the other > > option. The problem is, if you keep doing it, eventually you end up > > with __always_inline-itis spreading all over the place. And it affects > > all the other callers, at least in the CONFIG_CC_OPTIMIZE_FOR_SIZE case. > > At least this fix is localized. > > I'm all for __always_inline in this case, the compiler not inlining sign > extention is just retarded, FWIW, in this case it's salq $8, %rax sarq $8, %rax i.e. 8 bytes. Sure, that's 3 bytes longer than call, but really, WTF?