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: <1391110034.945.5.camel@wall-e.seibold.net>
Date:	Thu, 30 Jan 2014 20:27:14 +0100
From:	Stefani Seibold <stefani@...bold.net>
To:	Andy Lutomirski <luto@...capital.net>
Cc:	Greg KH <gregkh@...uxfoundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	X86 ML <x86@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, Andi Kleen <ak@...ux.intel.com>,
	Andrea Arcangeli <aarcange@...hat.com>,
	John Stultz <john.stultz@...aro.org>,
	Pavel Emelyanov <xemul@...allels.com>,
	Cyrill Gorcunov <gorcunov@...nvz.org>,
	andriy.shevchenko@...ux.intel.com, Martin.Runge@...de-schwarz.com,
	Andreas.Brief@...de-schwarz.com
Subject: Re: [PATCH 1/4] Make vsyscall_gtod_data handling x86 generic

Am Donnerstag, den 30.01.2014, 10:05 -0800 schrieb Andy Lutomirski:
> On Thu, Jan 30, 2014 at 2:49 AM,  <stefani@...bold.net> wrote:
> > diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h
> > index 59c6c40..45ba688 100644
> > --- a/arch/x86/include/asm/compat.h
> > +++ b/arch/x86/include/asm/compat.h
> > @@ -295,6 +295,10 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr)
> >
> >  static inline void __user *arch_compat_alloc_user_space(long len)
> >  {
> > +#ifdef CONFIG_X86_32
> > +       struct pt_regs *regs = task_pt_regs(current);
> > +       return (void __user *)regs->sp - len;
> 
> Is there some reason this doesn't need to be aligned?
> 

The reason is that this function will not used for 32 bit kernels, but
will the header will be included... This prevents an error!

> > +#else
> >         compat_uptr_t sp;
> >
> >         if (test_thread_flag(TIF_IA32)) {
> > @@ -305,6 +309,7 @@ static inline void __user *arch_compat_alloc_user_space(long len)
> >         }
> >
> >         return (void __user *)round_down(sp - len, 16);
> > +#endif
> >  }
> >
> > +#define CREATE_TRACE_POINTS
> > +#include "vsyscall_trace.h"
> > +
> > +void __init map_vsyscall(void)
> > +{
> > +       extern char __vvar_page;
> > +       unsigned long physaddr_vvar_page = __pa_symbol(&__vvar_page);
> > +
> > +       __set_fixmap(VVAR_PAGE, physaddr_vvar_page, PAGE_KERNEL_VVAR);
> 
> Given that the compat version of this can't (I assume) use a fixmap,
> is there any good reason to not just use the same vma-based code for
> compat and real 32-bit kernels?
> 

The reason is compability! And it saves two Pages of logical address
space wenn using not the VMA compat mode.

BTW: It would be a great thing if you would not send back the hole
patch. If is very hard to find your replies in tons of line!


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