Conversation with #inferno at Wed Sep 12 18:50:55 2012 on powerman-asdf@irc.freenode.net (irc) (21:03:24) leetspete left the room (quit: Quit: Leaving.). (21:03:43) leetspete [~pete@cpe-76-174-171-57.socal.res.rr.com] entered the room. (23:31:59) utroz [~utroz@187-127-59-75.user.veloxzone.com.br] entered the room. (23:50:23) yshurik left the room (quit: Quit: Leaving.). (00:58:44) Fish- left the room (quit: Quit: WeeChat 0.3.8). (01:08:17) Aram left the room (quit: Ping timeout: 268 seconds). (02:52:19) utroz: Hi leetspete ;) (03:13:21) leetspete: utroz: Hey! (03:13:46) utroz: probably, you already worked with GDT table, sure? ;) (03:14:42) utroz: I had had some difficult while I was trying to figure out the fields of each entry (03:15:50) leetspete: utroz: I've not worked with GDT. I had to look it up. :) (03:16:08) utroz: gdtinfo: (03:16:08) utroz: dw gdt_end - gdt - 1 ;last byte in table (03:16:08) utroz: dd gdt ;start of table (03:16:08) utroz: (03:16:08) utroz: gdt dd 0,0 ; entry 0 is always unused (03:16:09) utroz: flatdesc db 0xff, 0xff, 0, 0, 0, 10010010b, 11001111b, 0 (03:16:11) utroz: gdt_end: (03:17:30) utroz: For instance, it's not a easy task to create a entry into the table ;( (03:17:44) utroz: I'm reading a bit about it ;) (03:18:59) utroz: leetspete, by the way, do you have some tutorial which explains the GDT table? (03:19:44) utroz: I already made a research on google, but most of tutorials aren't totally fine (03:20:53) leetspete: I've not worked with segmentation registers, so I don't think I can help much. :P (03:21:38) utroz: hum, thanks anyway (03:21:45) leetspete: Yeah, sorry. (04:49:18) utroz: leetspete, does stack grow downwards or upwards? (04:49:59) utroz: As I'm seeing, most of codes set the stackpointer as the last address of stack memory region (04:50:03) utroz: I really can't understand (04:50:21) utroz: For instance, mov esp, _sys_stack ; This points the stack to our new stack area (04:50:30) utroz: SECTION .bss (04:50:31) utroz: resb 8192 ; This reserves 8KBytes of memory here (04:50:31) utroz: _sys_stack: (04:53:28) leetspete: utroz: Downwards on x86. I don't know if this is always true for x86, but I believe it is. (04:54:23) utroz: Take a lookt at the code, a region of memory is reserved (04:54:42) utroz: and sys_stack points out to the final of that region of memory (04:54:55) leetspete: Right. (04:55:06) utroz: at that instruction, esp is setted as _sys_stack, sure? (04:55:17) leetspete: Yep. (04:55:28) utroz: doesn't esp point to the top of stack? (04:55:33) leetspete: Yes. (04:55:45) leetspete: So the stack would have to grow downwards. (04:56:53) utroz: However, _sys_stack got a higher address than the start of the stack (04:57:12) utroz: I can't understand how the stack is growing down (04:57:19) utroz: Start of stack: (04:57:20) utroz: region (04:57:23) utroz: _sys_stack (04:57:33) utroz: _sys_stack has a higher address than ^ (04:59:17) leetspete: Right. "push eax" would decrement esp by 4. (05:00:43) utroz: In the theory, I can understand why the stack grows downwards, but is it the absolute truth? (05:00:55) utroz: I mean when we're talking about address numbers (05:04:38) utroz: leetspete, utroz: 8192 goes down to 8191 (05:05:02) utroz: Right know I figured out the theory in it HUHUAHUAHU (05:05:40) leetspete: I believe it's the case for x86. (05:06:03) leetspete: Looks like it is always the case. Did a quick search. (05:07:20) leetspete: Looks like push always decrements esp and then stores. (05:07:30) leetspete: ARM can support any of the four possibilities. (05:08:07) utroz: It actually can blame our brains ;) AHUHUAHUA (05:08:20) utroz: pretty confused theory (05:08:53) utroz: because it isn't possible to think of stack generically ;) (08:35:02) Gegemon [~ynv@mx1.airis.ru] entered the room. (11:12:12) Fish [~Fish@9fans.fr] entered the room. (11:16:54) utroz left the room (quit: Ping timeout: 260 seconds). (11:31:15) utroz [~utroz@187-127-59-75.user.veloxzone.com.br] entered the room. (12:11:49) Aram [~aram@unaffiliated/aramdune] entered the room. (12:50:09) Fish left the room (quit: Quit: WeeChat 0.3.8). (12:50:31) Fish [~Fish@9fans.fr] entered the room. (13:43:18) utroz left the room (quit: Remote host closed the connection). (14:32:46) anth_x1 [~a@99.40.132.132] entered the room. (14:36:02) vpm_ [~vpm@blumenthal.vrinimi.int.eu.org] entered the room. (14:38:05) vpm left the room (quit: Disconnected by services). (14:38:06) KBme_ [~KBme@2001:470:cabe:dead:beef:feed:dead:beef] entered the room. (14:38:14) vpm_ is now known as vpm (14:41:22) rogpeppe [~rog@host-92-30-160-102.as13285.net] entered the room. (14:42:24) KBme left the room (quit: *.net *.split). (14:42:24) anth_x left the room (quit: *.net *.split). (14:42:54) wrtp left the room (quit: Ping timeout: 268 seconds). (15:21:24) anth_x1 is now known as anth_x (15:34:07) rog [~rog@host-92-30-160-102.as13285.net] entered the room. (15:34:55) rogpeppe left the room (quit: Read error: Connection reset by peer). (15:48:32) ngharo_ [~ngharo@shepard.sypherz.com] entered the room. (15:52:44) ngharo left the room (quit: Remote host closed the connection). (16:02:23) `jpi left the room (quit: *.net *.split). (16:03:35) `jpi [~jpi@unaffiliated/pseud0cod3r] entered the room. (16:17:08) pr left the room (quit: Ping timeout: 248 seconds). (16:17:08) `jpi left the room (quit: Ping timeout: 248 seconds). (16:17:08) powerman-asdf left the room (quit: Ping timeout: 248 seconds). (16:17:08) The account has disconnected and you are no longer in this chat. You will automatically rejoin the chat when the account reconnects.