2003-08-10 09:16:09

by Andrey Borzenkov

[permalink] [raw]
Subject: [PATCH][2.6.0-test3] i386 msr.c devfs support 1/2

Please let me know if default permissions (644) are not appropriate. Tested on
2-way SMP kernel single CPU system; it correctly rejects access to
no-existing CPU.

/dev/cpu/N is not removed on module unload. It is impossible to cleanly
unregister directories shared by independent drivers given current devfs
implementation (no actual refcounting)

-andrey


Attachments:
(No filename) (360.00 B)
2.6.0-test3-msr_devfs.patch (943.00 B)
Download all attachments

2003-08-10 13:58:36

by Dave Jones

[permalink] [raw]
Subject: Re: [PATCH][2.6.0-test3] i386 msr.c devfs support 1/2

On Sun, Aug 10, 2003 at 12:51:03PM +0400, Andrey Borzenkov wrote:
> Please let me know if default permissions (644) are not appropriate.

bogus. They should be set to 600. Non-root access to MSRs (even read
only) can cause instant lockup/reboot on some CPUs if user tries to
read non-existant MSR.

Dave

--
Dave Jones http://www.codemonkey.org.uk

2003-08-10 14:20:08

by Andrey Borzenkov

[permalink] [raw]
Subject: Re: [PATCH][2.6.0-test3] i386 msr.c devfs support 1/2

On Sunday 10 August 2003 17:58, Dave Jones wrote:
> On Sun, Aug 10, 2003 at 12:51:03PM +0400, Andrey Borzenkov wrote:
> > Please let me know if default permissions (644) are not appropriate.
>
> bogus. They should be set to 600. Non-root access to MSRs (even read
> only) can cause instant lockup/reboot on some CPUs if user tries to
> read non-existant MSR.
>

update patch attached.

-andrey


Attachments:
(No filename) (394.00 B)
2.6.0-test3-msr_devfs-2.patch (940.00 B)
Download all attachments