Hi,
probably this question was asked here many times before, but I'm new
to kernel mode hacks ... Is it somehow possible to access files from
my kld module ? I have seen functions like printf(), MALLOC() for
kernel mode, but nothing like open() ... using open() syscall
directly seems impossible t
Hello,
is it possible to allocate and then maybe free memory in user space
from kernel mode, if I have struct proc of the process that memory should
belong to ? What is the easiest and safest method of doing this ?
I have seen some example that uses obreak(), but that seems very tricky
and suspic
> I use "LPRng 3.6.20" and openssh on the 4.3 box, lpd-server is on a 4.1 box.
> Issuing 4-5 lpq's in a minute gives "Connection timed out".
> First i thought it may be a problem with LPRng, but scp'ing large files
> doesnt work anymore, too. Even ssh hangs sometimes.
> I tried to disable the "new
Hello,
can please someone enlighten me how can a module catch ip packets before
they actually enter the stack, the way ipfw or ipf does ? I tried to look
at the sources, but ipfw seems to do it some very specific way which
is based on some in-kernel hacks to make it possible (ofcourse correct me
> On Mon, Jul 02, 2001 at 03:53:53PM +0400, Eugene L. Vorokov wrote:
> > > I use "LPRng 3.6.20" and openssh on the 4.3 box, lpd-server is on a 4.1 box.
> > > Issuing 4-5 lpq's in a minute gives "Connection timed out".
> > > First i thought
Hello,
Some time ago I was asking about I/O in kernel mode when I don't have
struct proc to use syscalls. Actually I just wanted my kld to read it's
config file on load. Terry told me it's tricky, and I was thinking
about possible workarounds. I decided to try the following: look for
some process
> Hello,
>
> I'm writing a kernel module, and it involves traversing the proc list searching for
>the right structure,
> however, when I use SLIST_NEXT(p, p_list) in the program, I get a warning when I
>compile it:
>
> warning: statement with mo effect
>
> What am I doing wrong? I've read th
> On Thu, Jul 05, 2001 at 02:59:17PM +0200, Bernd Walter wrote:
> > You are mmaping into the address space for the process you use the
> > struct proc from.
> > As long as it's this programm that is curproc everything is fine.
Okay, I understand what the problem is. But what if I still want to
si
Hello,
I'm pretty confused with the fact that kernel panics when my module's
event handler returns something greater than zero on MOD_LOAD. I wanted
module to refuse to load when it can't find it's config file, so I
thought I can return error code and it will not be loaded, and behaviour
of modul
Forgot to Cc: here:
> You can't call kernel strlen on a userland address, you must do
> something like this:
How so ? It seems to work for me. For instance, I used userland
address space buffer to simulate __getcwd() syscall on the current
process (I was hacking open() syscall and log full path
> /*
> * return number of characters in a userland address string
> * or -1 if an illegal access occurs.
> */
> int
> user_strlen(uaddr)
> char *uaddr;
> {
> int ret;
>
> ret = -1;
> do {
> ch = fubyte(uaddr);
> ret++;
> } while (ch !=
> ch = fubyte(uaddr);
And one more question, does this mean that I can't use things x = *uaddr
and *uaddr = x for userspace, but always have to use fubyte() and subyte () ?
If so, what is the reason it was done like that ?
Regards,
Eugene
To Unsubscribe: send mail to [EMAIL PROTE
> diman wrote:
> >
> > Hi, folks.
> > When I switch to DDB to check something or debug something
> > usefull, mp3 player process (mpg123) hangs up and dissonate
> > me. So guys how do you do in such a case? I'm shure that
> > I'm not one having such a problem. ;-)
> >
> > Maybe someone has allre
Hello,
maybe it's a bit offtopic, but still: how can I disable reboot on kernel
panic in 15 seconds, so that it just hangs and I'm able to see what
happened when I come ?
Regards,
Eugene
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the messag
>
> Yes. But it is not easy. Look at code vfs_vnops.c. You can let a user
> process open a file and then push the file descriptor into kernel via a
> special system call. Search the mailing list archive and you will find
> discussions on how to add a new system call.
>
Well, if you aren't going
Hello,
it seems that I can't pass any parameters to a KLD module when I load
it (i.e., some command line). Am I missing something, or if not, why is it
like that, on purpose or just no one was willing to implement that ?
Regards,
Eugene
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsu
Hello,
using my ugly hack to do file i/o from a module, I discovered some
problem calling mmap() from a function with a lot of local buffers
defined. I have:
char * pizda_malloc(struct proc *p, int size)
{
struct mmap_args mem; int res; register_t save; char *buf;
save = p->p_retval[0];
mem.
> > I call this function with (curproc, PATH_MAX+1), and everything is fine
> > when I have just a few local variables defined in the caller (it all
> > works on MOD_LOAD only). However, if I have 2 buffers, 4096 bytes each,
> > as local variables and then try to allocate userspace memory the same
> Thank you very much for the help so far
> the functions open() and write() expect there arguments to be in user space
> and not kernel space, which is what I was doing wrong. My question is, how
> then would you go about opening and editing a file from the kernel?
>
> To Unsubscribe: send mail
> Things seem to work fine now, but I still get a lot of those:
>
> "Jul 26 00:43:48 test256m /kernel: arp: 192.168.1.4 is on sis0 but got
> reply from 00:a0:cc:a0:d4:07 on sis1"
>
> Anybody know how to turn them off ?
Yes, I have this problem too. We use several interfaces with totally
differe
> > Anybody know how to turn them off ?
>
> sysctl net.link.ether.inet.log_arp_wrong_iface ?
vel@bugz:/home/vel # sysctl net.link.ether.inet.log_arp_wrong_iface
sysctl: unknown oid 'net.link.ether.inet.log_arp_wrong_iface'
Huh ?
Regards,
Eugene
To Unsubscribe: send mail to [EMAIL PROTECTED]
> why not use several addresses on one card?
Because we must test how our software works with several different cards
(we develop VPN software for windows, linux & FreeBSD)
Regards,
Eugene
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the mess
> Can you compile a debug kernel please and repeat this? That way you will have
> debug symbols so that you can get more useful information out of gdb. You'll
> have to get a new crashdump with the debug kernel running however.
Maybe it's offtopic a bit, but can you please give exact instructio
> > Maybe it's offtopic a bit, but can you please give exact instructions of how
> > to compile debug kernel ? My machine crashes sometimes too, I tried to compile
> > debug kernel, but it seemed not so easy and I gave up due to lack of time. Or
> > is there any URL with a good explanation ?
>
>
> you just call config with '-g' option. and compile the kernel in normal
> way. The freebsd handbook discusses this in more detail.
Yet another issue, I have run config -g, then make depend, make and
make install.debug. But my /kernel is still about 2mb long, which probably
means it's not real
Hello,
here's my crash dump, something related to mbufs. If more information is
needed, tell me what to do, I'll provide it. This usually happens (but not
always) when someone is downloading something huge from ftp server on this
machine.
Regards,
Eugene
vel@bugz:/home/vel # uname -r
4.2-RELE
> In message <[EMAIL PROTECTED]>, "Eugene L. Vorokov" wr
> ites:
> >fault virtual address = 0x60c0ff00
>
> I missed the beginning of this thread, but this looks like a problem
> that was fixed just before 4.3-RELEASE. What version of FreeBSD
> are y
Hello,
I cvsup'ed 5.0-CURRENT yesterday, successfully compiled the kernel and
tried to compile the rest. However, when doing make in the lib directory,
it stops on libmp. The problem is that libmp uses include files from
openssl/, and they are not present in my system, as I can see they
don't com
Hello,
while trying to compile -current, I discovered some possible bug:
when compiling libpam, it stops on libpam/modules/pam_ssh/pam_ssh.c,
giving bunch of errors. The problem is that including security/pam_mod_misc.h
seems wrong, it doesn't find it there. When I changed it to simple
pam_mod_mi
> Er... the OpenSSL sources *are* shipped with FreeBSD.
> Or at least they should be, if your CVSup is doing the right thing.
> Are you cvsup'ping the src-all collection, or the subcollections?
> There is no longer any need to *not* cvsup src-all, no matter if
> you are in an export-controlle
> > Hmm yes, it's there. But the snapshot I installed first doesn't
> > have it (why ?). When I installed it manually prior to compiling libs,
> > libmp compiles fine ... Btw, is there any guide of what is the proper
> > order of compiling things after cvsup ?
>
> Yep, the src/UPDATING file.
>
>
Hello,
pam_wheel authentication module seems to be broken in -current. Look at
this (from src/lib/libpam/modules/pam_wheel):
PAM_EXTERN int
pam_sm_authenticate(pam_handle_t * pamh, int flags, int argc, const char **argv)
{
struct options options;
struct passwd *pwd;
struc
Hello,
can anyone please commit this fix to pam_wheel authentication module. It
fixed two problem I mentioned in my previous mail (currently for any
non-root user PAM_IGNORE is returned, and in case of auth_as_self and
debug options used together it logs strange things instead of username).
The
Hello,
why isn't PFIL_HOOKS kernel compile option listed in NOTES ? If it just
was forgotten, please add it. One trying to compile in ipfilter will get
confused I think.
Regards,
Eugene
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message
> You can try the following in your kernel config:
>
> options NETSMB
> options NETSMBCRYPTO
> options LIBMCHAIN
> options ICONV
I think it's "options LIBICONV" (or do both work ?).
Regards,
Eugene
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscrib
> Hello hackers,
>
> I'm new on FreeBSD modules programming, and I've a little question...
> How can I do file operations (like open(), read()..) on a syscall handler of
> a syscall module ?
> In fact I've met the problem since my module must open a file which contains
> some informations for the
> Hi hackers,
>
> I'm confronted to a problem when I try to hack getdirentries(2) in a kld
> module :
>
> To summarize, getdirentries() filled in a buffer a series of dirent struct,
> and the 'd_name' field represents the filename (without the full path). I
> must recover the full path because
Hello,
I'm observing some strange problem when I have an IP address on one card
on a bridge machine and want to telnet in. I have 4.2-RELEASE box with
two network cards: Realtek 8139 (rl0) and 3Com 3C905B (xl0). rl0 is connected
to the world, and xl0 to the intranet switch. FreeBSD handbook says
> In 5-0-KSE there is a single page that contains the stack and
> the PCB (which is about 660 bytes). We are also looking at adding
> code to set a hardware watchpoint between the stack and the PCB
> to catch overruns.
Maybe I'm just dumb, but I still don't understand, what is the reason of
keep
Hello,
what is the most proper and easy way to shutdown given process
(not curproc) from kernel module ? Any advices regarding this
are appreciated.
Regards,
Eugene
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message
> > It's kinda late in the process to be complaining about this, but I just noticed
>this myself...
Why not just symlink csh to tcsh then ?
vel@bugz:/sys/modules/paudit # ls -l /bin/*csh
-r-xr-xr-x 2 root wheel 740996 Aug 23 23:19 /bin/csh
-r-xr-xr-x 2 root wheel 740996 Aug 23 23:19 /bin/
> On Fri, Aug 24, 2001 at 01:45:48PM +0400, Eugene L. Vorokov wrote:
> > > > It's kinda late in the process to be complaining about this, but I just
>noticed this myself...
> >
> > Why not just symlink csh to tcsh then ?
>
> Because csh is hardlinked
> : I'm running -current as of an hour ago. I've gotten this since I've
> : been running 4.2-stable, any ideas on how I can find out what it
> : belongs to?
> :
> : unknown: can't assign resources
> : unknown: can't assign resources
> : unknown: can't assign resources
> : unknown: can't as
Hello,
would someone (Mark ?) finally remove this:
pam_rootok: pam_sm_authenticate: Refused; not superuser
I think it should be sent to the debug output, not a terminal. It's
quite annoying ...
Regards,
Eugene
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers"
Hello,
I have a module which adds new device. It does make_dev() and then simulates
mknod() syscall, so that /dev/name is always automatically created.
Also I have a daemon which reads from and writes to this device. The daemon
opens the device once and then holds it open. When my module unloads,
> > Hello,
> >
> > I have a module which adds new device. It does make_dev() and then simulates
> > mknod() syscall, so that /dev/name is always automatically created.
> > Also I have a daemon which reads from and writes to this device. The daemon
> > opens the device once and then holds it open.
> > Hello,
> >
> > I have a module which adds new device. It does make_dev() and then simulates
> > mknod() syscall, so that /dev/name is always automatically created.
> > Also I have a daemon which reads from and writes to this device. The daemon
> > opens the device once and then holds it open.
> I comitted a fix to -current two months ago. It's still in my -stable
> tree... if Jordan gives the O.K., I will MFC it to -stable.
>
> -Matt
Erm, sorry, but what does MFC mean here ? I see this term used a lot and
I can even guess what it
Hello,
I'm going to implement a small improvement to a KLD system. I want linker
file not to be loaded at all when all modules inside it fail to load for
some reasons. I think that would be logical behaviour. Does anyone think
that such change would break something ?
Regards,
Eugene
To Unsubsc
Hello,
I updated from -current yesterday, ran "make world; make kernel KERNCONF=X"
and went to bed. When I rebooted with fresh kernel this morning, I noticed
something strange:
vel@bugz:/usr/src # w
3:47PM up 5:38, 4 users, load averages: 0.00, 0.11, 0.08
USER TTY FROM
> > 1) scan the sysent table and check syscalls pointers (generally, rootkits
> > intercepts syscalls)
>
> This can get really "hairy". To scan the syscall table, even if you
> are 'root' and directly access /dev/mem you will have to use some
> system calls to open(), read() and seek() into the
Hello,
I have a script which is supposed to convert all filenames to lowercase
recursively from current directory. It looks like:
echo "Processing files"
for i in `ls |grep [A-Z]`; \
do mv $i `echo $i |tr [A-Z] [a-z]`; echo $i;\
done;
for i in `find . -name "*" -type d -maxdepth 1`;\
> > "Eugene L. Vorokov" wrote:
> > >
> > > I have a script which is supposed to convert all filenames to lowercase
> > > recursively from current directory. It looks like:
> > >
> > > echo "Processing files"
> > > fo
Hello,
does FreeBSD currently have something similar to linux's kernel_thread() ?
Or is it what KSE intends to implement ? Can I somehow run "independent"
kernel thread, which will, for instance, check some flag that I set inside
interrupt handler and do some job that can't be done in the interru
>
> "David O'Brien" <[EMAIL PROTECTED]> writes:
> > because `echo' nicely removes \n's from env vars when it prints them.
>
> des@des ~% foo='bar
> quote> baz'
> des@des ~% echo $foo
> bar
> baz
> des@des ~% /bin/echo $foo
> bar
> baz
>
Uhmz ?
bash-2.05# foo='bar
> baz'
bash-2.05# echo $foo
b
> --_ABC1234567890DEF_
> Content-Type: audio/x-wav;
>name="New_Napster_Site.MP3.pif"
> Content-Transfer-Encoding: base64
> Content-ID:
You virus senders, please, do not send your viruses to this list. We all
read mail under Unix and don't give a shit to these windows executables.
>
> Fabio Miranda wrote:
> > I want to understand Why each byte (8 bit of data and
> > 1 bit of parity) has one bit of parity?
>
> To permit the hardware to catch single bit errors.
>
> ECC is a better version of this, which permits the hardware to
> correct single bit errors, and catch multipl
> My, is it April 1st already? How quickly time flies! December feels
> like it was just yesterday!
>
> - Jordan
Ehe, as far as I can see some people even have taken it seriously :) This
probably shows that when you have to read 300 emails/day, your attention
slowly but constantly leaves you.
>
> email áàçû ìîñêâû, ïèòåðà, ðîññèè è ïð. ðàññûëêà email ñîîáùåíèé.
> ÷òî áû óçíàòü ïîäðîáíåå, íàïèøèòå ïèñüìî íà [EMAIL PROTECTED] , óêàçàâ â òåìå
>ÇÀÏÐÎÑ
> (ñîîáùåíèÿ áåç ñëîâà ÇÀÏÐÎÑ - àâòîìàòè÷åñêè óäàëÿþòñÿ)
>
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe free
>
> I made a kernel module that logs execve system calls by intercepting the
> execve syscall, log it and then execute the original syscall. This was
> pretty straightforward to do, and it works beautifully on STABLE, but on
> CURRENT it bombs on this line:
>
> uid = p->p_cred->pc_ucred->cr_uid;
> What does the SuperBlock actually do ?
> Why is the SuperBlock so critical ?
>
> Can anyone give me a *good* summary on the purpose of the Super Block ?
> And/Or any recommendations ?
On FreeBSD, 'man fs' can help you I think.
Regards,
Eugene
To Unsubscribe: send mail to [EMAIL PROTECTED]
> I want to control for example open() syscall:
> static int my_open(register struct proc *p, register struct open_args *ea)
> {
> [...]
> }
> Name of file to open is in ea->path, but this name can be: ./somefile
> and i need a full path to it.
I faced that problem once. I used an ugly hack: sim
> I still wonder, whether this problem occurs because of how thttpd does
> things, or how FreeBSD implements kqueue stuff, however, I am not sure
> that I will have enough time to dig deep into this. Right now I'm pretty
> happy with the fact that I got thttpd working again, and those "200 0"
> m
Hello,
I have a small problem. I work for software development company and
write daemons and console tools for Unix. My boss wants everything
to be written in C++, because he thinks C++ is cool. I prefer C
for such tasks, but I cannot really put good arguments of why and
where C++ can be worse th
Hi,
I was setting up quotas on 20gb disk, and seen this:
vel@bugz:/home/vel # quota -v for_all
Disk quotas for user for_all (uid 1003):
Filesystem usage quota limit grace files quota limit grace
/usr13471298 01350 45321 0 0
On Wed, Jun 05, 2002 at 11:56:57PM -0500, Stephen Montgomery-Smith wrote:
> I have access to a rather large computer (3GB of RAM) and I would like
> to write a program to access most of this memory. I find that I am
> unable to malloc more than about 0.5 GB of memory, even if I do it in
> small i
4 CPUs are found.
Network operation slows down to hell, syslog is full of
Jul 31 14:44:54 superjob /kernel: fxp0: device timeout
Without SMP, everything runs fine.
Syslog output regarding dmesg and kernel config are below.
Regards,
Eugene L. Vorokov
Jul 31 14:40:12 superjob /kernel
67 matches
Mail list logo