Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3157196imu; Fri, 23 Nov 2018 22:56:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xw2MxKz6AB9elwjUv/mkgirqCPjTyPT30LaYLrEoueYBkfAKl1i+g6xCF+HKnfHbJJU0nt X-Received: by 2002:a63:e950:: with SMTP id q16mr16831049pgj.138.1543042598263; Fri, 23 Nov 2018 22:56:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543042598; cv=none; d=google.com; s=arc-20160816; b=liLIb+5BxyOjgm7G+jkwjPgwb3I6JNRlT46Cei1JAO3CtzoE3UJMoADrIC+un5yQMI 7dtoTXmV3h1XvryOjcExKhJ06981tLR4aS/Hu/eUcNPXA2dazrsWlS5fns2O32qVZU8j ciJN6PIPLCZJ/xyFpXmTkRtly5y+VwoqRgZBa8MUo8KeGuIwU7jvAuGoSlyM9w37uo4O WnqoAZOIqVUDc4NYqDXwdHeignjz1A7W6qc8e6fz28+y4UKRFHH8f4CUxweLSyNjOuWY zS8MoVfGMuVjV2ADtWxmOVV6ITXG1TNgmHlM/f9PXRPGSFWbt07daw3dJluH7CUSIFTt 7IBw== 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; bh=ugR/pBl3KdQ6ZcHhkbBykzrhgV4zZJ3qFIxPsTa39cg=; b=ifjUgAP810sjQWx+bsROa9mnakKlpKwG+WGf0/qn/hdUM1msL+XcXvkdy/grpbbBuM /Lmc1ex+0fsoMd/AAQjVlon+N8dG57teOKd9kjJsvuZMbeQly7e14Pi/EIih/UAPBc2M BoO5J9ViuEoYF9AdlBPXJm5nPflZ2aEEKl1maeP1PfTaPIbTygHIEJvu/aT0gVrKLt7L fM1rmVvcHveZrvE8Z2gTKDDh/DTzObWrnob6qTaWZnWYClK9ZuADsRtOz+XreLS5pfp2 uka0w+qIO1qoLOlgOMMiD6hBUVd4LapSl6lupdbQEe3kNvi8RpSqiEkIQv+pbtgurIGu VVmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="SNwb6U/z"; 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 r23si59106108pgu.359.2018.11.23.22.56.23; Fri, 23 Nov 2018 22:56:38 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b="SNwb6U/z"; 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 S2392076AbeKWDnA (ORCPT + 99 others); Thu, 22 Nov 2018 22:43:00 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:32870 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388916AbeKWDnA (ORCPT ); Thu, 22 Nov 2018 22:43:00 -0500 Received: by mail-lf1-f65.google.com with SMTP id i26so6981116lfc.0 for ; Thu, 22 Nov 2018 09:02:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ugR/pBl3KdQ6ZcHhkbBykzrhgV4zZJ3qFIxPsTa39cg=; b=SNwb6U/zcindOVTotPf3EMMg4asOprrHbqhg+8b/S9xsBDT9gF6ls3MQtGCrd0l9mh p58J+rRwQqG6Zz+OxOVDviInIMzacJTS5cYqmZ2/K3VD255LRO4He9SbqFwwCikGbheX BCNl/8qamdc6bfT5AII5/AmJxYZcB7Wvb++Hw= 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=ugR/pBl3KdQ6ZcHhkbBykzrhgV4zZJ3qFIxPsTa39cg=; b=FQohw0RgRZfatlrO6s5OJRmDaR3sKmDloDyfUtZGnMOFPRj9FZYxT8rLt1SPJ+tg7b lCdgzwvOyYxkh6U1WbLWkfOm7Z8foSBfYphf2EW1mgD0gX2ztYgg2Vnmrfrzt2R2bbSI V1/46WbkVhObd/dPd8uwVwtccMsLVzrXAAFe7J+T1Xfa+m4F7PURxtQGj0+lCKi1tL0u N56S0zzOggO+YjUkIIdhZ3hu7seE0nsXFVyY+3/xfgyIa9ADNubOtIJYqbYiPckNwdfI rlmlyeBj1bffs/Ig/3w54aE8CfXj+hFSD4vDcOMYTz7I09/Rf7w2ayGi+xXVMy0kN3Yi QshA== X-Gm-Message-State: AGRZ1gIMTgnMBX7QtDHb2uDwdRKqbfh3kf8sa0Wzt93ATu6ocruVMyOl ehjQk/Lm+UIZC2FE3qVBg7YuxWQdA67dFw== X-Received: by 2002:a19:2b54:: with SMTP id r81mr7333335lfr.34.1542906162335; Thu, 22 Nov 2018 09:02:42 -0800 (PST) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com. [209.85.208.176]) by smtp.gmail.com with ESMTPSA id m13-v6sm7643724ljg.56.2018.11.22.09.02.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Nov 2018 09:02:42 -0800 (PST) Received: by mail-lj1-f176.google.com with SMTP id s5-v6so8515022ljd.12 for ; Thu, 22 Nov 2018 09:02:41 -0800 (PST) X-Received: by 2002:a2e:95c6:: with SMTP id y6-v6mr7242500ljh.59.1542905767057; Thu, 22 Nov 2018 08:56:07 -0800 (PST) MIME-Version: 1.0 References: <02bfc577-32a5-66be-64bf-d476b7d447d2@kernel.dk> <20181121063609.GA109082@gmail.com> <48e27a3a-2bb2-ff41-3512-8aeb3fd59e57@kernel.dk> <1c22125bb5d22c2dcd686d0d3b390f115894f746.camel@redhat.com> <20181122103231.GA102790@gmail.com> In-Reply-To: <20181122103231.GA102790@gmail.com> From: Linus Torvalds Date: Thu, 22 Nov 2018 08:55:50 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86: only use ERMS for user copies for larger sizes To: Ingo Molnar Cc: pabeni@redhat.com, Jens Axboe , Thomas Gleixner , Ingo Molnar , bp@alien8.de, Peter Anvin , "the arch/x86 maintainers" , Andrew Morton , Andrew Lutomirski , Peter Zijlstra , dvlasenk@redhat.com, brgerst@gmail.com, Linux List Kernel Mailing 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 Thu, Nov 22, 2018 at 2:32 AM Ingo Molnar wrote: > * Linus Torvalds wrote: > > > > Random patch (with my "asm goto" hack included) attached, in case > > people want to play with it. > > Doesn't even look all that hacky to me. Any hack in it that I didn't > notice? :-) The code to use asm goto sadly doesn't have any fallback at all for the "no asm goto available". I guess we're getting close to "we require asm goto support", but I don't think we're there yet. Also, while "unsafe_put_user()" has been converted to use asm goto (and yes, it really does generate much nicer code), the same is not true of "unsafe_get_user()". Because sadly, gcc does not support asm goto with output values. So, realistically, my patch is not _technically_ hacky, but it's simply not viable as things stand, and it's more of a tech demonstration than anything else. Linus