Rev 7319 | Rev 7321 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7319 | Rev 7320 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 7319 $ |
8 | $Revision: 7320 $ |
9 | 9 | ||
10 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
10 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
11 | ;; ;; |
11 | ;; ;; |
Line 187... | Line 187... | ||
187 | endg |
187 | endg |
Line 188... | Line 188... | ||
188 | 188 | ||
189 | ; Author Pavel Iakovlev |
189 | ; Author Pavel Iakovlev |
190 | ; Return EAX = 0 security kernel, error set function |
190 | ; Return EAX = 0 security kernel, error set function |
191 | ; Return Else EAX > 0 success set function |
191 | ; Return Else EAX > 0 success set function |
192 | align 4 |
192 | align 32 |
Line 193... | Line 193... | ||
193 | setInt0x40: |
193 | setInt0x40: |
- | 194 | ||
194 | 195 | ; !!! kernel security !!! |
|
195 | ; !!! kernel security !!! |
196 | and ebx, 0FFh |
196 | mov eax, dword [servetable2 + ebx * 4] |
197 | mov eax, dword [servetable2 + ebx * 4] |
197 | cmp eax, undefined_syscall |
198 | cmp eax, undefined_syscall |
Line 198... | Line 199... | ||
198 | jne errorSet0x40 |
199 | jne errorSet0x40 |
199 | ; ----------------------- |
200 | ; ----------------------- |
200 | 201 | ||
- | 202 | pushad |
|
201 | pushad |
203 | add edx, 16 |
202 | add edx, 16 |
204 | stdcall kernel_alloc, edx |
Line 203... | Line 205... | ||
203 | stdcall kernel_alloc, edx |
205 | push eax |
204 | mov dword[tempPointerAlloc], eax |
206 | pop dword[tempPointerAlloc] |
- | 207 | popad |
|
205 | popad |
208 | |
206 | 209 | ||
- | 210 | push ebx |
|
- | 211 | push dword[tempPointerAlloc] |
|
- | 212 | pop eax |
|
- | 213 | mov ebx, eax |
|
- | 214 | add eax, edx |
|
- | 215 | ||
207 | 216 | push 0 |
|
- | 217 | pop dword[hashDataFunction1] |
|
- | 218 | push 1 |
|
208 | push ebx |
219 | pop dword[hashDataFunction2] |
209 | mov eax, dword[tempPointerAlloc] |
220 | |
- | 221 | loopCopyMemory: |
|
- | 222 | xor edx, edx |
|
- | 223 | ||
- | 224 | mov dl, byte[ecx] |
|
- | 225 | mov byte[ebx], dl |
|
- | 226 | ||
- | 227 | ; hash security function |
|
210 | mov ebx, eax |
228 | add dword[hashDataFunction1], edx |
211 | add eax, edx |
229 | mov edx, dword[hashDataFunction1] |
212 | loopCopyMemory: |
230 | add dword[hashDataFunction2], edx |
213 | mov dh, byte[ecx] |
231 | ;----------------------------- |
Line 214... | Line 232... | ||
214 | mov byte[ebx], dh |
232 | |
- | 233 | inc ebx |
|
- | 234 | inc ecx |
|
- | 235 | cmp ebx, eax |
|
- | 236 | jne loopCopyMemory |
|
- | 237 | ||
- | 238 | pop ebx |
|
- | 239 | ||
- | 240 | ; check hash security data |
|
215 | inc ebx |
241 | ; cmp edi, dword[hashDataFunction1] |
216 | inc ecx |
242 | ; jne errorSet0x40 |
217 | cmp ebx, eax |
243 | ; cmp esi, dword[hashDataFunction2] |
- | 244 | ; jne errorSet0x40 |
|
218 | jne loopCopyMemory |
245 | ;------------------------------- |
219 | 246 | ||
- | 247 | mov eax, dword[tempPointerAlloc] |
|
220 | pop ebx |
248 | mov dword [servetable2 + ebx * 4], eax |
221 | mov eax, dword[tempPointerAlloc] |
249 | jmp successSet0x40 |
Line 222... | Line 250... | ||
222 | mov dword [servetable2 + ebx * 4], eax |
250 | |
- | 251 | errorSet0x40: |
|
- | 252 | xor eax, eax |
|
223 | jmp successSet0x40 |
253 | |
224 | errorSet0x40: |
254 | successSet0x40: |