Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3794443ybt; Tue, 30 Jun 2020 11:22:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzD0TeRu9ZfoCyDvXC8cK1HGyImfEhjrx5s5RjIcRGwilylJXPqQiobiZbkKRlWspnLmCGm X-Received: by 2002:a17:906:7253:: with SMTP id n19mr20137162ejk.31.1593541344096; Tue, 30 Jun 2020 11:22:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593541344; cv=none; d=google.com; s=arc-20160816; b=UqIu3Dx2IBxLUcu+pC1gCNir6LXNl1fsnEaPXP8s/nYCwa70ZeSzRgDkIRul36VmAL HRuRvPNXyL0tIi88lIHdS3Bc6KbAf2kW2tubqM0OMA06wQYjq0A9SexlVEgJbDtP9D2f 86awmrqNt4AX3L+Zd6pv0LTQbcd0ZGz/H7KaG3G3oFLHJes3kj1Z1CtgdFfHLWb979ya q5F0kNc28gt6X9eJsXXHbzia8LOIzooU8ppYyvXW3wf+9rakniHs+RNGmo+v2YW6TN3w Mk3DlwkO5TGpoH0k6oBLTQqlDhu8aualWmJ3eCQ88WFMOfx8kdUwXUIGmrXDkum8KfTW zZzA== 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=ATE0pVROnEQQPdzCCFlcD0d/i9bfrzAqQalwEa+MfMc=; b=Y9+IdkDzYvKa+X/YpB6Myg23Me7Hq9su1+8vWE7VqvzT16Z7jBYXJlrXsRiQ+u/cXc 0krgW5lVpG9sYXlWlJVm6gRtU2IaKwGGB7BwDt7XcwVSXNDZW412WGk/F4kIYmrgHXOO KYd8ioKh3Or5kRikL5FTC70vQn6tqTRRym7spkhE9eL/nq1sDR4iHR7WxjXCY/EBXHXE KTNIr6YFQAnqN/xAVckCb+Vb6Jb2od+RlqwzwY8S/dIUPJ5+LoYEi3c7rLcORCwWalSn rev52lsaH/AhENDP+6RHa76zUoFy+QQAbMUtbve+p1WYYlCn3DNihIm6p06TZltfr3GF qjsg== 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 f7si2239352edw.105.2020.06.30.11.21.59; Tue, 30 Jun 2020 11:22:21 -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 S2388900AbgF3Qd7 (ORCPT + 99 others); Tue, 30 Jun 2020 12:33:59 -0400 Received: from gate.crashing.org ([63.228.1.57]:47874 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726639AbgF3Qd7 (ORCPT ); Tue, 30 Jun 2020 12:33:59 -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 05UGXQQP021824; Tue, 30 Jun 2020 11:33:26 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 05UGXOLS021820; Tue, 30 Jun 2020 11:33:24 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 30 Jun 2020 11:33:24 -0500 From: Segher Boessenkool To: Christophe Leroy Cc: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , npiggin@gmail.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] powerpc/uaccess: Use flexible addressing with __put_user()/__get_user() Message-ID: <20200630163324.GW3598@gate.crashing.org> References: <7b916759-1683-b4df-0d4b-b04b3fcd9a02@csgroup.eu> <878sg6862r.fsf@mpe.ellerman.id.au> <875zb98i5a.fsf@mpe.ellerman.id.au> <311c3471-cad7-72d5-a5e6-04cf892c5e41@csgroup.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <311c3471-cad7-72d5-a5e6-04cf892c5e41@csgroup.eu> 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 Tue, Jun 30, 2020 at 04:55:05PM +0200, Christophe Leroy wrote: > Le 30/06/2020 ? 03:19, Michael Ellerman a ?crit?: > >Michael Ellerman writes: > >>Because it uses the "m<>" constraint which didn't work on GCC 4.6. > >> > >>https://github.com/linuxppc/issues/issues/297 > >> > >>So we should be able to pick it up for v5.9 hopefully. > > > >It seems to break the build with the kernel.org 4.9.4 compiler and > >corenet64_smp_defconfig: > > Looks like 4.9.4 doesn't accept "m<>" constraint either. The evidence contradicts this assertion. > Changing it to "m" make it build. But that just means something else is wrong. > >+ make -s CC=powerpc64-linux-gnu-gcc -j 160 > >In file included from /linux/include/linux/uaccess.h:11:0, > > from /linux/include/linux/sched/task.h:11, > > from /linux/include/linux/sched/signal.h:9, > > from /linux/include/linux/rcuwait.h:6, > > from /linux/include/linux/percpu-rwsem.h:7, > > from /linux/include/linux/fs.h:33, > > from /linux/include/linux/huge_mm.h:8, > > from /linux/include/linux/mm.h:675, > > from /linux/arch/powerpc/kernel/signal_32.c:17: > >/linux/arch/powerpc/kernel/signal_32.c: In function > >'save_user_regs.isra.14.constprop': > >/linux/arch/powerpc/include/asm/uaccess.h:161:2: error: 'asm' operand has > >impossible constraints > > __asm__ __volatile__( \ > > ^ > >/linux/arch/powerpc/include/asm/uaccess.h:197:12: note: in expansion of > >macro '__put_user_asm' > > case 4: __put_user_asm(x, ptr, retval, "stw"); break; \ > > ^ > >/linux/arch/powerpc/include/asm/uaccess.h:206:2: note: in expansion of > >macro '__put_user_size_allowed' > > __put_user_size_allowed(x, ptr, size, retval); \ > > ^ > >/linux/arch/powerpc/include/asm/uaccess.h:220:2: note: in expansion of > >macro '__put_user_size' > > __put_user_size(__pu_val, __pu_addr, __pu_size, __pu_err); \ > > ^ > >/linux/arch/powerpc/include/asm/uaccess.h:96:2: note: in expansion of > >macro '__put_user_nocheck' > > __put_user_nocheck((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr))) > > ^ > >/linux/arch/powerpc/kernel/signal_32.c:120:7: note: in expansion of macro > >'__put_user' > > if (__put_user((unsigned int)gregs[i], &frame->mc_gregs[i])) > > ^ Can we see what that was after the macro jungle? Like, the actual preprocessed code? Also, what GCC version *does* work on this? Segher