Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3046167imm; Sun, 24 Jun 2018 10:10:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJjsb0P1L1Xg72JlXNMM0Xd/wyJOFZ337qor07RB1y5WaABYnzMqTjeCpKYEioKQLb19fdg X-Received: by 2002:a17:902:d24:: with SMTP id 33-v6mr9506551plu.22.1529860222777; Sun, 24 Jun 2018 10:10:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529860222; cv=none; d=google.com; s=arc-20160816; b=NzFyuOcan1rd1NZ6PyS2sfdWkqAHNk//FCBQcB/mzambPff8n8ET7XW80QQNhwdJ2v cqpBFBoSYmtVGgZb8du7DohL/SLKI0Dn2Cawcls1HkW3eLxXcHFAUYWkECVH9hWjlbkx f/LketGGn9QPgD4yTeEtILJskhr61bQqRC0BMxvURorerK72zqXBBTxYSBdorgaKFZf7 wAPCpnrsjQTocKQDGVGVLGKuGiPEVvhmM4k0gWNVf8C2R57Ue1FAIo0GxO8xozu1dBZd AfOSLX76937xzzzyiJsa7mzN64ivG5/FfPreGS6aIcS3RGUku4bNt8hYp0Qyw0ACa2/F 529Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter :arc-authentication-results; bh=hAqvlgCUMk8xqzaVlWhPaA4bAFIJJlvbOocB3CNR07I=; b=D94Aj+GYtULyLByJsdgd6PyvHau2fn+fSLThY1xyjuveRYiG5fiYHgTXlSNcWPhqgf OVbCMYYU5Wug20ok3rkz6XQtRCdctYbRDhm0rBeWOTJDWWN5VxFg6vAVcd178OTHpERD TE6z4KIyVQOjKV1eZTP48lH7c1asoskGFtPgfyvejxDury5Xp+9WcxSyP2STGUdqOmYo gPZFpTCW0nGu9VdgG25XAhDzj2o+CAyp8K8WROBOk7vrU8xjhnaqSt71NXsYjp6ias7U H5y0va3HkLBCA5txfGhPqiqUrfo+24LWZcBN0AX/NyG2QZiUWXGSl+crLIH7D6W+Fa9c trOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=gPkS4mTk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d7-v6si12696963pfl.122.2018.06.24.10.10.08; Sun, 24 Jun 2018 10:10:22 -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; dkim=pass header.i=@efficios.com header.s=default header.b=gPkS4mTk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752160AbeFXRI3 (ORCPT + 99 others); Sun, 24 Jun 2018 13:08:29 -0400 Received: from mail.efficios.com ([167.114.142.138]:49764 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751920AbeFXRI1 (ORCPT ); Sun, 24 Jun 2018 13:08:27 -0400 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id EA5F71B7A5F; Sun, 24 Jun 2018 13:08:26 -0400 (EDT) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id IatNLKutw4_4; Sun, 24 Jun 2018 13:08:26 -0400 (EDT) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 83BD51B7A5C; Sun, 24 Jun 2018 13:08:26 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 83BD51B7A5C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1529860106; bh=hAqvlgCUMk8xqzaVlWhPaA4bAFIJJlvbOocB3CNR07I=; h=Date:From:To:Message-ID:MIME-Version; b=gPkS4mTkDIQgfC5PTogUetCIqh7+7kiZITIhdmgnyYuZRhvI9vlOri0XhXA1vDrwL f7Qa1Nb33gefYM47mmUAMvP/X79117qL5Pa8/kjQjOndDgZ7RRNDvJZvK2tTqP6mDr yh+T+Y6UuBvtzkDD5Tq22/f68FQCUHllqko//zTdCjGn2KX3OL68q9E0mfR1nQbT6e +FIXyuflWZNSZd/8wURx8ncYgqxl8KrPlD7R6xJdHgR0kDTlqsbnmxcHxYI/YDJ0vh xokzDp3z+ZLxOynjMB4my3AOPI0Za7/kyJo0h17Bf7d9OQrmYRWGErUf0u1itpY39v nGJodMj6LwUZQ== X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id ET7ld-2N8hyx; Sun, 24 Jun 2018 13:08:26 -0400 (EDT) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id 6F05C1B7A55; Sun, 24 Jun 2018 13:08:26 -0400 (EDT) Date: Sun, 24 Jun 2018 13:08:26 -0400 (EDT) From: Mathieu Desnoyers To: Paul Burton Cc: linux-mips , James Hogan , Ralf Baechle , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Will Deacon , linux-kernel , Thomas Gleixner Message-ID: <929268757.2788.1529860106385.JavaMail.zimbra@efficios.com> In-Reply-To: <20180624165800.2732-1-paul.burton@mips.com> References: <20180624165800.2732-1-paul.burton@mips.com> Subject: Re: [PATCH] MIPS: Add ksig argument to rseq_{signal_deliver,handle_notify_resume} MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.142.138] X-Mailer: Zimbra 8.8.8_GA_2096 (ZimbraWebClient - FF52 (Linux)/8.8.8_GA_1703) Thread-Topic: MIPS: Add ksig argument to rseq_{signal_deliver,handle_notify_resume} Thread-Index: SBYsSNqHvmHZSquWL19MpbLUYdGwdQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Jun 24, 2018, at 12:58 PM, Paul Burton paul.burton@mips.com wrote: > Commit 784e0300fe9f ("rseq: Avoid infinite recursion when delivering > SIGSEGV") added a new ksig argument to the rseq_signal_deliver() & > rseq_handle_notify_resume() functions, and was merged in v4.18-rc2. > Meanwhile MIPS support for restartable sequences was also merged in > v4.18-rc2 with commit 9ea141ad5471 ("MIPS: Add support for restartable > sequences"), and therefore didn't get updated for the API change. > > This results in build failures like the following: > > CC arch/mips/kernel/signal.o > arch/mips/kernel/signal.c: In function 'handle_signal': > arch/mips/kernel/signal.c:804:22: error: passing argument 1 of > 'rseq_signal_deliver' from incompatible pointer type > [-Werror=incompatible-pointer-types] > rseq_signal_deliver(regs); > ^~~~ > In file included from ./include/linux/context_tracking.h:5, > from arch/mips/kernel/signal.c:12: > ./include/linux/sched.h:1811:56: note: expected 'struct ksignal *' but > argument is of type 'struct pt_regs *' > static inline void rseq_signal_deliver(struct ksignal *ksig, > ~~~~~~~~~~~~~~~~^~~~ > arch/mips/kernel/signal.c:804:2: error: too few arguments to function > 'rseq_signal_deliver' > rseq_signal_deliver(regs); > ^~~~~~~~~~~~~~~~~~~ > > Fix this by adding the ksig argument as was done for other architectures > in commit 784e0300fe9f ("rseq: Avoid infinite recursion when delivering > SIGSEGV"). Looks like we both noticed the same issue. Your commit message is more exhaustive than mine, so yours should be merged rather than mine. Acked-by: Mathieu Desnoyers Thanks! Mathieu > > Signed-off-by: Paul Burton > Cc: James Hogan > Cc: Ralf Baechle > Cc: Mathieu Desnoyers > Cc: Peter Zijlstra > Cc: Paul E. McKenney > Cc: Boqun Feng > Cc: Will Deacon > Cc: linux-mips@linux-mips.org > Cc: linux-kernel@vger.kernel.org > --- > > arch/mips/kernel/signal.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c > index 00f2535d2226..0a9cfe7a0372 100644 > --- a/arch/mips/kernel/signal.c > +++ b/arch/mips/kernel/signal.c > @@ -801,7 +801,7 @@ static void handle_signal(struct ksignal *ksig, struct > pt_regs *regs) > regs->regs[0] = 0; /* Don't deal with this again. */ > } > > - rseq_signal_deliver(regs); > + rseq_signal_deliver(ksig, regs); > > if (sig_uses_siginfo(&ksig->ka, abi)) > ret = abi->setup_rt_frame(vdso + abi->vdso->off_rt_sigreturn, > @@ -870,7 +870,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, void > *unused, > if (thread_info_flags & _TIF_NOTIFY_RESUME) { > clear_thread_flag(TIF_NOTIFY_RESUME); > tracehook_notify_resume(regs); > - rseq_handle_notify_resume(regs); > + rseq_handle_notify_resume(NULL, regs); > } > > user_enter(); > -- > 2.17.1 -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com