Re: [osol-code] Tracing 32bit sys call in kernel module

2011-10-11 Thread Casper . Dik
>So, tracing 32bit sys calls on 64 bit platform is the basic issue. There are two sysent tables sysent (native, 64 bit) and sysent32(32 bit system calls). You need to modify the 32 bit and the 64 bit entry (and you need to provide a native and a 32 bit implementation but in some cases they can

Re: [osol-code] Privileges of a process

2011-02-08 Thread Casper . Dik
>I'm trying to create a pset with pset_create() and I get errno=1. >In the man of pset_create() is written that this happens when the >{PRIV_SYS_RES_CONFIG} privilege is not asserted in the effectvie >set of the calling process. >Is the problem indeed in the privilege? truss will show that: % t

Re: [osol-code] How to compile libc or pthread ?

2010-11-25 Thread Casper . Dik
>On Thu, 2010-11-25 at 00:55 -0800, Afantee Lee wrote: >> Hi, All >> With the help for my previous question, I checked out the source code tree. >> of libc/port/thread >> but, it seems that there is no way to compile pthread or libc only. there is >> makefile under libc , but, make all does not

Re: [osol-code] writing a large file to /tmp kills opensolaris

2010-10-14 Thread Casper . Dik
>Hi Ian, > >yes volsize shows as 2.00G, and used as 2.13G and available 173Gb. > >But why does the system just die quietly ? > >I would expect some "noise" when a filesystem runs out of space, >and with nothing else running (single user mode), would be expected ? Does it die or does it hang? H

Re: [osol-code] writing a large file to /tmp kills opensolaris

2010-10-14 Thread Casper . Dik
>In theory, since rpool/swap is a zfs file system, it should be able to >grow to the maximum free space of rpool, but maybe not ? There's an issue with using zfs backed swap; the default configuration needs to find memory in order to page out data and this creates an additional memory pressur

Re: [osol-code] Debugging a system freeze: Booting with -k

2010-10-12 Thread Casper . Dik
>On Tue, 2010-10-12 at 17:12 +0200, casper@sun.com wrote: >> >Do you like to tell us that the current code no longer supports Sun serial >> >keyboards? >> >> The code is still there but the hardware is no longer supported. >> >> >> I've actually added some code to the frkit "acpidrv" which

Re: [osol-code] Debugging a system freeze: Booting with -k

2010-10-12 Thread Casper . Dik
>Do you like to tell us that the current code no longer supports Sun serial >keyboards? The code is still there but the hardware is no longer supported. I've actually added some code to the frkit "acpidrv" which can create a panic or enter kdb when you hit the (soft) powerbutton three times qu

Re: [osol-code] Why not mmap-ing time() call?

2010-08-10 Thread Casper . Dik
>Well, quite often you need to call time function in a loop. For >example, you have a loop that accepts network packets, or connections >and every so often you need to have current system time. The resolution >of the timer can be specific to application, i.e. it could be seconds, >milliseconds, o

Re: [osol-code] Why not mmap-ing time() call?

2010-08-10 Thread Casper . Dik
>I just saw with truss the following: >fstat64(5, 0x08062448) = 0 >fcntl(5, F_SETFD, 0x0001) = 0 >llseek(5, 1068220, SEEK_SET)= 1068220 >fstat64(5, 0x080452C0) = 0 >fstat64(5, 0x080451D0)

Re: [osol-code] flock(...) not existing?

2010-07-06 Thread Casper . Dik
>I can't find man pages about flock and I can't compile my programs which uses >flock(...). >I found something similar called flockfile(). Does this mean flockfile should >be used instead of flock? No, flockfile() works on the inside a process; you should use fcntl() locking (see fcntl(2) and lo

Re: [osol-code] first time looking at opensolaris code...

2010-05-04 Thread Casper . Dik
>Its worse than that -- unless the reference is in kernel memory, there >is no reference on disk that goes backwards from inode to path name. >find (see below) is about the only way that is guaranteed to work -- and >of course that only finds inodes that actually *have* an active >pathname.

Re: [osol-code] hint regarding "uintptr_t u_envp" access from

2010-04-26 Thread Casper . Dik
>Thanks for holding my hand guys, this appears to work although I am certain it >is ugly. Any direct suggestions ? There is no guarantee that is returns the proper data all the time. >Should I be locking anything while I am peeking around on the user stack? >Perhaps "p_lock" ? Won't help; th

Re: [osol-code] source code for specific builds

2010-04-23 Thread Casper . Dik
>Hi All, > >I saw email many months ago about this, but now I can't find it. I want >to get the source code matching specific builds of Nevada. So, for >instance, the source for build 93. As I recall, there is at least one >website which has all of the builds (well, at least, most of them).

Re: [osol-code] hint regarding "uintptr_t u_envp" access from

2010-04-23 Thread Casper . Dik
>> There is only one way when the kernel knows and can >> inspect the >> environment: during evecve. > >Alright. Appears to be simply placing ptrs on the userstack, as an array, >using the stk_putptr() method (based on sulword store). I can try to do that >in reverse. Correct. (It first copies

Re: [osol-code] hint regarding "uintptr_t u_envp" access from

2010-04-23 Thread Casper . Dik
>I would like to see if a process (curthread->t_procp) has an environment >variable $HOME, and if so, get the value of it. > >I know it is not something the kernel usually cares about (which probably >explains why there are no examples of it) but I am testing a theory, and maybe >learn a little mo

Re: [osol-code] hint regarding "uintptr_t u_envp" access from kernel module?

2010-04-23 Thread Casper . Dik
>Solaris 5.10 Generic_141445-09 i86pc > >I am playing around with a kernel module, learning some of the inner workings >of the kernel, and I would like to have a look at a process' environment. > >I am confused by the definition in user_t for environment: > > uintptr_t u_envp; > >.. since

Re: [osol-code] Accessing Ultrasparc VIS block copy instruction from C code?

2010-03-31 Thread Casper . Dik
>To avoid ambiguity: The problem is, that as far as I know the >platform-specific versions of libc are still closed src binary-only >releases. Otherwise we could of course just look at ON how they >implemented the platform-specific libc-versions. Have you looked in: usr/src/lib/libc_psr? Casper

Re: [osol-code] Accessing Ultrasparc VIS block copy instruction from C code?

2010-03-31 Thread Casper . Dik
>But not strcpy(), sprintf(), right? What do you expect in strcpy/sprintf? Typically usage will use smallish strings and the test of needing a *faster* strcpy/sprintf will typically cost more for most cases. Casper ___ opensolaris-code mailing list op

Re: [osol-code] Accessing Ultrasparc VIS block copy instruction from C code?

2010-03-30 Thread Casper . Dik
>If there is a way to use VIS (or any other SPARC instructions for that >mater) to make byteswapping faster then please implement them as sparc >versions of hton[s,l,ll]() and fixup . Doing it that >way means that ZFS, Crypto, Networking and a whole lot of other code >gets to take advantage

Re: [osol-code] Door file loosing its door attribute?

2010-03-26 Thread Casper . Dik
>I've been tinkering with doors and I've hit a snag. > >When I create my door, the file file looks OK: > >did = door_create(doorFn, NULL, 0); > >fattach(did, "/tmp/demo"); > >while( 1 ) sleep( 10 ); > >Drw--- 1 ian staff 0 Mar 26 23:53 /tmp/demo > >But after I run a client that

Re: [osol-code] about #pragma ident "%Z%%M% %I% %E% SMI"

2010-03-08 Thread Casper . Dik
>joerg.schill...@fokus.fraunhofer.de (Joerg Schilling) writes: > >> The problem with GCC-4.4 is that it cannot be called ANSI C compliant. >> I did e.g. not jet find a way to prevent a warning for this line: >> >> (void)write(1, "Test" 4); >> >> which is 100% correct and even marks the return

Re: [osol-code] Update to POSIX versions of commands?

2010-03-02 Thread Casper . Dik
>On Tue, Mar 2, 2010 at 7:02 AM, Garrett D'Amore wrote: >> >> I'm just thinking, isn't it time we just bit the bullet and told our users >> to start using the POSIX defaults, instead of continuing to supply the >> legacy compatibility stuff forever. >> >> It would save a little space, and maybe w

Re: [osol-code] mmap on SMP systems

2010-02-28 Thread Casper . Dik
>Better is to use libast because its memory allocator allows switching >between mmap(anon)/brk()/heap at runtime. Compile your application >with -I/usr/include/ast -last and ln -s /usr/lib/libast.so.1 >/usr/lib/libast.so Why? Do you have any roof that libast performs better then any other memo

Re: [osol-code] mmap on SMP systems

2010-02-28 Thread Casper . Dik
>Hi, I've read some reports that calling mmap() on SMP systems can be >slow. Solaris has quite a few memory allocators, which makes a bit hard >to figure out the best memory allocation technique on SMP hardware. > >I have single threaded application, which allocates large chunks of >memory (256K a

Re: [osol-code] realloc fails

2010-02-12 Thread Casper . Dik
> >I have a program that fails on realloc. dbx reports: > >t...@1 (l...@1) signal SEGV (no mapping at the fault address) in t_splay at >0xd078b710 >0xd078b710: t_splay+0x007e:movl %ebx,0x0008(%eax) >Current function is _eina_strbuf_resize > 521 buffer = realloc(buf->buf, new_size

Re: [osol-code] amd64 & strcpy() on SXCE NV 129 vs. POSIX.1-2008

2010-01-07 Thread Casper . Dik
>Bart Smaalders wrote: > >> All early strcpy implementations handle some overlapping copies >> incorrectly. In order to determine safety, it is necessary to >> find the length of the string before beginning the copy. > >Could you please give us an example where this typical implementation: > >ch

Re: [osol-code] amd64 & strcpy() on SXCE NV 129 vs. POSIX.1-2008

2010-01-06 Thread Casper . Dik
>My gut feeling is that the existing bug should be closed "not-a-defect" >(if there is even a CR open for it), and Joerg (and any one else who has >code that made bad assumptions) needs to fix their code. > >If we are terribly concerned that there are other programs from ISVs >that have made t

Re: [osol-code] amd64 & strcpy() on SXCE NV 129 vs. POSIX.1-2008

2009-12-18 Thread Casper . Dik
>Previous versions of the POSIX standard made no limitations on strcpy() >but the current standard claims that using strcpy() with overlapping >buffers gives undefined results. Even the Single UNIX ® Specification, Version 2, says: If copying takes place between objects that overlap, the beh

Re: [osol-code] Trojan/malware in Solaris resolver library?

2009-11-25 Thread Casper . Dik
>I just realised something, 'domainname' returns localnet.net, maybe this >is what's appending .net to non-existent domain names. But then this >doesn't explain why on occasions typing 'www.google.com' or any other >valid name, takes web pages to other web servers?? > That could just be a

Re: [osol-code] Trojan/malware in Solaris resolver library?

2009-11-25 Thread Casper . Dik
>Solaris machine - IP: 192.168.1.1, Hostname: ultra10-hme0 > >ISP DNS server - IP: 212.159.13.49 > > >I'm really confused, because when I run 'host' command on a non-existent >domain, it returns that the domain is not found > >r...@ultra10 host -v www.somefakehost123.com >Trying "www.somefakeho

Re: [osol-code] Trojan/malware in Solaris resolver library?

2009-11-25 Thread Casper . Dik
>Hello Solaris developers, I need help with diagnosing possible malware, >which seems to be originating from Solaris shared library. > >The problem occurs when I submit a URL that doesn't exist. Instead of >returning an error, it seems Solaris resolver returns IP addresses of >webserver whic

Re: [osol-code] [Fwd: [osol-discuss] nightly fail. three times in two nights. *help*]

2009-11-06 Thread Casper . Dik
> >> >> Short form: if you're going to move stuff from the cloned >> directory to a more handy build location, move *everything* >> not just usr. >> > >failures continue : > >http://www.blastwave.org/dclarke/OpenSolaris/nightly_06_Nov_2009_0905HRS_GMT.txt > >and this time I was careful to leave th

Re: [osol-code] Help me intercept the gethrtimef function

2009-10-23 Thread Casper . Dik
>Hi, > >I'm experiencing a problem that I'm trying to intercept the time series >function. I was interested when I noticed that open solaris is using a special fasttrap for fastening time retrieve. Does it work when you remove the cmn_err messages? I'm sure that that will kill your system.

Re: [osol-code] Crash in kernel code!

2009-10-08 Thread Casper . Dik
>Hi I'm getting the following crash in mutex_exit which is being done in the >kernel. > >> ::status >debugging crash dump vmcore.0 (32-bit) from solaris-devx >operating system: 5.11 snv_72 (i86pc) >panic message: mutex_exit: not owner, lp=d0eb3c94 owner=f6c4f510 >thread=d0eb3de0 >dump content:

Re: [osol-code] Exporting solaris symbols from driver!

2009-08-31 Thread Casper . Dik
>Oh yes that's what has happened, I checked the symbols with "nm driver2" and >the driver1 symbols n o longer appear as UNDEF. But that is not what I want. > >OK so here's what happens when I use your option of > >ld -dy -N /kernel/drv/driver1 -N /kernel/misc/scsi -r driver2.o -o driver2 You sh

Re: [osol-code] Exporting solaris symbols from driver!

2009-08-31 Thread Casper . Dik
>Yes that's correct, driver1 is present in /kernel/drv and driver2 has symbols >it is using from dri ver1 and also transport layer functions. > The -Bdirect option seems to be working fine though. Wel, if you actually used the command line as before: >ld -dy -Bdirect driver1 -r driver2.

Re: [osol-code] Exporting solaris symbols from driver!

2009-08-31 Thread Casper . Dik
>Sorry Casper, small typo. Actually I wanted to use driver1 symbols in driver2, >so what I'm using w as actually >ld -dy -N driver1 -N misc/scsi -r driver2.o -o driver2 Where is the driver1 installed? If it's installed in the standard directories (/kernel/drv/...), then you should specify it a

Re: [osol-code] Exporting solaris symbols from driver!

2009-08-31 Thread Casper . Dik
>I've been using this linker line so far, >ld -dy -N driver2 -r driver2.o -o driver2 > >Upon your suggestion I modified this to >ld -dy -N driver2 -N misc/scsi -r driver2.o -o driver2 The "-N driver2" is not correct. Are there other drivers you want to use? "misc/scsi" is found using the stand

Re: [osol-code] Exporting solaris symbols from driver!

2009-08-28 Thread Casper . Dik
>Hi I have two loadable modules and one of them depends on the other for some >symbols. I'm using >ld -N driver1 -o driver2 driver2.o >to resolve the symbol, but when I do so I'm unable to attach driver2 because >it is unable to resol ve symbols for scsi_hba_tran_alloc etc. and related API's ex

Re: [osol-code] Process argument list cut-off

2009-08-22 Thread Casper . Dik
>So a situation at $WORK today has me wondering something - why is it >that the pr_psargs member of psinfo is limited to 80 bytes (therefore, >characters) ? Is this mainly due to historic reasons? Well, /proc uses public structures; once they're defined, you cannot change them. But there ar

Re: [osol-code] Query on TimeZone

2009-06-19 Thread Casper . Dik
>Is it required to run rtc when I edit /etc/TIMEZONE file and change TZ >variable ? No; there's no direct connection between what's in /etc/rtc_config and what is in /etc/TIMEZONE. By default they are configured the same but you can also run the rtc clock in a different timezone, e.g., GMT.

Re: [osol-code] Query on TimeZone

2009-06-19 Thread Casper . Dik
>Hi Guys, > >I have one x86 system installed with Solaris 10 Update 6. When I do >TimeZone change , I have to run ntpdate command to synchronize >the time of the system. I do following steps. My current time zone is >in "Asia/Calcutta" > >1. Edit /etc/TIMEZONE and Change TZ variable to "Ameri

Re: [osol-code] Testing of changes to class action scripts

2009-06-11 Thread Casper . Dik
>When either adding a new class action script or updating an old one, >how should this be tested? > >Obviously bfu doesn't test this. "acr" does, I think. >Is it possible to do a limited upgrade install using the bits from nightly? Well, typically class action scripts are run as follows: ech

Re: [osol-code] Thoughts on project numbers

2009-06-05 Thread Casper . Dik
>Extended Accounting stores project ids only. Not having project ids >consistent across system will make generating accounting reports across >systems painful since one would need to resolve the project id in the >accounting file to the project name on the originating system, instead >of on t

Re: [osol-code] Public interface to load a kernel module from user space?

2009-05-08 Thread Casper . Dik
>For automaticly loaded modules, there is always something that pulls the >module into the kernel, be it a dependency from another module or >someone opening a device file. Neither of those is going to pull in a >new standalone module, so that code can be executed. How many of those do we hav

Re: [osol-code] Public interface to load a kernel module from user space?

2009-05-08 Thread Casper . Dik
>Alan Coopersmith wrote: >> Is there a public interface to load a kernel module from user space? >> >> Looking at the modload source, it seems to use the modctl() system call >> but I see no man page for that. >> >> (At this point it's a matter of curiosity, since I noticed that the >> Xorg code

Re: [osol-code] OpenSolaris Live CD HANGS on x86 Toshiba Satellite P305D laptop..

2009-04-10 Thread Casper . Dik
>A year and a half since I've had my Toshiba Satellite 305D .. and STILL >no support for Solaris 10 .. just sad. > >If anyone has any idea when this will work, please let me know if it's >on the radar.. or whom I cann contact on the cert team to get some >insight (or work-around drivers..??).

Re: [osol-code] No synchronization type in kmutex simlar to USYNC_PROCESS_ROBUST

2009-04-09 Thread Casper . Dik
>Hi, > >Recently we hit a problem with one of our file systems where 2 kernel threads >were killed holding a kmutex. Due to this all the applications which use the fs blocked waiting for the kmutex. > >I am wondering why there is no synchronization type equivalent to >USYNC_PROCESS_ROBUST (whi

Re: [osol-code] Ability to increase a process L privilege set

2009-04-01 Thread Casper . Dik
>Hello Darren, > >Wednesday, April 1, 2009, 2:47:31 PM, you wrote: > >DJM> Robert Milkowski wrote: >>> It would also require adjustment of setppriv() at >>> http://src.opensolaris.org/source/xref/onnv/o nnv-gate/usr/src/uts/common/syscall/ppriv.c#57 >>> >>> and perhaps somewhere else. >>> >>> B

Re: [osol-code] Ability to increase a process L privilege set

2009-04-01 Thread Casper . Dik
>In my perfect privilege system we would have all of P,I,E,L,F,A. Now >that OpenSolaris has moved to ZFS root and we have a more complete >system/xattr system we could reintroduced the A and F sets. But not in a process; since we're talking about the process model, F&A aren't important. Casp

Re: [osol-code] Ability to increase a process L privilege set

2009-04-01 Thread Casper . Dik
> > >>The above code change would allow growing L set if new L' set is a subset >>of the effective set of the calling process. >>What would be the impact? Would it break anything? > > >The limit has been designed as a limit you cannot escape. > >Changing that would break a promise the privilege sy

Re: [osol-code] Ability to increase a process L privilege set

2009-04-01 Thread Casper . Dik
>The above code change would allow growing L set if new L' set is a subset >of the effective set of the calling process. >What would be the impact? Would it break anything? The limit has been designed as a limit you cannot escape. Changing that would break a promise the privilege system makes.

Re: [osol-code] [on-discuss] Fwd: CR 6820737 Closed, P1 opensolaris/triage-queue Solaris needs increase number of realtime signals for platform parity

2009-03-23 Thread Casper . Dik
>"I. Szczesniak" wrote: > >> Then search again, please. We were unable to port two products to >> Solaris because Sun only implemented the minimum number required by >> POSIX (8) that Sun marketing can add the 'certified POSIX-conforman= >t' >> sticker. > >Solaris _is_ POSIX compliant as Solaris

Re: [osol-code] [on-discuss] Fwd: CR 6820737 Closed, P1 opensolaris/triage-queue Solaris needs increase number of realtime signals for platform parity

2009-03-23 Thread Casper . Dik
I'm not sure how brandz manipulates signals, but if the RFE also requires to change the RT signals in Solaris, then that is fine. Perhaps they only use brandz because Solaris doesn't support sufficient RT signals? Casper ___ opensolaris-code mailin

Re: [osol-code] [brandz-discuss] Number of POSIX realtime signals in brandz?

2009-03-23 Thread Casper . Dik
>64 realtime signals would be OK for a 64 bit operating system. Why would that need to be different for a 64 bit OS? I wonder why people use SIGTRXXX signals or signals at all. Casper ___ opensolaris-code mailing list opensolaris-code@opensolaris.o

Re: [osol-code] [brandz-discuss] Number of POSIX realtime signals in brandz?

2009-03-23 Thread Casper . Dik
>On 3/23/09, James Litchfield wrote: >> To make it clear - there is no magic tunable to change the number >> of RT signals. It requires changing source (catching every place the >> current data structures used are too small) and rebuilding. > >Why does Solaris only support 8 signals? AIX suppor

Re: [osol-code] [on-discuss] rev 8941 and memory leaks

2009-03-03 Thread Casper . Dik
>ff0192256020 19204 ff01ac214558 cralloc_flags+0x1e >ff0192256020 1902833 ff01ac212db8 cralloc_flags+0x1e >ff019131fb20 1921659 ff0192255bf8 labelalloc+0x2f These are pretty horrible. Try the ::bufctl comand in mdb. You're using Trusted Extensions? Casper

Re: [osol-code] chmod failing with EPERM and PRIV_ALL needed

2009-03-03 Thread Casper . Dik
>Hi, > >I'm debugging an issue with GNU tar. Without going into a lot of >details (though I can if needed), here's a truss snippet of 'tar -xzf >foo.tar.gz' running as root: > >2655: getppriv(PRIV_EFFECTIVE, {}) = 0 >2655: all >2655: setppriv(PRIV_SET, PRIV_EFFECT

Re: [osol-code] opensolaris and linux

2009-02-25 Thread Casper . Dik
>http://askdrroot.blogspot.com/2006/10/q-can-i-run-linux-applications-on.html Did you install a linux zone, then? Casper ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Re: [osol-code] opensolaris and linux

2009-02-25 Thread Casper . Dik
>I hear that i can use all the software for linux in opensolaris, i tried to >install a package and it did not work, how can do it? Who told you that? "From the source" you need to compile the software. Casper ___ opensolaris-code mailing list opens

Re: [osol-code] pthread entry points in libc, but not pthread functionality

2009-02-20 Thread Casper . Dik
>A customer had a small program using pthreads that crashed pretty much at startup. After verifying the crash on my system, I noticed that the customer >had not linked the program with libpthread. Adding -lpthread to the linking > command fixed the problem. > >If a program does not link a needed l

Re: [osol-code] Compile failed due to cast warning.

2009-02-03 Thread Casper . Dik
>casper@sun.com wrote: > >> >> >Hi, >> > >> >I add some test codes to ../uts/common/os/kcpc.c. >> > >> >int >> >kcpc_bind_thread(kcpc_set_t *set, kthread_t *t, int *subcode) >> >{ >> >.. >> >/* new codes. */ >> >cmn_err(CE_NOTE, "ks_data = %" PRId64 ".\n", (uint64_t)set->

Re: [osol-code] Compile failed due to cast warning.

2009-02-03 Thread Casper . Dik
>Hi, > >I add some test codes to ../uts/common/os/kcpc.c. > >int >kcpc_bind_thread(kcpc_set_t *set, kthread_t *t, int *subcode) >{ >.. >/* new codes. */ >cmn_err(CE_NOTE, "ks_data = %" PRId64 ".\n", (uint64_t)set->ks_data); >.. >} You're printing a pointer; you need

Re: [osol-code] Hi all, How to open a file in _kernel state?

2009-02-02 Thread Casper . Dik
>There does have the requirement to read files in the kernel. > >We're working on a 10Gb Ethernet driver and we want to let the driver >update the firmware on-the-fly if needed when the driver is loaded. >Save the firmware image in a separate file and let the driver read it >with kobj_open_file()

Re: [osol-code] FCode

2009-01-28 Thread Casper . Dik
>On Jan 27, 2009, at 6:03 PM, Steve Scargall wrote: > >> I doubt there's many people on this alias that will be able to >> answer your question with any great detail. I'm no OBP expert but >> have played around with it at times especially for debugging low- >> level hardware issues. It's ex

Re: [osol-code] 6565503 callout changes, stime(2), and timeouts

2009-01-22 Thread Casper . Dik
>Is the premature return from the system call (not caused by signal >delivery) allowed by any standard? How is this case handled in other >operating systems? > >E.g. the www.opengroup.org page for poll() tells me >that "... poll() shall wait at least timeout milliseconds >for an event to occur on

Re: [osol-code] 6565503 callout changes, stime(2), and timeouts

2009-01-21 Thread Casper . Dik
>The putback for 6565503 "callout processing is single threaded, throttling >applications that rely on scalable callouts" in build 103 apparently has >changed the kernel function cv_waituntil_sig() to create callouts with >a new flag CALLOUT_FLAG_HRESTIME. This flag is described in >uts/common/sy

Re: [osol-code] access and X_OK as super-user

2009-01-21 Thread Casper . Dik
>On Tue, Jan 13, 2009 at 5:12 AM, wrote: >> >> I see no reason for "access(file, X_OK))" should return 0 for >> ordinary files which have no execute bit set. >> >> I think we can just change that. > >This behaviour is controlled by the file_dac_execute privilege. >Processes running as root will

Re: [osol-code] Change a process name ?

2009-01-19 Thread Casper . Dik
>Erm... I doubt it's "just 10 lines" - you need a bit more code. Beyond >that we would have to maintain two codelines, including for the >following upcoming changes: >- Adding "-s" for alternative signal handling >- Use of |sched_yield()| for zero values (based on empirical testing for >the built

Re: [osol-code] Change a process name ?

2009-01-18 Thread Casper . Dik
>from /proc/*/psinfo: >* pr_psargs (first 80 characters of args as of exec time) >* pr_fname (exec name) >* pr_argv (offsets into process address space?) Correct; and you need to have access to the process memory before you can dereference them. (ps is no longer set-uid root; even ps, then, h

Re: [osol-code] access and X_OK as super-user

2009-01-13 Thread Casper . Dik
>On Tue, Jan 13, 2009 at 2:20 PM, Joerg Schilling > wrote: >> casper@sun.com wrote: >> >>> >>> > >>> > > I see no reason for "access(file, X_OK))" should return 0 for >>> > > ordinary files which have no execute bit set. >>> > > >>> > > I think we can just change that. >>> > >>> >Modulo due di

Re: [osol-code] access and X_OK as super-user

2009-01-13 Thread Casper . Dik
> > > I see no reason for "access(file, X_OK))" should return 0 for > > ordinary files which have no execute bit set. > > > > I think we can just change that. > >Modulo due diligence to see what in our codebase might be depending on it. >Is it really worth it? As supposed to adding __posix_acces

Re: [osol-code] access and X_OK as super-user

2009-01-13 Thread Casper . Dik
I see no reason for "access(file, X_OK))" should return 0 for ordinary files which have no execute bit set. I think we can just change that. Casper ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailma

Re: [osol-code] [shell-discuss] "atomic" writes to a pipe ?

2008-12-06 Thread Casper . Dik
>Is there a way that multiple proceses can write to the same pipe fd but >keep their writes "atomic" (regardless of the size, e.g. the writes may >be 1 byte or 300GB), e.g. that the data (or better "record") being >written appears in one piece ? Is it a problem if each process gets their own pip

Re: [osol-code] How big is "int" on 64-bit Solaris?

2008-11-12 Thread Casper . Dik
>When compiling the Solaris AVL and zfs DMU modules on Windows I get many >warnings where a uintptr_t is cast to an int, and vice versa. The actual >cases seem benign (e.g. AVL is doing unitptr_t & 1 -> int, which is OK) but >I'm worried there might be some real issues >Just for my sanity, is "i

Re: [osol-code] ncrs driver 64 bit

2008-11-05 Thread Casper . Dik
>> Please do not bother - use the glm(7D) driver instead. > >I thought glm only worked with Sun branded controllers. >I was never able to make glm recognize a Tekram controller >with the 53c896 chip that I own. >It would be nice to be able to use that controller again. And you didn't use the (o

Re: [osol-code] Studio 12 || snv98 bug ?

2008-10-30 Thread Casper . Dik
>Yepp - seems that clamav-milter needs a fork anyway ;-) >However I didn't know, that a "simple" malloc could result into a SEGV - >assumed, that the OS core takes care of managing memory and prevents >apps from accessing/destroying its tables ... There's no protection between "libc memory" and

Re: [osol-code] -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ causes B_TRUE and B_FALSE to disappear

2008-10-28 Thread Casper . Dik
>It seems bogus, but if I recall correctly, the standards conformance >gurus say that we're not allowed to walk into the user's name space in >this way: those symbols are defined by the standards, so they must not >exist. If you don't like that, then don't compile in a standards- >conformant env

Re: [osol-code] Question about file system direct entry

2008-10-27 Thread Casper . Dik
>kevin writes: >> In /usr/include/sys/dirent.h I see this: >> >> /* >> * File-system independent directory entry. >> */ >> typedef struct dirent { >> ino_t d_ino; /* "inode number" of entry */ >> off_t d_off; /* offset of d

Re: [osol-code] [osol-discuss] Port from linux. ioctl with FIBMAP to OpenSolaris OS, please help.

2008-10-24 Thread Casper . Dik
>I am trying to port a linux app to OpenSolaris OS. There is a API used in >linux codes that I don’t know how to port to OpenSolaris: >ioctl(fileFD, FIBMAP, &FsBlock) >Any one pleases help, tell me how to do this, find out a FileSystemBlock of the offset in a file, in OpenSolaris. You can't.

Re: [osol-code] ddi compliant interface to get u_comm and u_psargs

2008-10-15 Thread Casper . Dik
>Right now, I have a driver (the audio subsystem I'm working on) which >will ultimately want to be integrated into Nevada. But it wants to >access some fields in the uarea of the process that opened the driver >initially -- specifically the command and arguments. > >My code currently does this

Re: [osol-code] AF_{LOCAL, FILE} in OpenSolaris vs. open-source-app bugs

2008-10-10 Thread Casper . Dik
I'm surprised that "sun" is still defined; clearly that is true ONLY when you run in K&R mode? Casper ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Re: [osol-code] T-state support ???

2008-10-08 Thread Casper . Dik
>Hi Casper, > >On Mon, Oct 6, 2008 at 10:28 PM, <[EMAIL PROTECTED]> wrote: >> >> The system should not produce scaring messages when there is no action to >> be taken. >> >> (I see the same message on an old P3; we don't support any form of >> speedstep on that) >> > >These log messages are helpf

Re: [osol-code] T-state support ???

2008-10-06 Thread Casper . Dik
>On Mon, Oct 06, 2008 at 09:35:19AM +0200, [EMAIL PROTECTED] wrote: >> >> >T-state is Processor Clock Throttling state. It is designated to throttle >> >the >> >processor clock in a few specific situations, like the CPU temperature >> >exceeds a threshold value. >> > >> >T-state is defined in AC

Re: [osol-code] T-state support ???

2008-10-06 Thread Casper . Dik
>T-state is Processor Clock Throttling state. It is designated to throttle the >processor clock in a few specific situations, like the CPU temperature >exceeds a threshold value. > >T-state is defined in ACPI spec and need BIOS implementation to get >supported. The warning message means T-state i

Re: [osol-code] compiler instruction likely

2008-09-24 Thread Casper . Dik
>Hi all, > >I am currently porting a driver from Linux to Solaris. The driver code >makes use of the likely macro that is defined on Linux to tell the >compiler that the code inside the likely call is the most likely code >path to optimize it. > >Does someone know if it is available on Solaris

Re: [osol-code] fopen usage

2008-09-11 Thread Casper . Dik
>Hi > >Thanx for the quick answer.. > >> The fix is using the new "F" mode character which tells fopen that it is >> fine to open files with a file descriptor > 255. >> >> The actual fix is: >> >>- add support for "F" etc in fopen() >>- add "F" when it is needed (basically everythi

Re: [osol-code] fopen usage

2008-09-11 Thread Casper . Dik
>Hi > >I have found these two bug reports regarding the fopen usage which both >have the status fix-delivered. > >http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6221296 >http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6234782 > > >however when I browse the source code using

Re: [osol-code] Code cleanup: redundant include directives

2008-02-20 Thread Casper . Dik
>Related to that, I've found a few header files where you must include >a before including b -- essentially 'b' requires definitions in 'a', >but itself does not include 'a'. I'd have to go back to find which >ones specifically (I found them doing some porting of a network >driver). Should such

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Casper . Dik
>> Currently Solaris has two distinct versions of ps; to use one or the other >> you need to either give the full path or change $PATH. >> >> And that while a little bit of code could tell most invocations apart. >> >> Because it has been bothering me I'd like to fix this and so I'd like to >> ask

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Casper . Dik
>On Fri, Feb 15, 2008 at 7:30 PM, <[EMAIL PROTECTED]> wrote: >> >> But if you type /usr/ucb/ps or /usr/bin/ps, what do you expect? >> >> Or PATH=/usr/ucb:$PATH ps >> vs >>PATH=/usr/bin:$PATH ps > >If arguments start with a -, be /usr/bin/ps; otherwise be >/usr/ucb/ps, in all cases.

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Casper . Dik
>On Fri, Feb 15, 2008 at 6:58 PM, Kyle McDonald <[EMAIL PROTECTED]> wrote: > >> > >> I'm not sure, but I read this as: >> >> if argv[0]="/usr/ucb/ps" then interpret the args the ucb way even if >> there is a -. >> >> That doesn't sound bad to me. If people put that in their path that's >> pr

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Casper . Dik
> >> From [EMAIL PROTECTED] Fri Feb 15 11:05:28 2008 >> > >> >The other question would be - which output do you get with no >> >arguments at all? >> >> The same as currently, depending on $PATH. I'm not sure what other >> compatible options there are. > >Are you parsing $PATH when argv[0]=="ps"

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Casper . Dik
>I'm not sure, but I read this as: > >if argv[0]="/usr/ucb/ps" then interpret the args the ucb way even if >there is a -. Correct. >That doesn't sound bad to me. If people put that in their path that's >probably what they expect. That was my thinking too. Casper ___

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Casper . Dik
>On Fri, Feb 15, 2008 at 1:55 PM, <[EMAIL PROTECTED]> wrote: >> >> >> Currently Solaris has two distinct versions of ps; to use one or the other >> you need to either give the full path or change $PATH. >> >> And that while a little bit of code could tell most invocations apart. >> >> Because

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Casper . Dik
> ENVIRONMENT VARIABLES > The following environment variables could affect ps: > > COLUMNS Override default display width > LINESOverride default display height > PS_PERSONALITY Set to one of posix,old,linux,bsd,sun,digital > CMD_

[osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Casper . Dik
Currently Solaris has two distinct versions of ps; to use one or the other you need to either give the full path or change $PATH. And that while a little bit of code could tell most invocations apart. Because it has been bothering me I'd like to fix this and so I'd like to ask some advice. Mer

Re: [osol-code] kernel (TCP) debugging

2008-02-08 Thread Casper . Dik
>How would you do this on OpenSolaris (x86/Sparc) ? >With a second machine ? You don't need a second machine Just boot with the kernel debugger enabled (w/ the -k option) or run "mdb -K" from the commandline console. Casper ___ opensolaris-code mail

Re: [osol-code] /dev/null

2008-02-05 Thread Casper . Dik
>It's failing in the checking of the security policy, specifically: > >boolean_t >priv_isfullset(const priv_set_t *set) >{ >PRIV_TEST_BODY(set->pbits[i] == ~(priv_chunk_t)0); >} > >Evidently I'm missing something from my hand assembled system that defines the >policies. Any clues as to w

Re: [osol-code] syscall numbers

2008-01-19 Thread Casper . Dik
>Actually, as I look around more, I see that some other systems >(*BSD, Linux, QNX) have one or both of lchmod(), flink(). One >argument used for both even if they otherwise seem silly is avoidance >of race conditions, although I've seen counter-arguments for flink(), >but I didn't quite understa

  1   2   3   4   >