lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 30 Apr 2014 13:43:07 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Hui Zhu <hui_zhu@...tor.com>, Hui Zhu <teawater@...il.com>,
	Mark Kettenis <mark.kettenis@...all.nl>
CC:	pinskia@...il.com, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
	eparis@...hat.com, ak@...ux.intel.com,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"gdb@...rceware.org" <gdb@...rceware.org>,
	Pedro Alves <palves@...hat.com>
Subject: Re: [PATCH] Fix get ERESTARTSYS with m32 in x86_64 when debug by
 GDB

On 04/30/2014 09:35 AM, Hui Zhu wrote:
> 
> I sorry that previous patch has some format issue, post a new one.
> 
> Signed-off-by: Hui Zhu <hui@...esourcery.com>
> ---
> --- a/arch/x86/kernel/ptrace.c
> +++ b/arch/x86/kernel/ptrace.c
> @@ -452,6 +452,23 @@ static int putreg(struct task_struct *ch
>          if (child->thread.gs != value)
>              return do_arch_prctl(child, ARCH_SET_GS, value);
>          return 0;
> +    case offsetof(struct user_regs_struct, orig_ax):
> +        /*
> +         * A 64-bit debugger setting orig_ax of a 32-bit inferior
> +         * means to restore the state of the task restarting a
> +         * 32-bit syscall.
> +         * Make sure we interpret the -ERESTART* codes correctly
> +         * in case the task is not actually still sitting at the
> +         * exit from a 32-bit syscall with TS_COMPAT still set.
> +         */
> +        if (test_ti_thread_flag(task_thread_info(child), TIF_IA32)) {
> +            struct pt_regs *regs = task_pt_regs(child);
> +            regs->orig_ax = value;
> +            if (syscall_get_nr(child, regs) >= 0)
> +                task_thread_info(child)->status |= TS_COMPAT;
> +            return 0;
> +        }
> +        break;
>  #endif
>      }

You still seems to have botched whitespace, and no patch description in
the same email so it can be automated.

	-hpa

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ