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: <20090213130911.GC22743@wotan.suse.de>
Date:	Fri, 13 Feb 2009 14:09:11 +0100
From:	Nick Piggin <npiggin@...e.de>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	akpm <akpm@...ux-foundation.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: irq-disabled vs vmap vs text_poke

On Fri, Feb 13, 2009 at 02:05:11PM +0100, Peter Zijlstra wrote:
> On Fri, 2009-02-13 at 14:02 +0100, Peter Zijlstra wrote:
> > Agreed, I think we want to fix text_poke() and make the vmap/vunmap()
> > ops yell louder at violations of these rules.
> 
> Something like so?

Couldn't hurt :)


> 
> ---
>  mm/vmalloc.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index 75f49d3..8516cea 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -1249,6 +1249,7 @@ EXPORT_SYMBOL(vfree);
>  void vunmap(const void *addr)
>  {
>  	BUG_ON(in_interrupt());
> +	might_sleep();
>  	__vunmap(addr, 0);
>  }
>  EXPORT_SYMBOL(vunmap);
> @@ -1268,6 +1269,8 @@ void *vmap(struct page **pages, unsigned int count,
>  {
>  	struct vm_struct *area;
>  
> +	might_sleep();
> +
>  	if (count > num_physpages)
>  		return NULL;
>  
--
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