Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a72c7bbc
Commit
a72c7bbc
authored
Nov 11, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add a Wine-specific process info class for the LDT copy.
parent
45053135
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
13 deletions
+19
-13
selector.c
dlls/krnl386.exe16/selector.c
+1
-3
ntdll.spec
dlls/ntdll/ntdll.spec
+0
-1
signal_i386.c
dlls/ntdll/signal_i386.c
+0
-2
loader.c
dlls/ntdll/unix/loader.c
+0
-7
process.c
dlls/ntdll/unix/process.c
+14
-0
process.c
dlls/wow64/process.c
+3
-0
winternl.h
include/winternl.h
+1
-0
No files found.
dlls/krnl386.exe16/selector.c
View file @
a72c7bbc
...
...
@@ -68,12 +68,10 @@ static LDT_ENTRY ldt_make_entry( const void *base, unsigned int limit, unsigned
*/
void
init_selectors
(
void
)
{
const
struct
ldt_copy
**
ldt_copy_ptr
;
if
(
!
is_gdt_sel
(
get_gs
()
))
first_ldt_entry
+=
512
;
if
(
!
is_gdt_sel
(
get_fs
()
))
first_ldt_entry
+=
512
;
RtlSetBits
(
&
ldt_bitmap
,
0
,
first_ldt_entry
);
ldt_copy_ptr
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"ntdll.dll"
),
"__wine_ldt_copy"
);
if
(
ldt_copy_ptr
)
ldt_copy
=
*
ldt_copy_ptr
;
NtQueryInformationProcess
(
GetCurrentProcess
(),
ProcessWineLdtCopy
,
&
ldt_copy
,
sizeof
(
ldt_copy
),
NULL
);
}
/***********************************************************************
...
...
dlls/ntdll/ntdll.spec
View file @
a72c7bbc
...
...
@@ -1694,7 +1694,6 @@
@ stdcall -syscall __wine_unix_spawnvp(long ptr)
@ stdcall __wine_ctrl_routine(ptr)
@ extern __wine_syscall_dispatcher
@ extern -arch=i386 __wine_ldt_copy
@ extern -arch=arm64 __wine_current_teb
# Debugging
...
...
dlls/ntdll/signal_i386.c
View file @
a72c7bbc
...
...
@@ -59,8 +59,6 @@ static inline struct x86_thread_data *x86_thread_data(void)
return
(
struct
x86_thread_data
*
)
&
NtCurrentTeb
()
->
GdiTebBatch
;
}
struct
ldt_copy
*
__wine_ldt_copy
=
NULL
;
/* Exception record for handling exceptions happening inside exception handlers */
typedef
struct
{
...
...
dlls/ntdll/unix/loader.c
View file @
a72c7bbc
...
...
@@ -1062,13 +1062,6 @@ static void load_ntdll_functions( HMODULE module )
GET_FUNC
(
RtlUserThreadStart
);
GET_FUNC
(
__wine_ctrl_routine
);
GET_FUNC
(
__wine_syscall_dispatcher
);
#ifdef __i386__
{
void
**
p__wine_ldt_copy
;
GET_FUNC
(
__wine_ldt_copy
);
*
p__wine_ldt_copy
=
&
__wine_ldt_copy
;
}
#endif
#ifdef __aarch64__
{
void
**
p__wine_current_teb
;
...
...
dlls/ntdll/unix/process.c
View file @
a72c7bbc
...
...
@@ -1500,6 +1500,20 @@ NTSTATUS WINAPI NtQueryInformationProcess( HANDLE handle, PROCESSINFOCLASS class
else
ret
=
STATUS_INFO_LENGTH_MISMATCH
;
break
;
case
ProcessWineLdtCopy
:
if
(
handle
==
NtCurrentProcess
())
{
#ifdef __i386__
len
=
sizeof
(
struct
ldt_copy
*
);
if
(
size
==
len
)
*
(
struct
ldt_copy
**
)
info
=
&
__wine_ldt_copy
;
else
ret
=
STATUS_INFO_LENGTH_MISMATCH
;
#else
ret
=
STATUS_NOT_IMPLEMENTED
;
#endif
}
else
ret
=
STATUS_INVALID_PARAMETER
;
break
;
default:
FIXME
(
"(%p,info_class=%d,%p,0x%08x,%p) Unknown information class
\n
"
,
handle
,
class
,
info
,
size
,
ret_len
);
...
...
dlls/wow64/process.c
View file @
a72c7bbc
...
...
@@ -846,6 +846,9 @@ NTSTATUS WINAPI wow64_NtQueryInformationProcess( UINT *args )
if
(
retlen
)
*
retlen
=
sizeof
(
SECTION_IMAGE_INFORMATION32
);
return
STATUS_INFO_LENGTH_MISMATCH
;
case
ProcessWineLdtCopy
:
return
STATUS_NOT_IMPLEMENTED
;
default
:
FIXME
(
"unsupported class %u
\n
"
,
class
);
return
STATUS_INVALID_INFO_CLASS
;
...
...
include/winternl.h
View file @
a72c7bbc
...
...
@@ -1577,6 +1577,7 @@ typedef enum _PROCESSINFOCLASS {
MaxProcessInfoClass
,
#ifdef __WINESRC__
ProcessWineMakeProcessSystem
=
1000
,
ProcessWineLdtCopy
,
#endif
}
PROCESSINFOCLASS
,
PROCESS_INFORMATION_CLASS
;
...
...
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