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]
Message-ID: <b0a3406c-5de7-20e0-0f09-dbb7222426e2@oracle.com>
Date:   Wed, 17 Jul 2019 10:09:45 +0200
From:   Vegard Nossum <vegard.nossum@...cle.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     tglx@...utronix.de, bp@...en8.de, mingo@...nel.org,
        rostedt@...dmis.org, luto@...nel.org,
        torvalds@...ux-foundation.org, hpa@...or.com,
        dave.hansen@...ux.intel.com, jgross@...e.com,
        linux-kernel@...r.kernel.org, zhe.he@...driver.com,
        joel@...lfernandes.org, devel@...ukata.com
Subject: Re: [PATCH v3 0/6] Tracing vs CR2

On 7/17/19 10:07 AM, Peter Zijlstra wrote:
> On Tue, Jul 16, 2019 at 09:33:50PM +0200, Vegard Nossum wrote:
>> ------------[ cut here ]------------
>> General protection fault in user access. Non-canonical address?
>> WARNING: CPU: 0 PID: 5039 at arch/x86/mm/extable.c:126
>> ex_handler_uaccess+0x5d/0x70
[...]
> 
> 
>    https://lkml.kernel.org/r/57754f11-2c65-a2c8-2f6d-bfab0d2f8b53@etsukata.com
> 
> Does something like the below help?
> 
> diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c
> index c8d0f05721a1..80ad4ccb7025 100644
> --- a/kernel/stacktrace.c
> +++ b/kernel/stacktrace.c
> @@ -226,12 +226,16 @@ unsigned int stack_trace_save_user(unsigned long *store, unsigned int size)
>   		.store	= store,
>   		.size	= size,
>   	};
> +	mm_segment_t fs;
>   
>   	/* Trace user stack if not a kernel thread */
>   	if (current->flags & PF_KTHREAD)
>   		return 0;
>   
> +	fs = get_fs();
> +	set_fs(USER_DS);
>   	arch_stack_walk_user(consume_entry, &c, task_pt_regs(current));
> +	set_fs(fs);
>   	return c.len;
>   }
>   #endif
> 

Yes.


Vegard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ