Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1facdbbd
Commit
1facdbbd
authored
Dec 09, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Temporarily allow KeUserModeCallback calls from client stack.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a34e8c2b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
0 deletions
+34
-0
signal_arm.c
dlls/ntdll/unix/signal_arm.c
+8
-0
signal_arm64.c
dlls/ntdll/unix/signal_arm64.c
+8
-0
signal_i386.c
dlls/ntdll/unix/signal_i386.c
+8
-0
signal_x86_64.c
dlls/ntdll/unix/signal_x86_64.c
+8
-0
unixlib.h
include/wine/unixlib.h
+2
-0
No files found.
dlls/ntdll/unix/signal_arm.c
View file @
1facdbbd
...
...
@@ -700,6 +700,14 @@ NTSTATUS WINAPI KeUserModeCallback( ULONG id, const void *args, ULONG len, void
{
struct
user_callback_frame
callback_frame
=
{
{
0
},
ret_ptr
,
ret_len
};
/* if we have no syscall frame, call the callback directly */
if
((
char
*
)
&
callback_frame
<
(
char
*
)
ntdll_get_thread_data
()
->
kernel_stack
||
(
char
*
)
&
callback_frame
>
(
char
*
)
arm_thread_data
()
->
syscall_frame
)
{
NTSTATUS
(
WINAPI
*
func
)(
const
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
];
return
func
(
args
,
len
);
}
if
((
char
*
)
ntdll_get_thread_data
()
->
kernel_stack
+
min_kernel_stack
>
(
char
*
)
&
callback_frame
)
return
STATUS_STACK_OVERFLOW
;
...
...
dlls/ntdll/unix/signal_arm64.c
View file @
1facdbbd
...
...
@@ -738,6 +738,14 @@ NTSTATUS WINAPI KeUserModeCallback( ULONG id, const void *args, ULONG len, void
{
struct
user_callback_frame
callback_frame
=
{
{{
0
}},
ret_ptr
,
ret_len
};
/* if we have no syscall frame, call the callback directly */
if
((
char
*
)
&
callback_frame
<
(
char
*
)
ntdll_get_thread_data
()
->
kernel_stack
||
(
char
*
)
&
callback_frame
>
(
char
*
)
arm64_thread_data
()
->
syscall_frame
)
{
NTSTATUS
(
WINAPI
*
func
)(
const
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
];
return
func
(
args
,
len
);
}
if
((
char
*
)
ntdll_get_thread_data
()
->
kernel_stack
+
min_kernel_stack
>
(
char
*
)
&
callback_frame
)
return
STATUS_STACK_OVERFLOW
;
...
...
dlls/ntdll/unix/signal_i386.c
View file @
1facdbbd
...
...
@@ -1569,6 +1569,14 @@ NTSTATUS WINAPI KeUserModeCallback( ULONG id, const void *args, ULONG len, void
{
struct
user_callback_frame
callback_frame
=
{
{
0
},
ret_ptr
,
ret_len
};
/* if we have no syscall frame, call the callback directly */
if
((
char
*
)
&
callback_frame
<
(
char
*
)
ntdll_get_thread_data
()
->
kernel_stack
||
(
char
*
)
&
callback_frame
>
(
char
*
)
x86_thread_data
()
->
syscall_frame
)
{
NTSTATUS
(
WINAPI
*
func
)(
const
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
];
return
func
(
args
,
len
);
}
if
((
char
*
)
ntdll_get_thread_data
()
->
kernel_stack
+
min_kernel_stack
>
(
char
*
)
&
callback_frame
)
return
STATUS_STACK_OVERFLOW
;
...
...
dlls/ntdll/unix/signal_x86_64.c
View file @
1facdbbd
...
...
@@ -2293,6 +2293,14 @@ NTSTATUS WINAPI KeUserModeCallback( ULONG id, const void *args, ULONG len, void
{
struct
user_callback_frame
callback_frame
=
{
{
0
},
ret_ptr
,
ret_len
};
/* if we have no syscall frame, call the callback directly */
if
((
char
*
)
&
callback_frame
<
(
char
*
)
ntdll_get_thread_data
()
->
kernel_stack
||
(
char
*
)
&
callback_frame
>
(
char
*
)
amd64_thread_data
()
->
syscall_frame
)
{
NTSTATUS
(
WINAPI
*
func
)(
const
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
];
return
func
(
args
,
len
);
}
if
((
char
*
)
ntdll_get_thread_data
()
->
kernel_stack
+
min_kernel_stack
>
(
char
*
)
&
callback_frame
)
return
STATUS_STACK_OVERFLOW
;
...
...
include/wine/unixlib.h
View file @
1facdbbd
...
...
@@ -80,6 +80,8 @@ extern void ntdll_set_exception_jmp_buf( __wine_jmp_buf *jmp );
} \
} while (0);
NTSTATUS
WINAPI
KeUserModeCallback
(
ULONG
id
,
const
void
*
args
,
ULONG
len
,
void
**
ret_ptr
,
ULONG
*
ret_len
);
/* wide char string functions */
static
inline
size_t
ntdll_wcslen
(
const
WCHAR
*
str
)
...
...
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