Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp206493ybj; Wed, 6 May 2020 15:21:44 -0700 (PDT) X-Google-Smtp-Source: APiQypLa+7AWiEiSM1DTbHOYIldnJNpTeE6VgGLbWGpohJiZrYKXtrfqHrBIw7fXCHvbsD8BRjgY X-Received: by 2002:a17:906:4d8f:: with SMTP id s15mr9732946eju.288.1588803704501; Wed, 06 May 2020 15:21:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588803704; cv=none; d=google.com; s=arc-20160816; b=kGyQtPRFQEf4VjaLZwz2qeHlZeK6IpWgtHqrGZvb2wmxyqu7o3rdgTdtPCe3NEWSyf K1DA2D/e5u4jIsyTu+aacM8OtddHX+fMFf0N7c03aBUNn4tNP9GlDU6so362IMNo8vb7 eqI86+JGxfMlSiNh5aYRF6r57D3VgkFctBbSc5Wg/d4bLx3phCnNLfXu4sWvSWBLpXH5 WyoMATwGuy1HdXf5OWDfJ85PcOi7poU7IsvIaGgLJtCANhGonCbywVWbeFOnpVBCIQ4z VNMqZvfIk+M0Q5vg+c0cs/ApooSMvm9ZesztorzXNKqkS6tCmfYXARw5ezu4QWEKCue+ rRUQ== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=vSHgqbVKLds12+b0upO9EG6vIOeqc7PvbKZe1STmKyQ=; b=OCl5AALrOiZOwURRlDHfq8bIBE8Ego2HAM5K+DWf7RHuiq5X4HSC4yb550kIzqv/eu Pd848GMN+BjuVtbHa3Jy1TE1FkvAxcv738/pY8SF9pOa4e0dZGx2qQrDQ8BJL6yAh661 Vf7mRx+V8AaLia0mdxbxHj4sNJW9o/ed51SGekW5EiD15X25vG5G7ShywB+P568sxYLA VlmSneLhYFTK966zX4Tl3o4+k6vGI1aZdMopowJzVS06oX5HBEGKkjao0crmuArQpo82 SmYKV+irN/bPuF2BAFgLbBoDfHFsJoR48P12qHXNmGjSq/jB+zRnp0n+eIYoTNVDUQpu h3rA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k3si2127311ejk.202.2020.05.06.15.21.21; Wed, 06 May 2020 15:21:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730060AbgEFWSf (ORCPT + 99 others); Wed, 6 May 2020 18:18:35 -0400 Received: from gate.crashing.org ([63.228.1.57]:41528 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729114AbgEFWSf (ORCPT ); Wed, 6 May 2020 18:18:35 -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 046MI3xQ029691; Wed, 6 May 2020 17:18:03 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 046MI1Hs029690; Wed, 6 May 2020 17:18:01 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 6 May 2020 17:18:01 -0500 From: Segher Boessenkool To: Christophe Leroy Cc: Michael Ellerman , Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , npiggin@gmail.com, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v4 1/2] powerpc/uaccess: Implement unsafe_put_user() using 'asm goto' Message-ID: <20200506221801.GW31009@gate.crashing.org> References: <23e680624680a9a5405f4b88740d2596d4b17c26.1587143308.git.christophe.leroy@c-s.fr> <87sggecv81.fsf@mpe.ellerman.id.au> <20200505153245.GN31009@gate.crashing.org> <87pnbhdgkw.fsf@mpe.ellerman.id.au> <20200506175849.GT31009@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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, May 06, 2020 at 08:10:57PM +0200, Christophe Leroy wrote: > Le 06/05/2020 ? 19:58, Segher Boessenkool a ?crit?: > >> #define __put_user_asm_goto(x, addr, label, op) \ > >> asm volatile goto( \ > >>- "1: " op "%U1%X1 %0,%1 # put_user\n" \ > >>+ "1: " op "%X1 %0,%1 # put_user\n" \ > >> EX_TABLE(1b, %l2) \ > >> : \ > >>- : "r" (x), "m<>" (*addr) \ > >>+ : "r" (x), "m" (*addr) \ > >> : \ > >> : label) > > > >Like that. But you will have to do that to *all* places we use the "<>" > >constraints, or wait for more stuff to fail? And, there probably are > >places we *do* want update form insns used (they do help in some loops, > >for example)? > > > > AFAICT, git grep "m<>" provides no result. Ah, okay. > However many places have %Ux: Yes, all of those are from when "m" still meant what "m<>" is now. For seeing how many update form insns can be generated (and how much that matters), these all should be fixed, at a minimum. Segher