How change process flags from userland?

2010-06-30 Thread Andrey Zonov
Hi, I want to set P_PROTECTED flag for some daemons after it start, without patching application and kernel. It possible? -- Andrey Zonov ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To

Re: How change process flags from userland?

2010-06-30 Thread Andrey V. Elsukov
On 30.06.2010 10:26, Andrey Zonov wrote: Hi, I want to set P_PROTECTED flag for some daemons after it start, without patching application and kernel. It possible? Did you try sysutils/scprotect? -- WBR, Andrey V. Elsukov signature.asc Description: OpenPGP digital signature

Re: How change process flags from userland?

2010-06-30 Thread pluknet
On 30 June 2010 10:26, Andrey Zonov andrey.zo...@gmail.com wrote: Hi, I want to set P_PROTECTED flag for some daemons after it start, without patching application and kernel. It possible? May be madvise(NULL, 0, MADV_PROTECT) will fit your needs? (see howto example in usr.sbin/cron). Note,

Re: How change process flags from userland?

2010-06-30 Thread pluknet
On 30 June 2010 11:33, pluknet pluk...@gmail.com wrote: On 30 June 2010 10:26, Andrey Zonov andrey.zo...@gmail.com wrote: Hi, I want to set P_PROTECTED flag for some daemons after it start, without patching application and kernel. It possible? May be madvise(NULL, 0, MADV_PROTECT) will

mallinfo equivalent on FreeBSD

2010-06-30 Thread dhruva
Hello, I would like to know the memory usage (total virtual memory) inside a process and make decisions accordingly. To be more specific, I am using BerkeleyDB backed set or std::set (C++ STL) depending on my current memory usage as my process will need to run in a resource constrained

Supermicro BIOS's watchdog feature?

2010-06-30 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi, Is there anybody used the Supermicro's BIOS watchdog feature (reboot if no OS activities)? It seems that ICH10R's watchdog is supported by ichwd(4) but Supermicro BIOS needs some special treatments which is beyond what ichwd(4) and

Re: kernel patch needed for wine?

2010-06-30 Thread Kostik Belousov
On Tue, Jun 29, 2010 at 06:54:11PM -0500, Sam Fourman Jr. wrote: Hello FreeBSD hackers. Last Tuesday blizzard release World of Warcraft 3.3.5, and with this patch World of warcraft stopped working in FreeBSD 8.1 amd64, it crashes right after login. details here:

Re: Supermicro BIOS's watchdog feature?

2010-06-30 Thread Matthew Jacob
On 6/30/2010 2:01 AM, Xin LI wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi, Is there anybody used the Supermicro's BIOS watchdog feature (reboot if no OS activities)? It seems that ICH10R's watchdog is supported by ichwd(4) but Supermicro BIOS needs some special treatments which

Re: kernel patch needed for wine?

2010-06-30 Thread Sam Fourman Jr.
Which patch ? icebp generates the SIGTRAP on latest 8-stable, verified by the following trivival assembler program:        .text        .globl  main main:        .byte   0xf1        xorl    %edi,%edi        call    exit Thank you for your reply, I did not know enough assembly to test

Re: kernel patch needed for wine?

2010-06-30 Thread Garrett Cooper
On Wed, Jun 30, 2010 at 8:43 AM, Sam Fourman Jr. sfour...@gmail.com wrote: Which patch ? icebp generates the SIGTRAP on latest 8-stable, verified by the following trivival assembler program:        .text        .globl  main main:        .byte   0xf1        xorl    %edi,%edi        call    

Non-POSIX compliant pmake with secondary expansion?

2010-06-30 Thread Garrett Cooper
Hi guys, I currently set: .POSIX= In a Makefile thinking that it would enable only POSIX functionality, and was fidgeting around with the Makefile trying to get it to work. In short, I used secondary expansion, it worked, then compared the output from gmake and it failed (because they

Re: How change process flags from userland?

2010-06-30 Thread Andrey Zonov
Yes, but I want change process flags without kernel hacking/loading modules or modification applications. Andrey V. Elsukov пишет: On 30.06.2010 10:26, Andrey Zonov wrote: Hi, I want to set P_PROTECTED flag for some daemons after it start, without patching application and kernel. It

Re: kernel patch needed for wine?

2010-06-30 Thread Sam Fourman Jr.
On Wed, Jun 30, 2010 at 11:26 AM, Garrett Cooper yanef...@gmail.com wrote: On Wed, Jun 30, 2010 at 8:43 AM, Sam Fourman Jr. sfour...@gmail.com wrote: Which patch ? icebp generates the SIGTRAP on latest 8-stable, verified by the following trivival assembler program:        .text        .globl  

Re: kernel patch needed for wine?

2010-06-30 Thread Garrett Cooper
On Wed, Jun 30, 2010 at 2:22 PM, Sam Fourman Jr. sfour...@gmail.com wrote: On Wed, Jun 30, 2010 at 11:26 AM, Garrett Cooper yanef...@gmail.com wrote: On Wed, Jun 30, 2010 at 8:43 AM, Sam Fourman Jr. sfour...@gmail.com wrote: Which patch ? icebp generates the SIGTRAP on latest 8-stable, verified

Re: Supermicro BIOS's watchdog feature?

2010-06-30 Thread Dag-Erling Smørgrav
Matthew Jacob m...@feral.com writes: Xin LI delp...@delphij.net writes: It seems that ICH10R's watchdog is supported by ichwd(4) but Supermicro BIOS needs some special treatments which is beyond what ichwd(4) and watchdogd(8) would do... What do mean special treatment? The watchdog timer

Re: How change process flags from userland?

2010-06-30 Thread Julian Elischer
On 6/30/10 11:23 AM, Andrey Zonov wrote: Yes, but I want change process flags without kernel hacking/loading modules or modification applications. you are going to have to do one of those. The only alternative is that if you have root you can modify a processe's flags using gdb and

Re: Supermicro BIOS's watchdog feature?

2010-06-30 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 2010/06/30 14:49, Dag-Erling Smørgrav wrote: Matthew Jacob m...@feral.com writes: Xin LI delp...@delphij.net writes: It seems that ICH10R's watchdog is supported by ichwd(4) but Supermicro BIOS needs some special treatments which is beyond

Re: kernel patch needed for wine?

2010-06-30 Thread Sam Fourman Jr.
Also, is there perhaps a sideeffect dealing with the size of a char on FreeBSD vs Linux? That's a pretty badass way to load assembler instructions on the stack :). Thanks! -Garrett Garrett, So is this in-fact a FreeBSD kernel bug on amd64? if so, how hard would it be to patch it so it

Re: Supermicro BIOS's watchdog feature?

2010-06-30 Thread Dag-Erling Smørgrav
Xin LI delp...@delphij.net writes: Hmm... Sorry I think I didn't described the behavior accurately. Currently if I enable the Watch Dog option in BIOS, the system reboots after ~5 mins regardless whether I have ichwd(4) and watchdogd(8) loaded. Perhaps the motherboard has additional watchdog

Re: kernel patch needed for wine?

2010-06-30 Thread Sam Fourman Jr.
Also, is there perhaps a sideeffect dealing with the size of a char on FreeBSD vs Linux? That's a pretty badass way to load assembler instructions on the stack :). Thanks! -Garrett For what it is worth I ran the test code on one of my NetBSD amd64 Xen Dom0 servers it generated trapped as

Re: kernel patch needed for wine?

2010-06-30 Thread Uffe Jakobsen
Garrett writes: Also, is there perhaps a sideeffect dealing with the size of a char on FreeBSD vs Linux? That's a pretty badass way to load assembler instructions on the stack :). I may be totally wrong here - but could it be NX/XD/XN protection ? /Uffe

Re: kernel patch needed for wine?

2010-06-30 Thread Alexander Kabaev
On Wed, 30 Jun 2010 14:42:47 -0700 Garrett Cooper yanef...@gmail.com wrote: On Wed, Jun 30, 2010 at 2:22 PM, Sam Fourman Jr. sfour...@gmail.com wrote: On Wed, Jun 30, 2010 at 11:26 AM, Garrett Cooper yanef...@gmail.com wrote: On Wed, Jun 30, 2010 at 8:43 AM, Sam Fourman Jr.

Re: Supermicro BIOS's watchdog feature?

2010-06-30 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 2010/06/30 15:19, Dag-Erling Smørgrav wrote: Xin LI delp...@delphij.net writes: Hmm... Sorry I think I didn't described the behavior accurately. Currently if I enable the Watch Dog option in BIOS, the system reboots after ~5 mins regardless

Re: kernel patch needed for wine?

2010-06-30 Thread Garrett Cooper
On Wed, Jun 30, 2010 at 4:03 PM, Uffe Jakobsen u...@uffe.org wrote: Garrett writes: Also, is there perhaps a sideeffect dealing with the size of a char on FreeBSD vs Linux? That's a pretty badass way to load assembler instructions on the stack :). I may be totally wrong here - but could

Re: kernel patch needed for wine?

2010-06-30 Thread Garrett Cooper
2010/6/30 Alexander Kabaev kab...@gmail.com: On Wed, 30 Jun 2010 14:42:47 -0700 Garrett Cooper yanef...@gmail.com wrote: On Wed, Jun 30, 2010 at 2:22 PM, Sam Fourman Jr. sfour...@gmail.com wrote: On Wed, Jun 30, 2010 at 11:26 AM, Garrett Cooper yanef...@gmail.com wrote: On Wed, Jun 30,

Re: kernel patch needed for wine?

2010-06-30 Thread Alexander Kabaev
On Wed, 30 Jun 2010 16:45:18 -0700 Garrett Cooper yanef...@gmail.com wrote: Now make icebp_func const and observe the program start working. The test case is broken as written, because icebp_func array is writable, so in ends up in a non-const part of .bss, which is not marked as

Re: kernel patch needed for wine?

2010-06-30 Thread Uffe Jakobsen
Alexander Kabaev writes: On Wed, 30 Jun 2010 16:45:18 -0700 Garrett Cooper yanef...@gmail.com wrote: Which means that Linux is broken in this regard because it's loading data as text, not data as data and text as text? Thanks, Nope, I think this is i386 vs. amd64 difference. NX page

Re: kernel patch needed for wine?

2010-06-30 Thread Sam Fourman Jr.
i386 32bit-mode page table has no NX bit - the PAE page table has... You are correct, I went in my BIOS, and disabled execute bit. Then when I run the test C code, the get trapped just as expected on both 8.1 amd64 and CURRENT amd64 however World of warcraft still segfaults even though execute

Re: How change process flags from userland?

2010-06-30 Thread Andrey Zonov
Can you explain how change flags with /dev/kmem? kvm_write(3) not work for this. Julian Elischer пишет: On 6/30/10 11:23 AM, Andrey Zonov wrote: Yes, but I want change process flags without kernel hacking/loading modules or modification applications. you are going to have to do one of those.