提交 755f21bb 编写于 作者: A Atsushi Nemoto 提交者: Ralf Baechle

[MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.

access_ok in compat-signal.h is wrong (checking destination instead of
source) and redundant (already checked before calling this function).

Also sf_mask in struct sigframe32 should be compat_sigset_t type.
Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 8a03d9a4
......@@ -150,7 +150,7 @@ struct sigframe32 {
u32 sf_ass[4]; /* argument save space for o32 */
u32 sf_code[2]; /* signal trampoline */
struct sigcontext32 sf_sc;
sigset_t sf_mask;
compat_sigset_t sf_mask;
};
struct rt_sigframe32 {
......@@ -166,7 +166,7 @@ struct sigframe32 {
u32 sf_ass[4]; /* argument save space for o32 */
u32 sf_pad[2];
struct sigcontext32 sf_sc; /* hw context */
sigset_t sf_mask;
compat_sigset_t sf_mask;
u32 sf_code[8] ____cacheline_aligned; /* signal trampoline */
};
......
......@@ -33,9 +33,6 @@ static inline int __copy_conv_sigset_from_user(sigset_t *d,
BUG_ON(sizeof(*d) != sizeof(*s));
BUG_ON(_NSIG_WORDS != 2);
if (unlikely(!access_ok(VERIFY_READ, d, sizeof(*d))))
return -EFAULT;
#ifdef CONFIG_CPU_BIG_ENDIAN
err = __get_user(u->c.sig[1], &s->sig[0]);
err |= __get_user(u->c.sig[0], &s->sig[1]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册