From efa84a263d1c3d601a50c72f0a986f62aaaa22df Mon Sep 17 00:00:00 2001 From: "Rustem Gimadutdinov (rgimad)" Date: Tue, 17 Nov 2020 20:00:28 +0000 Subject: [PATCH] fix is_region_userspace (worked incorrectly for e.g 0xFFFFFFFF) git-svn-id: svn://kolibrios.org@8216 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/kernel.asm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 10ee2b0e41..9a312fdbdf 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -5674,13 +5674,16 @@ is_region_userspace: ; ebx = len ; out: eax = 1 if region in userspace memory, 0 if not push esi edi ecx + + cmp eax, OS_BASE + ja @f + add eax, ebx cmp eax, OS_BASE ja @f mov eax, 1 - jmp .ret - + jmp .ret @@: xor eax, eax .ret: