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, 2 Feb 2011 07:26:32 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	castet.matthieu@...e.fr
Cc:	Linux Kernel list <linux-kernel@...r.kernel.org>,
	linux-security-module@...r.kernel.org,
	Matthias Hopf <mhopf@...e.de>, rjw@...k.pl,
	Andrew Morton <akpm@...ux-foundation.org>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] NX protection for kernel data : fix 32 bits S3 suspend


* castet.matthieu@...e.fr <castet.matthieu@...e.fr> wrote:

> Quoting Ingo Molnar <mingo@...e.hu>:
> 
> >
> > * matthieu castet <castet.matthieu@...e.fr> wrote:
> >
> > >  static inline int is_kernel_text(unsigned long addr)
> > >  {
> > > +#if defined(CONFIG_X86_32) && defined(CONFIG_ACPI_SLEEP)
> > > +	/*
> > > +	 * We need to make the wakeup trampoline in first 1MB !NX
> > > +	 */
> > > +	if (addr >= PAGE_OFFSET && addr <= (PAGE_OFFSET + (1<<20)))
> > > +		return 1;
> > > +#endif
> >
> > That's pretty ugly. Why not use set_memory_x()/set_memory_nx(), and only for
> > the
> > trampoline itself? Does the whole 1MB need to be marked X?
>
> The previous code was doing that.

So why not call set_memory_x() in your patch? Mind trying that?

Thanks,

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