From: Guenter Roeck <linux@roeck-us.net>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: linux-kernel@vger.kernel.org, cmr@codefail.de,
Paul Mackerras <paulus@samba.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 08/10] powerpc/signal32: Convert restore_[tm]_user_regs() to user access block
Date: Sat, 10 Apr 2021 16:39:47 -0700 [thread overview]
Message-ID: <20210410233947.GA202696@roeck-us.net> (raw)
In-Reply-To: <181adf15a6f644efcd1aeafb355f3578ff1b6bc5.1616151715.git.christophe.leroy@csgroup.eu>
On Fri, Mar 19, 2021 at 11:06:57AM +0000, Christophe Leroy wrote:
> Convert restore_user_regs() and restore_tm_user_regs()
> to use user_access_read_begin/end blocks.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
...
> static long restore_user_regs(struct pt_regs *regs,
> struct mcontext __user *sr, int sig)
> {
...
> @@ -567,19 +569,22 @@ static long restore_user_regs(struct pt_regs *regs,
> regs->msr &= ~MSR_SPE;
> if (msr & MSR_SPE) {
> /* restore spe registers from the stack */
> - if (__copy_from_user(current->thread.evr, &sr->mc_vregs,
> - ELF_NEVRREG * sizeof(u32)))
> - return 1;
> + unsafe_copy_from_user(current->thread.evr, &sr->mc_vregs,
> + ELF_NEVRREG * sizeof(u32));
arch/powerpc/kernel/signal_32.c: In function 'restore_user_regs':
arch/powerpc/kernel/signal_32.c:565:36: error: macro "unsafe_copy_from_user" requires 4 arguments, but only 3 given
Guenter
next prev parent reply other threads:[~2021-04-10 23:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-19 11:06 [PATCH 00/10] Convert signal32 to user read access by block Christophe Leroy
2021-03-19 11:06 ` [PATCH 01/10] signal: Add unsafe_get_compat_sigset() Christophe Leroy
2021-03-19 11:06 ` [PATCH 02/10] powerpc/uaccess: Also perform 64 bits copies in unsafe_copy_from_user() on ppc32 Christophe Leroy
2021-03-19 11:06 ` [PATCH 03/10] powerpc/signal: Add unsafe_copy_ck{fpr/vsx}_from_user Christophe Leroy
2021-03-19 11:06 ` [PATCH 04/10] powerpc/signal32: Rename save_user_regs_unsafe() and save_general_regs_unsafe() Christophe Leroy
2021-03-19 11:06 ` [PATCH 05/10] powerpc/signal32: Remove ifdefery in middle of if/else in sigreturn() Christophe Leroy
2021-03-19 11:06 ` [PATCH 06/10] powerpc/signal32: Perform access_ok() inside restore_user_regs() Christophe Leroy
2021-03-19 11:06 ` [PATCH 07/10] powerpc/signal32: Reorder user reads in restore_tm_user_regs() Christophe Leroy
2021-03-19 11:06 ` [PATCH 08/10] powerpc/signal32: Convert restore_[tm]_user_regs() to user access block Christophe Leroy
2021-04-03 17:32 ` Christophe Leroy
2021-04-10 23:39 ` Guenter Roeck [this message]
2021-03-19 11:06 ` [PATCH 09/10] powerpc/signal32: Convert do_setcontext[_tm]() " Christophe Leroy
2021-03-19 11:07 ` [PATCH 10/10] powerpc/signal32: Simplify logging in sigreturn() Christophe Leroy
2021-04-10 14:28 ` [PATCH 00/10] Convert signal32 to user read access by block Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210410233947.GA202696@roeck-us.net \
--to=linux@roeck-us.net \
--cc=christophe.leroy@csgroup.eu \
--cc=cmr@codefail.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).