Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
556fa9fd
Commit
556fa9fd
authored
Jun 10, 2003
by
Andy Grover
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ACPI: Add access checking (Andi Kleen)
parent
fa4aac5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
drivers/acpi/osl.c
drivers/acpi/osl.c
+8
-4
No files found.
drivers/acpi/osl.c
View file @
556fa9fd
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include <acpi/acpi.h>
#include <acpi/acpi.h>
#include <asm/io.h>
#include <asm/io.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_bus.h>
#include <asm/uaccess.h>
#ifdef CONFIG_ACPI_EFI
#ifdef CONFIG_ACPI_EFI
#include <linux/efi.h>
#include <linux/efi.h>
...
@@ -948,19 +949,22 @@ acpi_os_get_line(char *buffer)
...
@@ -948,19 +949,22 @@ acpi_os_get_line(char *buffer)
return
0
;
return
0
;
}
}
/*
/* Assumes no unreadable holes inbetween */
* We just have to assume we're dealing with valid memory
*/
BOOLEAN
BOOLEAN
acpi_os_readable
(
void
*
ptr
,
u32
len
)
acpi_os_readable
(
void
*
ptr
,
u32
len
)
{
{
#if defined(__i386__) || defined(__x86_64__)
char
tmp
;
return
!
__get_user
(
tmp
,
(
char
*
)
ptr
)
&&
!
__get_user
(
tmp
,
(
char
*
)
ptr
+
len
-
1
);
#endif
return
1
;
return
1
;
}
}
BOOLEAN
BOOLEAN
acpi_os_writable
(
void
*
ptr
,
u32
len
)
acpi_os_writable
(
void
*
ptr
,
u32
len
)
{
{
/* could do dummy write (racy) or a kernel page table lookup.
The later may be difficult at early boot when kmap doesn't work yet. */
return
1
;
return
1
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment