r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Red] Red language group

Kaj
27-May-2011
[1673]
My nginx.conf has default_type application/octet-stream; by the way
Andreas
27-May-2011
[1674]
could you paste a `readelf -a` of some small system binary somewhere?
Kaj
27-May-2011
[1675]
Will do
Dockimbel
27-May-2011
[1676x3]
New hello still segfaults.
Program counter address: EIP = 1234567a
EAX = 000000ec (seems that dereferencing EAX is what caused the error)
Kaj
27-May-2011
[1679]
I was afraid syscalls would be more problematic. What calling convention 
do you use for them?
Dockimbel
27-May-2011
[1680x2]
Let me see that...
1st argument => EBX
2nd argument => ECX
3rd argument => EDX
...
syscall ID => EAX
INT 0x80
Kaj
27-May-2011
[1682x3]
What is that called?
Linux is using SYSENTER/SYSCALL, but Syllable still uses int 0x80:
http://development.syllable.org/news/2009-05-24-16-19-Memory-mapped-input-output-implemented.html
Dockimbel
27-May-2011
[1685]
I can't find the source document anymore, I remember that it was 
the standard Linux way (pre-SYSENTER).
Kaj
27-May-2011
[1686]
I thought so, considering that Hello works to my surprise :-)
Dockimbel
27-May-2011
[1687]
Is there a native code debugger on Syllable/Desktop?
Kaj
27-May-2011
[1688x3]
GDB, but it's possible that the current port doesn't work. It's in 
the Developer's Delight pack:
http://web.syllable.org/Syllable/downloads.html#packs
There's also strace
Dockimbel
27-May-2011
[1691]
I have use this document (among other sources) for implementing syscalls 
support for Linux: http://www.win.tue.nl/~aeb/linux/lk/lk-4.html
(See 4.3)
Kaj
27-May-2011
[1692x3]
Ah, Eindhoven University :-)
GDb and strace are treated in here:
http://development.syllable.org/documentation/introduction/part-1.html
Dockimbel
27-May-2011
[1695x2]
Using strace -o -r hello, I get in the logs:
---->> 406 = Fork ("<NULL>'")
Invalid pagefault at 000000ec (NOTP:WRITE:USER)
Kaj: web.syllable.org is displaying an AccessDenied error message
Kaj
27-May-2011
[1697]
Yes, it's Amazon S3. You need to use the official URLs: syllable.org 
or web.syllable.org/pages/index.html
Dockimbel
27-May-2011
[1698]
Won't have time tonight for a debugging session, will look into it 
later next week.
Andreas
27-May-2011
[1699]
syscalls will probably be gone soon anyway :)
Kaj
27-May-2011
[1700]
How is that?
Andreas
27-May-2011
[1701]
i think we'll switch to libc once dynlinking works for elf
Kaj
27-May-2011
[1702x2]
You'll still need prolog and epilog syscalls, and I think Doc wants 
to minimise libc usage
I agree that it's almost unavoidable, though
Andreas
27-May-2011
[1704]
what prolog/epilog syscalls?
Kaj
27-May-2011
[1705]
exit for example
Andreas
27-May-2011
[1706]
why not use libc exit?
Kaj
27-May-2011
[1707x2]
Ah, you're right
Anyway, I do greatly value the capability of syscalls. I'll also 
need them for close Syllable integration
Andreas
27-May-2011
[1709x5]
certainly, they'll still exist
http://bolka.at/2011/tmp/world.bin
a red-generated dynamically linked binary, if someone wants to try 
on syllable :)
requires libc.so.6, calls puts and exit
ah, ignore that. need to add the alignment fix to that first
Kaj
27-May-2011
[1714x8]
http://red.esperconsultancy.nl/Syllable-readelf-a-link.txt
link is almost the smallest system program, apart from false
It's still 15 KB. There's a lot of GNU junk in there
Doc, the newest Syllable browser offers to download the executables, 
so it's probably a problem with the older browser. The new one is 
on your live CD, not in the 0.6.6 release
Red programs currently indeed pagefault on address 12345678
Ah, I was advised incorrectly. exit is not syscall 5, but 6
5 is indeed Fork, which crashes now
I uploaded new binaries
Dockimbel
27-May-2011
[1722]
Congratulations, no more segfaults :-)