Re: any arch not pack uint32_t x[2]?

2012-12-07 Thread Andrey Simonenko
On Thu, Dec 06, 2012 at 04:58:40PM -0500, Rick Macklem wrote: > Hi, > > The subject line pretty well says it. I am about ready > to commit the NFSv4.1 client patches, but I had better > ask this dump question first. > > Is there any architecture where: > uint32_t x[2]; > isn't packed? (Or, size

Re: XDR Library and Short Enums

2012-04-24 Thread Andrey Simonenko
On Mon, Apr 16, 2012 at 02:28:50PM +0200, Sebastian Huber wrote: > Hi, > > the XDR library implementation of xdr_enum() is currently: > > /* > * XDR enumerations > */ > bool_t > xdr_enum(XDR *xdrs, enum_t *ep) > { > enum sizecheck { SIZEVAL }; /* used to find the size of an enum */

Re: memmem small optimalisation

2012-02-15 Thread Andrey Simonenko
On Tue, Feb 14, 2012 at 07:25:14PM +0100, Bernard van Gastel wrote: > Hi all, > > I was looking through the sources of memmove at [1], and saw a (very) > small optimization opportunity. The 'memcmp' also compares the current > character, but the current character is already checked (first part of

Re: Questions about mutex implementation in kern/kern_mutex.c

2010-09-17 Thread Andrey Simonenko
On Thu, Sep 16, 2010 at 02:16:05PM -0400, John Baldwin wrote: > On Thursday, September 16, 2010 1:33:07 pm Andrey Simonenko wrote: > > > "Current" value means that the value of a variable read by one thread > > is equal to the value of this variable successfully upda

Re: Questions about mutex implementation in kern/kern_mutex.c

2010-09-16 Thread Andrey Simonenko
On Wed, Sep 15, 2010 at 08:46:00AM -0700, Matthew Fleming wrote: > I'll take a stab at answering these... > > On Wed, Sep 15, 2010 at 6:44 AM, Andrey Simonenko > wrote: > > Hello, > > > > I have questions about mutex implementation in kern/kern_mutex.c > >

Questions about mutex implementation in kern/kern_mutex.c

2010-09-15 Thread Andrey Simonenko
Hello, I have questions about mutex implementation in kern/kern_mutex.c and sys/mutex.h files (current versions of these files): 1. Is the following statement correct for a volatile pointer or integer variable: if a volatile variable is updated by the compare-and-set instruction (e.g. atomi

Re: Recursion in the UVA

2010-05-11 Thread Andrey Simonenko
On Mon, May 10, 2010 at 11:42:26AM -0700, Evan Geller wrote: > I'm a bit confused how recursion in the UVA works. vm_map_entries are > allocated from a vm_map_entry zone, but if the vm_map_entry slabs are > full and it needs to allocate a vm_map_entry to satisfy the mapping, > there would seem to b

Re: kernel malloc() and free()

2010-03-02 Thread Andrey Simonenko
On Mon, Mar 01, 2010 at 09:24:40PM -0600, Dan Nelson wrote: > Hm. Even after some reading, I'm not sure how the slabs keep track of which > elements are allocated or free. I expected to find a bitmap somewhere that > malloc() sets and free() clears, but I don't see it. Maybe some kernel > hacke

Re: Does getc(3) use the read(2) syscall?

2010-02-03 Thread Andrey Simonenko
Hello, On Wed, Feb 03, 2010 at 12:26:02PM +0100, Stefan Midjich wrote: > I'm having trouble looking this function up in the source tree, the trail > seems to end at __sys_read which has a bunch of prototypes but i can't find > the actual function code. > > So my question is primarily, does getc u

Re: FreeBSD 7.2 + NFS + nullfs + unlink + fstat = Stale NFS File Handle

2009-10-28 Thread Andrey Simonenko
On Tue, Oct 27, 2009 at 01:13:18PM -0400, Linda Messerschmidt wrote: > > Does anyone know what the likely source of this different behavior is, > and whether it is feasible to address? Or is NFS+NULLFS just pushing > the envelope a little too far? As I understand when a file is opened in NULLFS

Re: vm_map_protect / pmap_protect Can't lower protection

2009-07-28 Thread Andrey Simonenko
Hello Andrew, On Mon, Jul 20, 2009 at 04:14:02PM +0100, Andrew Brampton wrote: > However, memguard_unguard doesn't work correctly. It first calls > vm_map_protect with a read-write flag. > vm_map_protect correctly updates the vm_map_entry, and then calls > pmap_protect to set the actual pte. > pm

NFS exports atomic and on-the-fly atomic updates

2009-06-02 Thread Andrey Simonenko
Hello, Here I want to describe changes that allow to make atomic updates of NFS exports lists, dynamic on-the-fly atomic updates of NFS exports lists and improve security of NFS exports. Solved tasks: - 1. NFS export specifications (spec -- for short) updates are atomic. NFS serv

Re: [fbsd] Re: Atomic updates of NFS export lists

2006-06-13 Thread Andrey Simonenko
On Mon, Jun 12, 2006 at 06:24:24PM +0200, Jeremie Le Hen wrote: > > I've been annoyed in the past because I couldn't export two directories > from the same filesystem with different credentials [1]. > First, where does this limitation come from ? Then, is it possible to > remove this limitation w

Re: Question about synchronization (nfssvc, vfs_busy)

2006-06-06 Thread Andrey Simonenko
On Mon, Jun 05, 2006 at 08:30:45PM +0300, Konstantin Belousov wrote: > On Mon, Jun 05, 2006 at 02:01:36PM +0300, Andrey Simonenko wrote: > > 2. > > > > If vfs_busy() is called without LK_NOWAIT flag, then it can sleep > > if a filesystem is being unmounted. At som

Question about synchronization (nfssvc, vfs_busy)

2006-06-05 Thread Andrey Simonenko
Greetings, Can somebody comment following questions? I want to know where I'm wrong (I checked CURRENT). 1. If the nfsserver is a KLD, then it can be unloaded. There is the nfssvc(2) which is implemented in nfsserver and it is called without Giant. Suppose nfsrv_numnfsd is equal to 0 and some

Re: Atomic updates of NFS export lists

2006-05-16 Thread Andrey Simonenko
Hello again, I found another one security bug in mountd (from RELENG_6). Details are described in the CHANGES file. Updated version is available here: http://comsys.ntu-kpi.kiev.ua/~simon/mountd/ SHA256 (mountd-20060515.tar.bz2) = 46e824a168886e5c9ef4df32d8db3ab30efd050c89afa1ea5a37a31cbf7565a

Re: Atomic updates of NFS export lists

2006-05-11 Thread Andrey Simonenko
On Wed, May 10, 2006 at 04:36:24PM -0600, Scott Long wrote: > >In my environment non-atomic updates of NFS export lists are not > >acceptable. So, I decided to correct this problem. As the result > >mountd, kern/vfs_export.c were completely rewritten, mount.h, > >vfs_mount.c and nfs_srvsubs.c al

Re: Atomic updates of NFS export lists

2006-04-25 Thread Andrey Simonenko
On Mon, Apr 24, 2006 at 01:56:31PM +0200, Ulrich Spoerlein wrote: > Andrey Simonenko wrote: > > [Lots of good stuff] > > Now mountd does not work if there is some error in exports file. > > I think this is correct behaviour and I'm ready to explain this. > >

Atomic updates of NFS export lists

2006-04-21 Thread Andrey Simonenko
Greetings, In my environment non-atomic updates of NFS export lists are not acceptable. So, I decided to correct this problem. As the result mountd, kern/vfs_export.c were completely rewritten, mount.h, vfs_mount.c and nfs_srvsubs.c also got changes. For details see kern/9619. I changed struct

Re: Accessing address space of a process through kld!!

2006-03-06 Thread Andrey Simonenko
On Fri, Mar 03, 2006 at 09:26:35PM +0530, Tanmay wrote: > On Tue, Feb 28, 2006 at 01:33:47PM -0500, > John Baldwin wrote: > >you can use the proc_rwmem() function (it takes a uio >and a struct proc) > >to do the actual I/O portion. You can see example use in >the ptrace() > >syscall. > > Thanks.T

Re: sched_newthread question

2006-03-06 Thread Andrey Simonenko
On Sat, Mar 04, 2006 at 06:11:24PM +0100, Divacky Roman wrote: > hi, > > sched_newthread(struct thread *td) > { >struct td_sched *ke; > > ke = (struct td_sched *) (td + 1); > bzero(ke, sizeof(*ke)); > td->td_sched = ke; > ke->ke_thread = td; > ke->k

Re: Accessing address space of a process through kld!!

2006-03-02 Thread Andrey Simonenko
On Wed, Mar 01, 2006 at 10:54:49AM -0500, John Baldwin wrote: > > I have two questions about this function: > > > > 1. vm_fault() does not guarantee, that (possibly) faulted in page > > will be in the object or in one of backing objects when > > vm_fault() returns, because a page can bec

Re: Accessing address space of a process through kld!!

2006-03-01 Thread Andrey Simonenko
On Tue, Feb 28, 2006 at 01:33:47PM -0500, John Baldwin wrote: > On Monday 27 February 2006 13:31, John-Mark Gurney wrote: > > Tanmay wrote this message on Mon, Feb 27, 2006 at 13:56 +0530: > > > How do I access the address space ie text,data and stack of a (user > > > level)process whose pid I know

Re: mmap() sendfile()

2005-12-12 Thread Andrey Simonenko
On Mon, Dec 12, 2005 at 09:39:30AM +0100, Cedric Tabary wrote: > > This is some sort of file cache, it works by mmap()ing some files and > keeping the mmap address in a hashtable. I suppose this is used to keep > the file in memory until munmap() is called. I guess this is used for accessing file

Re: Page fault in kernel mode from LKM

2005-12-01 Thread Andrey Simonenko
On Wed, Nov 30, 2005 at 10:44:47PM -0800, Daniel Rudy wrote: > > > http://pastebin.com/444571 > > I'm not sure WHY it keeps panicing the system. This is code that is > part of a klm that I'm writing. Any ideas? > It would be better to insert code of your KLD in your letter. I think your KLD

Re: a puzzle about FreeBSD

2005-11-23 Thread Andrey Simonenko
On Sat, Nov 19, 2005 at 09:51:58PM +0800, ?? wrote: > > I read the source code of a project. I don??t understand SYSCTL_IN macro and > SYSCTL_PROC macro. I want to know when my function registered in SYSCTL_PROC > is called. This sysctl handler is called, for example, from __sysctl -> userlan

Re: locking in a device driver

2005-11-03 Thread Andrey Simonenko
On Thu, Nov 03, 2005 at 04:55:10AM +0800, Dinesh Nair wrote: > > On 11/03/05 04:27 M. Warner Losh said the following: > >that this is the case: sleep in an ioctl, and the entire process hangs > >until the ioctl returns. > > which is probably what's happening in my case. i've got 4 threads spun of

Re: Filesystem access from a KLD causes "vrele: negative ref cnt" panic

2005-09-26 Thread Andrey Simonenko
On Sat, Sep 24, 2005 at 05:06:47PM +0200, Sebastien wrote: > > > Should not rootvnode get reference, when fd_rdir or fd_cdir > > begins to point to it? Try to VREF() it. > > No change. > It is hard to say something not seeing and understanding the complete source code. But since fdinit() whi

Re: Filesystem access from a KLD causes "vrele: negative ref cnt" panic

2005-09-21 Thread Andrey Simonenko
On Tue, Sep 20, 2005 at 07:49:53PM +0200, Sebastien wrote: > > I have a random panic "vrele: negative ref cnt" when I shutdown the system. > Am > I double-freeing something in my code ? The fact that the panic is caused > randomly suggests there is a synchronization problem - but the above code

Re: clock software interrupt

2005-09-13 Thread Andrey Simonenko
On Sat, Sep 10, 2005 at 09:34:48PM +0200, Zlatan Ibrahimovic wrote: > Hi folks, > I've seen clock software interrupt thread (referring to clk_ithd in > kern/kern_intr.c); watching to manpages I read that priority is used > as vector for that thread. My question is how can I call this software > han

Re: clock software interrupt

2005-09-12 Thread Andrey Simonenko
On Sat, Sep 10, 2005 at 09:34:48PM +0200, Zlatan Ibrahimovic wrote: > Hi folks, > I've seen clock software interrupt thread (referring to clk_ithd in > kern/kern_intr.c); watching to manpages I read that priority is used > as vector for that thread. My question is how can I call this software > han

Re: fok() execve() -> No child processes

2005-09-09 Thread Andrey Simonenko
On Thu, Sep 08, 2005 at 12:40:20PM -0700, erkan kolemen wrote: > Following code fails. I debugged it and saw that: it > produces "No child processes" error while wait(). > > is it possible, parent still is not start to wait but > child finished. After that CPU schedules parents. It > try to start

Re: corefiles

2005-07-12 Thread Andrey Simonenko
On Tue, Jul 12, 2005 at 07:07:24AM +0200, [EMAIL PROTECTED] wrote: > > When I try to catch SIGTERM and generate a core file the call > stack is corrupted on FreeBSD. A process stack is not corrupted. Since a process was terminated while it was is a signal handler, it is wrong to interpreter the

Re: Accessing filesystem from a KLD

2005-06-29 Thread Andrey Simonenko
On Wed, Jun 29, 2005 at 11:55:50AM +0200, Seb wrote: > > Why not to use VOP_READ? See how it is called in dev/md.c:mdstart_vnode, > > check kern/vfs_vnops.c:vn_open_cred for information how to lookup a file > > name and open it. > > That's what I do, however I use the wrapper functions vn_open(),

Question about synchronization in socow_setup()

2005-06-23 Thread Andrey Simonenko
Hello, Can somebody explain how socow_setup() synchronizes access to the page it wants to COW: 99 s = splvm(); 100 /* 101 * verify page is mapped & not already wired for i/o 102 */ 103 socow_stats.attempted++; 104 p

Re: FreeBSD Memory Management questions ?

2005-06-21 Thread Andrey Simonenko
On Mon, Jun 20, 2005 at 03:38:43PM -0400, Aziz Kezzou wrote: > On 6/20/05, John Baldwin <[EMAIL PROTECTED]> wrote: [skipped] > > > > Are you modifying kernel memory from userland or are you trying to access > > user > > memory from kernel code? > > > > I want to be able to modify BOTH user a

Re: 0xdeadc0de

2005-06-17 Thread Andrey Simonenko
On Thu, Jun 16, 2005 at 11:15:49PM +0300, Alex Lyashkov wrote: > > With kernel from RELENG_5_4 (and RELENG_5) compiled with INVARIANTS > i have - > gw# sysctl -a | grep debug\.kdb\.available | hexdump -C > 64 65 62 75 67 2e 6b 64 62 2e 61 76 61 69 6c 61 > |debug.kdb.availa| > 0010

Re: FreeBSD Memory Management questions ?

2005-06-14 Thread Andrey Simonenko
On Tue, Jun 14, 2005 at 04:21:41AM -0400, Aziz Kezzou wrote: > > 1 - Right now to access the memory address space of a user process > from kernel mode, I only have to set, on x86 systems, the register CR3 > to the right value. How can I do that on other architectures ? is > there an architecture-

Re: subtracting days from localtime problem

2005-03-31 Thread Andrey Simonenko
On Thu, Mar 31, 2005 at 08:53:12PM +0900, Ganbold wrote: > I have problem subtracting days from current date using test program. > We have daylight saving occured on 2AM of March 26, 2005. > As you can see below, there is missing March 26th line from program output. > And all lines after 27th Marc

Comments about vm_fault, vm_map_lookup and user-wired memory, part 2

2005-03-31 Thread Andrey Simonenko
Greetings, Second question. Consider following code (listing is given at the end of this letter): mmap() anonymous private read-only memory, fork() and mlock() this memory only in one process. Here we have: COW, NEEDS_COPY, read-only memory in both processes, but in one process it is USER_WIRED.

Comments about vm_fault, vm_map_lookup and user-wired memory, part 1

2005-03-31 Thread Andrey Simonenko
Greetings, I have two questions or comments about of user-wired memory (system 5.3). First question. If memory is user-wired, read-only and COW, then it is impossible to change protection for this memory: 1. mprotect() calls vm_map_protect(), which change entry->protection to writeable. 2.

Re: some bugs in the kernel

2005-03-16 Thread Andrey Simonenko
On Mon, Mar 14, 2005 at 01:25:21PM -0800, Ted Unangst wrote: > > NULL pointer dereference > File: usr/home/tedu/src/sys/pci/if_ti.c > Function: ti_setmulti > malloc return at 1628 is not checked against NULL. Similar errors (lines numbers from 5.3-RELEASE): i386/i386/bios.c 516 devnodebu

Re: sched_ule, runqueues, priority, and O(1) sheduling question

2005-03-05 Thread Andrey Simonenko
On Fri, Mar 04, 2005 at 09:45:56PM +0530, Andriy Tkachuk wrote: > Hi folks. > > I wander how O(1) sheduling works in ULE. > In ule.pdf Jeff wrote: > > Threads are picked from the current queue in > priority order until the current queue is empty. > > As far as I understand the algorithm is O(n)

Re: Kernel monitor, the return

2005-02-23 Thread Andrey Simonenko
On Tue, Feb 22, 2005 at 03:34:41PM -0500, John Baldwin wrote: > > You don't need sched_lock to check PS_INMEM, proc lock is sufficient > (PS_INMEM is magic this way). I suggested the author of the original letter to get lock on sched_lock, because statclock() modifies ru_idrss and ru_isrss values

Re: Memory Accounting in Proc.h

2005-02-18 Thread Andrey Simonenko
On Fri, Feb 18, 2005 at 01:30:41AM -0800, Ashwin Chandra wrote: > I read up on getrusage which says that ru_idrss and ru_isrss are measured > in kilobytes * the number of clock ticks. So I wanted to retrieve the > actual value in just KB by using a timeval struct that gets the user > and system ti

Re: Kernel monitor, the return

2005-02-15 Thread Andrey Simonenko
On Mon, Feb 14, 2005 at 10:24:50PM -0800, Ashwin Chandra wrote: > In trying to create a simple kernel thread that prints out all > the processes data and stack size, i still get a panic fault > (vm_fault on no entry) at the printf statement...ive narrowed > it down to the ru_idrss variable that is

Re: Kernel Monitor?

2005-02-14 Thread Andrey Simonenko
On Mon, Feb 14, 2005 at 12:28:47AM -0800, Ashwin Chandra wrote: > FOREACH_PROC_IN_SYSTEM(p) { > mtx_lock(&Giant); > PROC_LOCK(p); > printf("%d %d\n", (int)p->p_stats->p_ru.ru_isrss, > (int)p->p_stats->p_ru.ru_idrss); > PROC_UNLOCK(p); > mtx_unlock(&Giant); > } Addition to

Re: Kernel Monitor?

2005-02-14 Thread Andrey Simonenko
> FOREACH_PROC_IN_SYSTEM(p) { > mtx_lock(&Giant); > PROC_LOCK(p); > printf("%d %d\n", (int)p->p_stats->p_ru.ru_isrss, > (int)p->p_stats->p_ru.ru_idrss); > PROC_UNLOCK(p); > mtx_unlock(&Giant); > } This code is incorrect, because you should get sx_slock(&allproc_lock) befor

Re: operation sequence of ioctl's

2005-01-24 Thread Andrey Simonenko
On Sun, Jan 23, 2005 at 01:26:50PM +0100, "Anton W?llert" wrote: > > my question is how a ioctl is called when i use int ioctl(fd ) from > userland. i think first, a trap is generated through the handler in > exeption.S, that calls the routine for system-calls, and that calls via the > syscall

Re: FreeBSD system call implementation

2004-12-15 Thread Andrey Simonenko
On Wed, Dec 15, 2004 at 08:19:05PM +0530, Ravi Krishna wrote: > My question is why we store the p->p_sysent->sv_table > for each process. What is the reason for keeping this per process? > Are there some situations where two processes can have different system calls > available? Processes can hav

Re: Tracing Disk Access

2004-11-23 Thread Andrey Simonenko
On Mon, Nov 22, 2004 at 06:33:18PM -0500, Brian Fundakowski Feldman wrote: > On Mon, Nov 22, 2004 at 04:22:54PM +0100, Hanspeter Roth wrote: > > > > Hello, > > > > I have set an idle timeout for the hard-disk. But when there is no > > user activity there are frequent disk accesses. > > How can on

Re: syscall: td_retval and zero return value

2004-11-11 Thread Andrey Simonenko
On Wed, Nov 10, 2004 at 03:05:45PM +0200, Andriy Gapon wrote: > > I have very little assembler/x86 knowledge. > Could anyone please help me understand what it means to assign a > non-zero value to td_retval in a system call when return value of the > call is zero/success? If a syscall returns som

Re: Where is the source to the system calls?

2004-11-08 Thread Andrey Simonenko
On Mon, Nov 08, 2004 at 10:57:07AM -0800, Dan Strick wrote: > > Perhaps I did not make it clear that I was looking for the definitions > of the subroutines in libc that converted C-language function calls, > such as open(), into assembler language system calls. For example, in > version 7 pdp11 u

Re: Where is the source to the system calls?

2004-11-08 Thread Andrey Simonenko
On Sun, Nov 07, 2004 at 04:29:42PM -0800, Dan Strick wrote: > Does anyone know where the system calls are really defined? As others said, syscalls are implemented in /sys. > I followed open() to _open() to __sys_open() which seems > to be part of something called libc_r before I ran into a > blan

Re: Where to start for someone new to kernel coding

2004-10-07 Thread Andrey Simonenko
On Wed, Oct 06, 2004 at 09:33:50PM +0200, John Oxley wrote: > > I want to extend the disk quota system: > - Implement a user space daemon to control it. > - Pass control from the kernel to the user space daemon. [skipped] > Is this at all possible, and if so, where should I start looking for > c

Re: Copy data from kernel to user space memory

2004-09-23 Thread Andrey Simonenko
On Thu, Sep 23, 2004 at 11:38:28AM +0200, Niels Heinen wrote: > The module buffers packets and currently copies it into user memory > when its system call interface is used. At the moment my user space > application is the one that allocates the memory. I want the memory > to be allocated by th

Re: struct sysentvec field

2004-09-16 Thread Andrey Simonenko
On Wed, 15 Sep 2004 16:06:39 +0200 in lucky.freebsd.hackers, [EMAIL PROTECTED] wrote: > I've seen void (*sv_prepsyscall)(struct trapframe *, int *, u_int *, caddr_t > *); field in struct sysentvec defined in sys/sysent.h; I've seen it's call > be the current process in syscall interrupt 0x80 hand

Re: header file related question

2004-09-10 Thread Andrey Simonenko
On Thu, 9 Sep 2004 20:38:23 -0400 (EDT) in lucky.freebsd.hackers, vxp wrote: > > so, i copied all the #include's from /sys/netinet/ip_icmp.c and only have > the icmp_input() function (unmodified right now, from the form i found > it), the header files from the original ip_icmp, and a main() that >

Re: Article on Sun's DTrace

2004-07-13 Thread Andrey Simonenko
On Mon, Jul 12, 2004 at 07:09:33PM +0100, Steven Smith wrote: > > On their DTrace support forum there is the article about the problem > > with different byte patterns of "movl %esp, %ebp" produced by > > different assemblers. > Do you have an URL for that? I can't seem to find it. http://forum.s

Re: Article on Sun's DTrace

2004-07-12 Thread Andrey Simonenko
On Sat, 10 Jul 2004 20:45:14 +0100 in lucky.freebsd.hackers, Steven Smith wrote: > >> > It's also possible to put probes on the return instruction of the >> > function. I'm not sure how they're actually finding that, though. >> I think the return probe is done by adding a call probe that changes

Re: Changing v_op for vnode on the fly

2004-02-23 Thread Andrey Simonenko
On Mon, Feb 16, 2004 at 01:48:19PM -0500, Brian F. Feldman wrote: > > Having read documentation and analyzed sources, I think that MAC can't > > help. MAC allows to synchronize access in read() and write() syscalls, > > but access to VOP_GETPAGES, which is called in vm_fault() for example, > > can

Re: locking against myself

2004-02-19 Thread Andrey Simonenko
On Wed, Feb 18, 2004 at 11:52:26AM -0800, Jerry Toung wrote: > Hello hackers, > I am constantly getting the following message when I run my KLD: > > panic: lockmgr: locking against myself > Debugger("panic") > Stopped atDebugger+0x54: xchgl %ebx,in_Debugger.0 > db> >

Re: Changing v_op for vnode on the fly

2004-02-16 Thread Andrey Simonenko
On Fri, Feb 13, 2004 at 09:49:53PM -0500, Brian F. Feldman wrote: > Andrey Simonenko <[EMAIL PROTECTED]> wrote: > > > > Is it enough to get exclusive lock on vnode, before changing > > v_op pointer? Here is my code: > > > > vn_lock(cvp->vp, LK_EXCLU

Changing v_op for vnode on the fly

2004-02-13 Thread Andrey Simonenko
Hello all, I want to control in a KLD module when any process make any VOPs, which can change the content of some file. For this I change v_op field in the needed vnode to my vnodeop_p, currently my VOPs print some debug information and call original VOPs for the vnode. I can't simply wrap sysca

Re: printf....!

2003-02-10 Thread Andrey Simonenko
On Sat, 8 Feb 2003 22:13:32 + (UTC) in lucky.freebsd.hackers, Auge Mike wrote: > Hi all, > > I was trying to know how "printf" works in FreeBSD... I hvae reached to this > point : > > #define _write(fd, s, n) \ >__syscall(SYS_write, (int)(fd), (const void *)(s), (size_t)(n)) > > I'a

Re: Help with understanding process state, context switching and

2003-02-07 Thread Andrey Simonenko
On Thu, Feb 06, 2003 at 10:50:28AM -0800, Julian Elischer wrote: > > The only way it makes sense to talk about suspending > a process in user space from the kernel, would be in a MP system. in a > UP system, if you are in the kernel, then there is no process in user > space. (it trapped into the k

Help with understanding process state, context switching and signals

2003-02-06 Thread Andrey Simonenko
Hello. After spending some time in reading different mailing lists archives, analyzing FreeBSD 4.x sys/kern and sys/i386 sources and reading 4.4BSD book I still can't find an answer, so, I ask my question here. In short: I need to stop (suspend) some process from the kernel, when that process is

Permissions on /root directory and /etc/mtree/BSD.root.dist

2001-09-06 Thread Andrey Simonenko
Hi All, I have one idea about permissions on /root directory and permissions on /root directory specified in the /etc/mtree/BSD.root.dist file. After finishing FreeBSD installating process permissions on /root directory are equal to 0755. Some administrators don't like these permissions for home

Re: libpcap and pthreads

2001-07-23 Thread Andrey Simonenko
:47:35AM +1200, Joerg Micheel wrote: > > Privjet Andrey, > > > > On Wed, Jul 18, 2001 at 04:27:39PM +0400, Andrey Simonenko wrote: > > > Is it possible to use libpcap with pthreads? > > > (I want to use just pcap_dispatch() function) > > > > I very much

Re: Status of dialog(1) and libdialog.

2001-07-18 Thread Andrey Simonenko
- Original Message - From: Kris Kennaway <[EMAIL PROTECTED]> Newsgroups: lucky.freebsd.hackers Sent: Friday, July 06, 2001 1:00 PM Subject: Re: Status of dialog(1) and libdialog. > > Just to throw some more fuel onto the fire, Thomas Dickey maintains > his own version of dialog, which

libpcap and pthreads

2001-07-18 Thread Andrey Simonenko
Hi all, Is it possible to use libpcap with pthreads? (I want to use just pcap_dispatch() function) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: Status of dialog(1) and libdialog.

2001-07-06 Thread Andrey Simonenko
- Original Message - From: Eric Melville <[EMAIL PROTECTED]> Newsgroups: lucky.freebsd.hackers Sent: Friday, July 06, 2001 1:34 AM Subject: Re: Status of dialog(1) and libdialog. > I'm currently working on libdialog, hopefully making the interface a bit > more sensible. I'd like to see

Re: Status of dialog(1) and libdialog.

2001-07-05 Thread Andrey Simonenko
- Original Message - From: Jordan Hubbard <[EMAIL PROTECTED]> Newsgroups: lucky.freebsd.hackers Sent: Wednesday, July 04, 2001 11:05 PM Subject: Re: Status of dialog(1) and libdialog. > I suppose that depends on how you define "future." Do we want to > be using libdialog in the year 2

Status of dialog(1) and libdialog.

2001-07-04 Thread Andrey Simonenko
Hi All, I'm working on some patches for dialog(1) and libdialog. Does FreeBSD team want to continue use of dialog(1) program and libdialog in future? I ask this question because I fix some problems I have with dialog(1) (really with libdialog) and I'm going to try to fix the same problems with al

Re: Problem with the time zone in version 4.3

2001-05-29 Thread Andrey Simonenko
I think that http://www.freebsd.org/cgi/query-pr.cgi?pr=23323 will be interesting for you. - Original Message - From: Gil Rudge <[EMAIL PROTECTED]> Newsgroups: lucky.freebsd.hackers Sent: Tuesday, May 29, 2001 6:09 PM Subject: Problem with the time zone in version 4.3 > I encountered a

Re: Is it possible to use some BPF filters in one process, in some

2001-04-04 Thread Andrey Simonenko
From: Mike Wade <[EMAIL PROTECTED]> Newsgroups: lucky.freebsd.hackers Sent: 4 april 2001. 16:57 Subject: Re: Is it possible to use some BPF filters in one process, in some > On Wed, 4 Apr 2001, Andrey Simonenko wrote: > > > So, here is my question. Is it possible to use some pcap

Is it possible to use some BPF filters in one process, in some threads?

2001-04-04 Thread Andrey Simonenko
Hi I want to add BPF support to IPA (/usr/ports/sysutils/ipa). But I want to use one process for some BPF filters. I'm going to use pcap(3) library, because it understands human filter requests in pcap_compile(3). So, here is my question. Is it possible to use some pcap_dispatch(3) functions in

question about BPF programming

2001-03-22 Thread Andrey Simonenko
Hi I read bpf(4) man page and have one question about BPF. Suppose I open one of free BPF devices /dev/bpf??. I can dup(2) descriptor of opened BPF device and get so called shared interface. Can I setup different filters on each descriptor for opened BPF device? If I can do it, how can I do the

Re: Staticaly allocated buffers in library. Is it correct?

2001-02-20 Thread Andrey Simonenko
Let's look at implementation of getaddrinfo(3) function (there are some functions more which do the same way). We can find source for this function in /usr/src/lib/libc/net/getaddrinfo.c file. This functions in some case reads /etc/hosts file and try to find out there host name. getaddrinfo(3) ca

Re: Staticaly allocated buffers in library. Is it correct?

2001-02-19 Thread Andrey Simonenko
So, if I send problem report with my patches, I should inherit usage of staticaly allocated buffers. Am I right? milunovic <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > -BEGIN PGP SIGNED MESSAGE- > > On Fri, 16 Feb 2001,

Staticaly allocated buffers in library. Is it correct?

2001-02-16 Thread Andrey Simonenko
I patched some library files and noted that some functions, which parse some configuration files, use staticaly allocated buffers. Sizes of such staticaly allocated buffers are 8k, 10k and so on. These buffers are used to hold one line from parsed file. Usually it is enough for one line, but reall

When IPv6 Firewall was added to FreeBSD?

2001-01-17 Thread Andrey Simonenko
When IPv6 Firewall was added to FreeBSD release? Please tell __FreeBSD_version of that release. I'm going to add IPv6 Firewall support to IP Accounting Daemon (ports/sysutils/ipa) and when I added it, I found out that there is bug in IPv6 Firewall implementation. I sent bug report kern/24248, but

IP Accounting Daemon

2000-11-20 Thread Andrey Simonenko
I'm pleased to announce first public release of IP Accounting Daemon (ipa). Complete documentation and description of IP Accounting Daemon features is availble on its manual pages. I can't describe all features in this mesage. You can download IP Accounting Daemon from the following URL: http:/

TZ implementation: question or proposition

2000-06-20 Thread Andrey Simonenko
I found out that implementation of time zone (local time, date, etc.) has one problem. May be I missed something but I think that following will be interesting. If some process calls one of functions which operates with local time, then all other calls of such functions will use time zone got in

Re: UNILOAD v.1.2 (boot loader/manager) is ready

1999-10-27 Thread Andrey Simonenko
Boris Popov wrote: > On Tue, 26 Oct 1999, Andrey Simonenko wrote: > > > I made some days ago UNILOAD v.1.2, the main feature of this version is > > the ability to load system from beyond 1024 cylinder mark. Here it is > Woo, that feature is _very_ useful. Unfort

UNILOAD v.1.2 (boot loader/manager) is ready

1999-10-26 Thread Andrey Simonenko
I made some days ago UNILOAD v.1.2, the main feature of this version is the ability to load system from beyond 1024 cylinder mark. Here it is list of some changes: -- Changes in version 1.2 - UNILOAD uses IBM/MS INT 0x13 exte

UNILOAD v.1.1 - new boot loader/manager is available on following site...

1999-09-29 Thread Andrey Simonenko
If you are interesting in UNILOAD - new boot loader/manager with user friendly interface (I've posted UNILOAD v.1.0 here in uuencoded message), you can download it on following URL in 'Software' menu item: http://comsys.ntu-kpi.kiev.ua/~simon On this URL online documentation for UNILOAD is also

New boot loader

1999-08-31 Thread Andrey Simonenko
I developed boot loader, which is more powerful and looks better than boot loader, which is usually installed with FreeBSD release. I used it for a long time and decided to send it to FreeBSD. I haven't own home page and can't give you URL where you can read information about my boot loader. So, h

New boot loader

1999-08-31 Thread Andrey Simonenko
I developed boot loader, which is more powerful and looks better than boot loader, which is usually installed with FreeBSD release. I used it for a long time and decided to send it to FreeBSD. I haven't own home page and can't give you URL where you can read information about my boot loader. So,