From patchwork Fri Jul 27 09:45:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 10546809 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 0C1D2180E for ; Fri, 27 Jul 2018 09:46:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECD8A2B6D4 for ; Fri, 27 Jul 2018 09:46:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF4102B740; Fri, 27 Jul 2018 09:46:23 +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 702192B6D4 for ; Fri, 27 Jul 2018 09:46:23 +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=KsVL32z+jnP55dBvM4SF3LPBPXQbZ/R2dlqK2AyS848=; b=oWrh3tBO/P01Rq b9X1EQwYJh078NpxO0zmTuOwB5AicOxgcNpjMEumFyR5XbJUXMEp4pS/QQQy1eLpdv/9bqSRQEHGX 49CB0oHHIGLHAB1Zk0yKIuMMROpfNWYXO7MtGJ2TZDTw+HErTeFIoPuOF/RT+aZMwmAnqqL/5QV8Q tJe0Ts4MBNkyc1IQVVwwiuSQN/pybOMFiWA9u1vMstHIEgA01Zy4b2ZWTqld42JawJ8eZsPMALT0f ZYwO11M2oOWlUEptwOpLOe6O6lFvv5OL5jIwDXzJ+Ow9XfFkbXKSKy9b7EWFxXgd5v0nBnKVN/wxf tyx1AJ/QWxOieYXWXFoA==; 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 1fizKE-0001cN-FD; Fri, 27 Jul 2018 09:46:18 +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 1fizKB-0001aO-Lc for linux-arm-kernel@lists.infradead.org; Fri, 27 Jul 2018 09:46:17 +0000 Received: from localhost (unknown [89.188.5.116]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 06C95BB3; Fri, 27 Jul 2018 09:46:04 +0000 (UTC) Subject: Patch "ARM: fix put_user() for gcc-8" has been added to the 4.4-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:43 +0200 In-Reply-To: <20180726081358.3829157-2-arnd@arndb.de> Message-ID: <15326847436103@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_024615_717819_C35950D2 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 4.4-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-4.4 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-4.4/arm-fix-put_user-for-gcc-8.patch queue-4.4/turn-off-wattribute-alias.patch --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h @@ -251,7 +251,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"); \