login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
April
»
26
Re: [git pull] x86 fix
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Harvey Harrison <harvey.harrison@...>
To: Ingo Molnar <mingo@...>
Cc: Linus Torvalds <torvalds@...>, <linux-kernel@...>, Venki Pallipadi <venkatesh.pallipadi@...>
Subject:
Re: [git pull] x86 fix
Date: Saturday, April 26, 2008 - 4:15 pm
On Sat, 2008-04-26 at 21:47 +0200, Ingo Molnar wrote:
quoted text
> Linus, please pull this x86 fix from: > > git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes2.git for-linus > > Thanks, > > Ingo > > ------------------> > Venki Pallipadi (1): > x86, PAT: disable /dev/mem mmap RAM with PAT > > arch/x86/mm/pat.c | 31 +++++++++++++++++++++++++++++++ > 1 files changed, 31 insertions(+), 0 deletions(-) > > diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c > index 9851265..e7ca7fc 100644 > --- a/arch/x86/mm/pat.c > +++ b/arch/x86/mm/pat.c > @@ -16,6 +16,7 @@ > #include <asm/msr.h> > #include <asm/tlbflush.h> > #include <asm/processor.h> > +#include <asm/page.h> > #include <asm/pgtable.h> > #include <asm/pat.h> > #include <asm/e820.h> > @@ -477,6 +478,33 @@ pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, > return vma_prot; > } > > +#ifdef CONFIG_NONPROMISC_DEVMEM > +/* This check is done in drivers/char/mem.c in case of NONPROMISC_DEVMEM*/ > +static inline int range_is_allowed(unsigned long pfn, unsigned long size) > +{ > + return 1; > +} > +#else > +static inline int range_is_allowed(unsigned long pfn, unsigned long size)
inline? Seems a bit big to me.
quoted text
> +{ > + u64 from = ((u64)pfn) << PAGE_SHIFT; > + u64 to = from + size; > + u64 cursor = from; > + > + while (cursor < to) { > + if (!devmem_is_allowed(pfn)) { > + printk(KERN_INFO > + "Program %s tried to access /dev/mem between %Lx->%Lx.\n", > + current->comm, from, to); > + return 0; > + } > + cursor += PAGE_SIZE; > + pfn++; > + } > + return 1; > +} > +#endif /* CONFIG_NONPROMISC_DEVMEM */ > +
Cheers, Harvey --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[git pull] x86 fix
, Ingo Molnar
, (Sat Apr 26, 3:47 pm)
Re: [git pull] x86 fix
, Harvey Harrison
, (Sat Apr 26, 4:15 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
H. Peter Anvin
Re: [RFC 00/15] x86_64: Optimize percpu accesses
Tarkan Erimer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Eric W. Biederman
Remaining straight forward kthread API conversions...
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
linux-netdev
:
David Miller
[GIT]: Networking
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Frans Pop
svc: failed to register lockdv1 RPC service (errno 97).
git
:
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
3 users
and
1106 guests
online.
Online users
strcmp
genanxdiso
plianc20
Syndicate