Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1300561pxy; Thu, 6 May 2021 05:16:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySqzp0oJH2vLrbvFMZiJvq8DhpXwJewf5zWAiGljgt+adE7RjS3NX1epxf+GMY79m7Lvhu X-Received: by 2002:a05:6402:323:: with SMTP id q3mr4882512edw.69.1620303366788; Thu, 06 May 2021 05:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620303366; cv=none; d=google.com; s=arc-20160816; b=Gt43eamRigGK88Is/Vx28lOYAtLIMNv1H7vyVHTmxs+VhJjJhNCEc2/mW5uyLaiU0b FouB60HxvUNj7RzFT27rBdUcxLmA4a1yYsHKMurQemGH7TlcAWebykV/Yr6MMB0qU00n 7OkJtufJyDBQ9TtK7wUinHHsVXyiMZTs5ZmrGe/yNi3SFpJP650jvm96cNjdQ+LP6qw0 wLdHTACdZxqTGyd8DBdR9tO08ELFy1mVWQ8nTvYUG71iyrQfP6jX1MohXgp7g8ZzEGoX 9RJLitXC0vIysDRGBYeFuoxAAwZwrfXwRb1pKI3TxVQfyQ3zXNaCbrqnCZpdQfwtetqc OdSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:cc:to:subject:from:message-id; bh=ND1WN60wJBGYMm6zKcZyOMMjil9zwgF9HhDJat+DynE=; b=sPLERxF/YWYJkmCWWfSDu08Nx5bncJEjEyv/gVWDaduEbu/TyY/IdFYHQMi3rGcIa9 2YXGt+pra8IxcTZzPWWH5XFKY5GhUysaODxOVwW9k4S9QLNOM9zDaZxjjyNpEIArlbJv GWcwlBvx2+JCFwSFVY5yV9hdNYL3H7Stkbkxd3thQae5u/+d8flUqErWyZlw0ZuoKKA1 rLKbYJWsnwqrAr+sWWaUaG9UQI972rbxM9Amg0rnHyJ70TqCQzsNd6Rgvehf9PKQiZmy F6SpQQASwC9XjeXTBHhPvP9oIZ1fgl9BBthe9eoIu/CjoTXz2iKPpqyZElRj5v2KBuP9 /dIQ== 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 x11si2233914edd.384.2021.05.06.05.15.42; Thu, 06 May 2021 05:16:06 -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 S232012AbhEFL5d (ORCPT + 99 others); Thu, 6 May 2021 07:57:33 -0400 Received: from pegase2.c-s.fr ([93.17.235.10]:39081 "EHLO pegase2.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231800AbhEFL5c (ORCPT ); Thu, 6 May 2021 07:57:32 -0400 Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4FbX9Y2qY2z9sYT; Thu, 6 May 2021 13:56:33 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cK5fxFFitLtq; Thu, 6 May 2021 13:56:33 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4FbX9W6kwdz9sYW; Thu, 6 May 2021 13:56:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id B34638B7FB; Thu, 6 May 2021 13:56:31 +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 ttLDyMgLHjqb; Thu, 6 May 2021 13:56:31 +0200 (CEST) Received: from po15610vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6FF448B7F8; Thu, 6 May 2021 13:56:31 +0200 (CEST) Received: by po15610vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 4402A64885; Thu, 6 May 2021 11:56:31 +0000 (UTC) Message-Id: <332773775cf24a422105dee2d383fb8f04589045.1620302182.git.christophe.leroy@csgroup.eu> From: Christophe Leroy Subject: [PATCH] powerpc/syscall: Calling kuap_save_and_lock() is wrong To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Thu, 6 May 2021 11:56:31 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kuap_save_and_lock() is only for interrupts inside kernel. system call are only from user, calling kuap_save_and_lock() is wrong. Fixes: c16728835eec ("powerpc/32: Manage KUAP in C") Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/interrupt.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c index e4559f8914eb..30a596182baa 100644 --- a/arch/powerpc/kernel/interrupt.c +++ b/arch/powerpc/kernel/interrupt.c @@ -34,9 +34,6 @@ notrace long system_call_exception(long r3, long r4, long r5, syscall_fn f; kuep_lock(); -#ifdef CONFIG_PPC32 - kuap_save_and_lock(regs); -#endif regs->orig_gpr3 = r3; -- 2.25.0