lkml.org 
[lkml]   [2011]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Module hiding files controlled by sysfs
On Fri, Aug 12, 2011 at 01:55:03AM +0200, Tonda wrote:
> diff --git a/fs/hidefiles/hidefiles.c b/fs/hidefiles/hidefiles.c

You forgot your Signed-off-by: line and the rest of the changelog
information explaining what this is, why we would want it, and how you
are going to maintain it.

> +static void disable_write_protection(void)
> +{
> + unsigned long value;
> + asm volatile("mov %%cr0,%0" : "=r"(value));
> + value &= (~WRITEABLE);
> + asm volatile("mov %0,%%cr0" : : "r"(value));
> +}
> +
> +static void enable_write_protection(void)
> +{
> + unsigned long value;
> + asm volatile("mov %%cr0,%0" : "=r"(value));
> + value |= WRITEABLE;
> + asm volatile ("mov %0,%%cr0" : : "r"(value));
> +}

Fun stuff, you can do nasty things to a system with this...



\
 
 \ /
  Last update: 2011-08-13 04:05    [W:0.032 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site