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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110807121913.GA7007@liondog.tnic>
Date:	Sun, 7 Aug 2011 14:19:13 +0200
From:	Borislav Petkov <bp@...en8.de>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Andy Lutomirski <luto@....edu>, "H. Peter Anvin" <hpa@...or.com>,
	Andi Kleen <andi@...stfloor.org>, x86@...nel.org,
	linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
	lueckintel@...oo.com, kimwooyoung@...il.com,
	Suresh Siddha <suresh.b.siddha@...el.com>
Subject: Re: [RFC v2] x86-64: Allow emulated vsyscalls from user addresses

On Sat, Aug 06, 2011 at 08:45:52AM +0200, Ingo Molnar wrote:
> > diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
> > index 9682ec5..6ae5e3a 100644
> > --- a/arch/x86/kernel/traps.c
> > +++ b/arch/x86/kernel/traps.c
> > @@ -873,9 +873,17 @@ void __init trap_init(void)
> >  #endif
> >  
> >  #ifdef CONFIG_X86_64
> > -	BUG_ON(test_bit(VSYSCALL_EMU_VECTOR, used_vectors));
> > -	set_system_intr_gate(VSYSCALL_EMU_VECTOR, &emulate_vsyscall);
> > -	set_bit(VSYSCALL_EMU_VECTOR, used_vectors);
> > +	BUG_ON(test_bit(VSYSCALL0_EMU_VECTOR, used_vectors));
> > +	set_system_intr_gate(VSYSCALL0_EMU_VECTOR, &emulate_vsyscall0);
> > +	set_bit(VSYSCALL0_EMU_VECTOR, used_vectors);
> > +
> > +	BUG_ON(test_bit(VSYSCALL1_EMU_VECTOR, used_vectors));
> > +	set_system_intr_gate(VSYSCALL1_EMU_VECTOR, &emulate_vsyscall1);
> > +	set_bit(VSYSCALL1_EMU_VECTOR, used_vectors);
> > +
> > +	BUG_ON(test_bit(VSYSCALL2_EMU_VECTOR, used_vectors));
> > +	set_system_intr_gate(VSYSCALL2_EMU_VECTOR, &emulate_vsyscall2);
> > +	set_bit(VSYSCALL2_EMU_VECTOR, used_vectors);
> >  #endif

..

> Surprisingly, this looks a bit cleaner to me than the original code,
> as the emulated syscalls separate out so nicely.
>
> The flip side is using up more of our vector space - but realistically
> we could put all this code behind a default-off LEGACY_VSYSCALL switch
> a year or two down the line, when distros have ugpraded glibc.

This probably needs an entry in <Documentation/feature-removal-schedule.txt>.

Also, what do we do with userspace which decides to hardcode "int 0x4[012]"
somewhere in the meantime?

Thanks.

-- 
Regards/Gruss,
    Boris.
--
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