Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1487071ybm; Sat, 30 May 2020 10:19:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXzkjud60YcMYFljdry8MT9oGyLK9Xv3H3UUYKucy1jkNYsCudSacdvYXjTBoLrS+KY8bg X-Received: by 2002:a05:6402:129a:: with SMTP id w26mr14240387edv.41.1590859185439; Sat, 30 May 2020 10:19:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590859185; cv=none; d=google.com; s=arc-20160816; b=Swc+jJkXBFQJo0RpLlm/O5jaRxd4f5zNRa5dJqhx1hVK9zssrvFKbdH+Je9YmHiuKt AmDweGWUN0Xxx201bb74ytmPudw86GG7Z5dVhTi6tBvkiKjj8ezTiu9wUHJ7uMIvCuAQ 0SVJ/UFs75mqJJYkMEhkYmQd1iTteSmOfeOQHttx/GhFUOzv4ZH1iM8K6O4WIeakpnR9 d+qR5XguAo+ZKmZYXOd1wchVTj2iTcBGeK1MJF3zZwCzg4+1/XyQHT8HY7PDUV8G/xeQ p6+E5foewWyZmwNWTYv1JKO5UFyPPOj5/DeWn1ZPdTB0CRsCKyd7/EUf+YSku0Dcu+3F 8Nsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id; bh=Q9Ze4Nfp09krUdooAIALyxFU+A1uL0dyRf3s4W1bF2w=; b=S5VKDX2J7ZLthXyXMweLVD3hQ9CAM6IpqTWDTx21UzPW3oqtBrvAzgQsYp1ByBIKMr Ige4gWKkdvDz1LBI5pUbsodrZ/gefU3QSYo6BG5QeNg3vvFRUqNdbUGge86IA8dLNTKE XcTmoPf37m3EURzj930h8B82shkUSOUQxZcWxQ5Dan8VKLjyXB+nQe1rW0CA/e55JZ4K cJJvjpdnFQ1u4DGnbt3lswMc7S0OZbt7cr6KVwGTcYY29Ty/oSs3wU+fLXlGbdzxdePI +G3Pq2Vx0c5lw+OTUaaZasWkMiPx9IJT5jKCJadGAgvuRUN1mdkxCHfNQIfY3nk+MlV8 U83Q== 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 bi4si7366712edb.411.2020.05.30.10.19.21; Sat, 30 May 2020 10:19:45 -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 S1729211AbgE3RQh (ORCPT + 99 others); Sat, 30 May 2020 13:16:37 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:47388 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728927AbgE3RQg (ORCPT ); Sat, 30 May 2020 13:16:36 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 49Z7Q8101rzB09b6; Sat, 30 May 2020 19:16:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id LtJtec1cgfzR; Sat, 30 May 2020 19:16:32 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 49Z7Q802qdzB09b5; Sat, 30 May 2020 19:16:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 543C28B7B1; Sat, 30 May 2020 19:16:34 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id CG9nwzsSTvMY; Sat, 30 May 2020 19:16:34 +0200 (CEST) Received: from pc16570vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 230B98B75E; Sat, 30 May 2020 19:16:34 +0200 (CEST) Received: by pc16570vm.idsi0.si.c-s.fr (Postfix, from userid 0) id DBD8265A0D; Sat, 30 May 2020 17:16:33 +0000 (UTC) Message-Id: From: Christophe Leroy Subject: [PATCH v2] powerpc/32s: Fix another build failure with CONFIG_PPC_KUAP_DEBUG To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Sat, 30 May 2020 17:16:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 'thread' doesn't exist in kuap_check() macro. Use 'current' instead. Reported-by: kbuild test robot Fixes: a68c31fc01ef ("powerpc/32s: Implement Kernel Userspace Access Protection") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy --- v2: Changed author and signed-off-by ... and added asm/bug.h There are days when you'd better go sleeping instead of wanting to send the fix. And there are days you stare at your code, think it is good, prepare the patch, test it, find another bug, fix it, test it ... and send the first patch you prepared :( hence this second fix for the same bug. --- arch/powerpc/include/asm/book3s/32/kup.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/book3s/32/kup.h b/arch/powerpc/include/asm/book3s/32/kup.h index db0a1c281587..a41cfc7cc669 100644 --- a/arch/powerpc/include/asm/book3s/32/kup.h +++ b/arch/powerpc/include/asm/book3s/32/kup.h @@ -2,6 +2,7 @@ #ifndef _ASM_POWERPC_BOOK3S_32_KUP_H #define _ASM_POWERPC_BOOK3S_32_KUP_H +#include #include #ifdef __ASSEMBLY__ @@ -75,7 +76,7 @@ .macro kuap_check current, gpr #ifdef CONFIG_PPC_KUAP_DEBUG - lwz \gpr, KUAP(thread) + lwz \gpr, THREAD + KUAP(\current) 999: twnei \gpr, 0 EMIT_BUG_ENTRY 999b, __FILE__, __LINE__, (BUGFLAG_WARNING | BUGFLAG_ONCE) #endif -- 2.25.0