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:	Thu, 10 Jan 2008 11:29:24 -0800
From:	Harvey Harrison <harvey.harrison@...il.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: Remove ifdef from step.c

On Thu, 2008-01-10 at 13:40 +0100, Ingo Molnar wrote:
> * Harvey Harrison <harvey.harrison@...il.com> wrote:
> 
> > @@ -148,11 +148,7 @@ static void write_debugctlmsr(struct task_struct *child, unsigned long val)
> >  	if (child != current)
> >  		return;
> >  
> > -#ifdef CONFIG_X86_64
> > -	wrmsrl(MSR_IA32_DEBUGCTLMSR, val);
> > -#else
> >  	wrmsr(MSR_IA32_DEBUGCTLMSR, val, 0);
> > -#endif
> 
> doesnt this break 64-bit? 'val' is 64-bit, but wrmsr truncates it to 
> 32-bit? [while wrmsrl() kept the full 64 bits]
> 

I wasn't totally sure about this, but believe in this case that it is
OK.  If not, we'll have to add this #ifdef back to restore_btf() in
kprobes.c which was lost Masami's unification.

But looking at how this is called, there shouldn't ever be anything in
the high 32 bits being written to (32 bit always wrote zero anyway).
In any event, it's going to be safer to use wrsmrl instead as you'll
get the zero extension on 32 bit and won't effect 64 bit.

Patch to follow.

Harvey

--
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