From patchwork Fri Jul 27 09:45:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 10546805 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1E60514E0 for ; Fri, 27 Jul 2018 09:45:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00C8B2B700 for ; Fri, 27 Jul 2018 09:45:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E74DE2B745; Fri, 27 Jul 2018 09:45:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 750752B700 for ; Fri, 27 Jul 2018 09:45:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:In-Reply-To: Date:From:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=/Kb0nr/l6V25BXZCOtU1M8GBlLXIk3z1NLNKveoU/LA=; b=SGPRz1vu/kZcv7 p8WGXjyGddEg417s07XpAIgbcwn4c3YwPb14m231Xhun7N2HDcrOCTFYFXSkPtoux2gokcKLnmDkF lguNhZ2ED+Y5mhgNFp9+u4fyHXrrH7qxj4N3YCs4DKBFQroC507S9/gHvevz+GRimy9PIDjzHRrVV AJts3BuB+yVPypVwLC2Sw2e1wVJwMiYQ281WmbOwHjbvIpaE4sEZZ7TykhMdlNkMcfbL+NyJP6H7x NveKhhDK2w4l+jRkhkuFXfFhf5wyM+VI5NO00gpdPKgaG65YTpvp2WCXyIFFutsc0oyFthNjKQLuY +80z5bgFCu92EdHxTMjg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fizJf-0001Eb-GT; Fri, 27 Jul 2018 09:45:43 +0000 Received: from mail.linuxfoundation.org ([140.211.169.12]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fizJc-0001Dl-G9 for linux-arm-kernel@lists.infradead.org; Fri, 27 Jul 2018 09:45:42 +0000 Received: from localhost (unknown [89.188.5.116]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D7ABDAF8; Fri, 27 Jul 2018 09:45:28 +0000 (UTC) Subject: Patch "ARM: fix put_user() for gcc-8" has been added to the 3.18-stable tree To: arnd@arndb.de, bernd.edlinger@hotmail.de, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, linux@arm.linux.org.uk From: Date: Fri, 27 Jul 2018 11:45:26 +0200 In-Reply-To: <20180726081358.3829157-2-arnd@arndb.de> Message-ID: <1532684726224255@kroah.com> MIME-Version: 1.0 X-stable: commit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180727_024540_576392_CE6A0188 X-CRM114-Status: GOOD ( 12.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stable-commits@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This is a note to let you know that I've just added the patch titled ARM: fix put_user() for gcc-8 to the 3.18-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: arm-fix-put_user-for-gcc-8.patch and it can be found in the queue-3.18 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. From arnd@arndb.de Fri Jul 27 11:21:29 2018 From: Arnd Bergmann Date: Thu, 26 Jul 2018 10:13:23 +0200 Subject: ARM: fix put_user() for gcc-8 To: stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, Arnd Bergmann , Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Message-ID: <20180726081358.3829157-2-arnd@arndb.de> From: Arnd Bergmann Building kernels before linux-4.7 with gcc-8 results in many build failures when gcc triggers a check that was meant to catch broken compilers: /tmp/ccCGMQmS.s:648: Error: .err encountered According to the discussion in the gcc bugzilla, a local "register asm()" variable is still supposed to be the correct way to force an inline assembly to use a particular register, but marking it 'const' lets the compiler do optimizations that break that, i.e the compiler is free to treat the variable as either 'const' or 'register' in that case. Upstream commit 9f73bd8bb445 ("ARM: uaccess: remove put_user() code duplication") fixed this problem in linux-4.8 as part of a larger change, but seems a little too big to be backported to 4.4. Let's take the simplest fix and change only the one broken line in the same way as newer kernels. Suggested-by: Bernd Edlinger Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85745 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86673 Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- arch/arm/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Patches currently in stable-queue which might be from arnd@arndb.de are queue-3.18/arm-fix-put_user-for-gcc-8.patch --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h @@ -220,7 +220,7 @@ extern int __put_user_8(void *, unsigned ({ \ unsigned long __limit = current_thread_info()->addr_limit - 1; \ const typeof(*(p)) __user *__tmp_p = (p); \ - register const typeof(*(p)) __r2 asm("r2") = (x); \ + register typeof(*(p)) __r2 asm("r2") = (x); \ register const typeof(*(p)) __user *__p asm("r0") = __tmp_p; \ register unsigned long __l asm("r1") = __limit; \ register int __e asm("r0"); \