Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3747019imm; Mon, 15 Oct 2018 03:34:35 -0700 (PDT) X-Google-Smtp-Source: ACcGV60pdX7vG73kj+zX+CTDuuCt3YKfPnwOaH4Xa6CtfEA4IbcrVHoB9KMRwCTBL03hnCwLPT9o X-Received: by 2002:a62:75c7:: with SMTP id q190-v6mr17177756pfc.137.1539599675320; Mon, 15 Oct 2018 03:34:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539599675; cv=none; d=google.com; s=arc-20160816; b=RGR7tJGYiMAUFBGUFAx5RSEEuKOkjzSTGcb2nj6ehIB1HIPZEGxDbERbl4EbBbADnP sJGuIlADNOuSMQFpNtuH90hv7KrrIZtipPiHAMIU6Zu+wVc6HaSEOBQJf7F4piVGu4ca bKH2Y3ePg/NW6oLwGqP+JJ/KesX2fYIPSoFJ5NzmKTLSHxnttb5n1nbS2VFLqr6oVYEw oahEuJqMtfzh7QbI5eMIysk8t2unbT64Pu7wt9AjhJVwikzN9jVMa9Nlr71LkmJ1lLTF s4ppUdF9+Gk5mBGgrhvIgs5oVa8cMDNbgxiMJc5GOl8FbfQPqk7Ept8s/0du/oFnmMES ek8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:to:from; bh=X9esjPHyf8ZOUEn8u8ijFo30O//SYwKs77VTDbcK4+c=; b=Uj/1ifJXOQWEazt8rftEcb4Y/FOua+2OxzNgfHFxo7T/7qxkAv+aqWPrBG4+8c51Yr Zo1Mawwo45xkMSAK7XuH9NcrQao8l2uu3ylYuaDRvYXJ4HoTzwA+aTrEP7bkFe5UWB3c D5yHuTb3LKuIs0Q0rkMJUxmw2XcF1jBFIAH63O5sWjaILs3N926U5JxcD3MQN07yCyoi f8wP4ahqNyF0b85aMB0y7mevNrcVRixeHSB95g70rSZWj2gyJ8zUfqDb+qvaFIiCpvKq jVV4xi9HcYAC3CVY8T3c8aBUPp3J05OSd2HeEYdpY+deA2YExOo4BYeAT0LhEBK3/YzK mF6g== 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 f4-v6si10887382pfg.112.2018.10.15.03.34.20; Mon, 15 Oct 2018 03:34:35 -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 S1726534AbeJOSSh convert rfc822-to-8bit (ORCPT + 99 others); Mon, 15 Oct 2018 14:18:37 -0400 Received: from ozlabs.org ([203.11.71.1]:44751 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726357AbeJOSSh (ORCPT ); Mon, 15 Oct 2018 14:18:37 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 42YZYH3f5sz9s55; Mon, 15 Oct 2018 21:33:52 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: Meelis Roos , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: 32-bit poweroc compile failure in v4.19-rc7-166-g7ec21823634d In-Reply-To: <17d36e6c-f99a-abfb-12cd-fa4b14bc7e09@linux.ee> References: <17d36e6c-f99a-abfb-12cd-fa4b14bc7e09@linux.ee> Date: Mon, 15 Oct 2018 21:33:49 +1100 Message-ID: <87tvlnzegi.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Meelis Roos writes: > I tried to test the fix to 32-bit poweroc boot hang but found that current git does not compile on 32bit poweroc at all for me: That's GCC 8 I think? I have seen that but couldn't work out what the hell GCC is thinking. I don't think there's an actual bug, the size of the copy is bounded by the count parameter, which *doesn't* come from user space, it's hard coded. I suspect the logic is just to convoluted for GCC. We should fix it somehow, but I haven't worked out what's the best option. cheers > CC arch/powerpc/kernel/ptrace.o > In file included from ./include/linux/bitmap.h:9, > from ./include/linux/cpumask.h:12, > from ./include/linux/rcupdate.h:44, > from ./include/linux/rculist.h:11, > from ./include/linux/pid.h:5, > from ./include/linux/sched.h:14, > from arch/powerpc/kernel/ptrace.c:19: > In function ‘memcpy’, > inlined from ‘user_regset_copyin’ at ./include/linux/regset.h:295:4, > inlined from ‘vr_set’ at arch/powerpc/kernel/ptrace.c:619:9: > ./include/linux/string.h:345:9: error: ‘__builtin_memcpy’ offset [-527, -529] is out of the bounds [0, 16] of object ‘vrsave’ with type ‘union ’ [-Werror=array-bounds] > return __builtin_memcpy(p, q, size); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > arch/powerpc/kernel/ptrace.c: In function ‘vr_set’: > arch/powerpc/kernel/ptrace.c:614:5: note: ‘vrsave’ declared here > } vrsave; > ^~~~~~ > In file included from ./include/linux/bitmap.h:9, > from ./include/linux/cpumask.h:12, > from ./include/linux/rcupdate.h:44, > from ./include/linux/rculist.h:11, > from ./include/linux/pid.h:5, > from ./include/linux/sched.h:14, > from arch/powerpc/kernel/ptrace.c:19: > In function ‘memcpy’, > inlined from ‘user_regset_copyout’ at ./include/linux/regset.h:270:4, > inlined from ‘vr_get’ at arch/powerpc/kernel/ptrace.c:572:9: > ./include/linux/string.h:345:9: error: ‘__builtin_memcpy’ offset [-527, -529] is out of the bounds [0, 16] of object ‘vrsave’ with type ‘union ’ [-Werror=array-bounds] > return __builtin_memcpy(p, q, size); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > arch/powerpc/kernel/ptrace.c: In function ‘vr_get’: > arch/powerpc/kernel/ptrace.c:567:5: note: ‘vrsave’ declared here > } vrsave; > ^~~~~~ > cc1: all warnings being treated as errors > make[1]: *** [scripts/Makefile.build:306: arch/powerpc/kernel/ptrace.o] Error 1 > make: *** [Makefile:1052: arch/powerpc/kernel] Error 2 > > -- > Meelis Roos