Re: WinXP and FreeBSD configuration problems

2005-08-05 Thread Ryan Sommers
[EMAIL PROTECTED] said:
> ad0s0 NTFS2G  #Windows Boot
> ad0s1 FreeBSD 2G  #FreeBSD Boot/Swap
> ad0s3 FAT 20G #Windows
> ad0s4 FreeBSD 298G#FreeBSD
>

... extra stuff eliminated ...

Why the miniscule 2gb partitions? Honestly, they are pointless. Second,
worrying about the performance of boot and swap on a computer with a 320GB
harddrive? Again pointless. If you are worried about the performance of
your swap space I would rethink running Windows XP because you have way
too little RAM. Third, why are you making seperate partitions for boot and
swap anyway?

>From here on out I'm going to revert to the BSD style where you say
partition I will now call it a slice.

FreeBSD can reside on a single slice. The BSD disklabel'er divides the
FreeBSD slice into partitions, for things like swap, and file-systems.

My recommendations to you are as follows:

1) Don't worry about where things are on the disk. You're complicating the
hell out of everything and in the end you probably won't notice a
difference. If you're that worried about performance invest in multiple
SCSI disks and create multiple RAID arrays optimized for performance.

2) Don't worry about making seperate slices (the things you can only make
4 of).

3) Make a single slice for Windows and install it there. It's good to make
it the first slice on the disk, but not necessary. Then install FreeBSD to
another slice. Let FreeBSD overwrite the MBR with the standard boot
manager.

This has worked countless times for me. I've always dual booted my laptops
with FreeBSD and a Windows OS.

Just me .02. If you'd like feel free to contact me personally and I'd be
glad to help you get started.

-- 
Ryan Sommers
[EMAIL PROTECTED]

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Pointers for understanding vfs/buffer/filesystem architecture

2005-07-30 Thread Ryan Sommers

Eric Anderson wrote:
I've very interested in learning about FreeBSD's implementation of 
vfs/buffer cache/fs archicture.  I've read through mckusick@'s chapter 
in the Design and Implmentation of FreeBSD book, and I've read the UNIX 
Filesystems book cover to cover.


What I'd like to see/read/understand, is how FreeBSD in particular is 
put together in this regard, and then I'd like to go about writing a 
very very simple filesystem as a learning excercise.


Can anyone give me some pointers?  Would anyone be willing to guide me 
along in my quest by answering questions (off list if preferred, or on 
list), etc?


Thanks in advance for the hints/input!
Eric




Best place would be the source code itself. I think the nullfs 
implementation would be a good place (src/sys/fs/nullfs). I thought I 
also remembered some little article on writing an FS for freebsd, 
finding it is eluding me though.


--
Ryan Sommers
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


To C++ or not to C++

2005-06-24 Thread Ryan Sommers
Greetings all... I'm about to undertake a major software engineering
project and I can't decide between C or C++ and was wondering if I could
get some input from the community.

As part of this project I'm going to need to make use of at least 2 C
libraries (OpenSSL and ncurses) and the application must be compatible
with the standard range of Linux/UNIX compilers and operating systems. All
of these signs make me sway closer to just doing it in C. However, one
strong point always seems to pull me back to C++, constructors and
destructors.

Constructors and destructors can offer so much in the way of memory leak
avoidance. Of course, each language can leak memory like a sieve if used
improperly. However, for statically allocated structures semi-automatic
garbage collection can be a nice cushion.

Anyway, without getting into too much detail. Anyone had to make this
choice on a project? What were your thoughts in retrospect? What would you
have done different, what would stay the same...

PS For this project things like polymorphisms and inheritance really
aren't needed.

Thanks


-- 
Ryan Sommers
[EMAIL PROTECTED]

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: about execute assembly exapmles under freebsd

2005-04-24 Thread Ryan Sommers
Something else than can be useful is to use inline assembly and the -S
switch for GCC (gcc -S sourcefile, produces sourcesfile.s which is the
assembly that would have been sent to gas if you had specified -o).
Inline assembly example:
([EMAIL PROTECTED])~:cat test.c
int
main()
{
int input=0;
void *edx, *ebx, *ecx, *eax;
asm("cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (input));
printf("CPUid returned: EAX=%0.8x EBX=%0.8x ECX=%0.8x EDX=%0.8x\n", eax,
ebx, ecx, edx);
return 1;
}
([EMAIL PROTECTED])~:./test
CPUid returned: EAX=0001 EBX=68747541 ECX=444d4163 EDX=69746e65
([EMAIL PROTECTED])~:perl -e 'print
"\x41\x75\x74\x68\x65\x6e\x74\x69\x63\x41\x4d\x44\n";'
AuthenticAMD
([EMAIL PROTECTED])~:
NOTE: If the order in the Perl command confused you, remember,
byte-ordering. :) Little-endian you have to reverse the bytes.
--
Ryan Sommers
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: sshd dieing? after applying FreeBSD-SA-03:12.openssh

2005-04-20 Thread Ryan Sommers
c0ldbyte wrote:
Dude, that was 2 years ago in 2003 the year now is 2005
and the current date is 'Wed Apr 20 12:32:31 UTC 2005'
so umm, am I living in the future or are you dwelling on
the past ???.
Hey, dude, you aren't helping situations around here. This is one of 
many inflammatory remarks you've made in recent months. However, I don't 
believe you're doing it for the express purpose of trolling, so I'm 
going to give you the benefit of the doubt and advise you.

I don't care for your attitude around here, not that that really means 
anything, but I'm sure others don't either. This is a public list and 
people are allowed to ask questions. No matter if you, or I, or anyone 
else considers them stupid. Asking for aid is what the lists are here 
for. Certain questions might be better directed to questions@ or 
current@, however, none deserve the treatment you are giving them. None 
of us have belittled you when you asked questions, you should extend 
others the same courtesy.

You appear to have interest in FreeBSD and I don't want to turn anyone 
away from it or put a sour taste in their mouth. I have loved the same 
OS for a long time and like to watch it grow with new list membership, 
yours the same, however, hang the 'tude at the door and realize this 
isn't IRC. We help people here instead of giving them a snide remark and 
say, "RTFM".

Sincerely
Ryan.
--
Ryan Sommers
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Global / Cluster / Shared filesystem for FreeBSD?

2005-03-14 Thread Ryan Sommers
Sean Kelly wrote:
Hope this helps. I'd like to see FreeBSD get much better AFS and general
clustering/internetworking support. For example, easier to configure LDAP
and Kerberos. Must.. compete.. with.. Active.. Directory...
This is something else I've been wanting to look at as well. In general 
I'd like to see many more file-systems supported in FreeBSD. Not as root 
devices, necessarily, but general kernel module support for them. I know 
someone was working on Reiser support, and I think that's great.

--
Ryan Sommers
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Freebsd Asm

2005-03-10 Thread Ryan Sommers
klowd9 - wrote:
If anyone can share his own files, or give any tips, would be nice.
You aren't going to find many, if any, userland include files for 
assembly. The system is designed to be very portable and assembly is not.

My first response, and likely that of anyone else, would be what are you 
doing that it needs to be done in assembly? If all you are looking for 
is some experience working with assembly then that's fine; there are a 
lot of good guides out there that teach the basics. Otherwise though if 
you're looking to get into developing on FreeBSD I'd recommend sticking 
with a higher level language.

I think I remember a few guides out there on doing assembly on FreeBSD, 
can't remember them off the top of my head though. Honestly, coming from 
someone that went through that learning curve, a good ol copy of MSDOS 
can be a better teaching aid than doing assembly on a modern OS. I 
imagine almost every modern OS running on x86 will run in protected mode 
and therefore somewhat shield you from getting down and dirty with the 
processor. Using DOS will let you mess around with entering protected 
mode and other things.

Another note, careful about using Linux guides on FreeBSD. Specifically 
be careful when it comes to system calls. Linux, like Windows, uses 
registers for passing arguments to syscalls, extras spill onto the 
stack, FreeBSD however passes all parameters on the stack.

--
Ryan Sommers
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: VMCORE NOT FOUND

2005-02-12 Thread Ryan Sommers
Ashwin Chandra said:
> ryan,
> i think i was a bit vague in my email. I am correctly usnig the swap
> device
> and dump directory. Before the system reboots the core should be saved
> from
> the swap device (before it mounts) and into the path that i specified.
> dumpdev="/dev/ad0s1b", our 2gb swap device and dumpdir="/usr/crash"
> So I am doing all this correctly, yet still no dump comes up and I am not
> sure why! =(

Do me a favor and attach your kernel config.

-- 
Ryan Sommers
[EMAIL PROTECTED]

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: VMCORE NOT FOUND

2005-02-12 Thread Ryan Sommers
Ashwin Chandra said:
> I actually changed dumpdir to /usr/crash since /var did not have enough
> space to accomodate 512 MB.  But /usr has 60gigs. When the kernel panics
> it
> just crashes, I never get a message saying "dumping...". Savecore upon

You dump to a device, not a path. Because the kernel is crashing
file-system consistency can't be assumed. Therefore you can't dump to a
file-system. Instead you dump to a device, typically the swap device. Then
after you reboot and ensure ensure file-system integrity you can save the
dump onto the file-system for analysis.

I believe you are getting a little mixed up in all the terms:

dump device: the device the kernel will save a dump to. (This is a device,
not a file-system path)

dump dir: the file-system path a core from the dump device will be saved
to by savecore.

The kernel does not dump to the dump dir. The kernel dumps to the dump
device, the savecore utility retrieves a previous dump from the dump
device and saves it in the dump dir.

Like most things, this is outlined very well in the handbook:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug.html#KERNELDEBUG-OBTAIN

-- 
Ryan Sommers
[EMAIL PROTECTED]

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Known Bug?

2005-02-10 Thread Ryan Sommers
Ighor Poteryakhin said:
> FreeBSD 5.2.1-RELEASE-p13, Samba 3.0.10

> If it is needed, I'll provide more information about
> hardware/software/kernel conf etc... installed.

First thing I would recommend is upgrading to 5-STABLE. If you still have
the same reboot compile a kernel with debugging symbols enabled and
provide a stack-trace. The best list to deal with these is [EMAIL PROTECTED] :)

If you need help on how to obtain a stack-trace it's listed in the
handbook somewhere, unfortunately I'm not currently able to give you a
link.


-- 
Ryan Sommers
[EMAIL PROTECTED]

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: i86 install images

2005-02-06 Thread Ryan Sommers
Chuck Robey wrote:
Anyhow, I do my downloading using my Mac machine, and it's reporting the,
say for the disc1, it's "miniinst" and for disc2, it's reporting "LiveFS".
I know it's not important what label's on the disc, as long as it's not
part of the install, but having the names not only being wrong. but
actually overwriting good names, that's not very good.  If I was root, I
would want that fixed, it would embarrass me.
FYI, within the past 2 weeks I downloaded the 5.3-RELEASE image to an 
OSX mac and successfully burned it, not sure exactly what site it was.

I never looked at the label however. One thing to remember though, when 
burning ISOs on an OSX mac the best way I've found it to open up a 
terminal (Applications / Utilities, if I remember correctly) and then do 
'hdutil burn isoname'

--
Ryan Sommers
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Simple question about CPUs and processes

2005-01-31 Thread Ryan Sommers
[EMAIL PROTECTED] wrote:
Hi list,
I'd like some insight on the following; Me and a friend were discussing
tech stuff and he said that, when using dual (or more) CPU systems, it is
the hardware itself (and alone) choosing which CPU will execute this or
that process.
The OS and the OS alone chooses which processes to migrate (move from 
one CPU to the other), which process to execute, and all that. This is 
pretty much the entire job of the scheduler. All the CPU cares about is 
endlessly executing instructions fed to it and delivering 
interrupts/exceptions. What your friend might be confusing is the fact 
that the CPU can receive an interrupt or exception and the CPU will then 
 begin executing the handler for that situation. This does not mean it 
is choosing which process to execute though. The handler might then make 
the decision to perform a context switch (switch the executing process).

There are a great many sources on the web on topics like these.
--
Ryan Sommers
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Resuming from a crashdump

2005-01-24 Thread Ryan Sommers
João Carlos Mendes Luís wrote:
Isn't it much easier to simply reload the full memory dump (hibernation 
file, not dump device) into RAM and continue from that point?  This 
should be done by /boot/loader, not by a full kernel, as the memory dump 
will also contain the kernel.

At this point, all you have to do is to restore the hardware state, 
which may (or may not) be just the same as recovering from suspend state.
Restoring the hardware state requires restoring the state inside each 
and every hardware device. For certain devices this is trivial. However, 
I believe for devices with much more complex internal state machines 
this is way beyond the scope of the loader.

Now, that isn't to say the loader couldn't start executing the kernel 
somewhere other than "the beginning" and instead at a point where the 
kernel would specifically know it was awoken from hibernation and 
cleanup/reinitialize any devices.

My little knowledge on this subject aside. I'd love to have full 
suspend/resume functionality. It'd make my life as a mobile freebsd user 
much much easier. However, I wouldn't want it at the expense of every 
kernel. It would need to be something completely modular.

--
Ryan Sommers
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: GENERIC build broken

2005-01-24 Thread Ryan Sommers
Michael Nottebrock wrote:
Poul-Henning Kamp wrote:
I have stared with fascination on this email for a full 30 minutes.
What could possibly be going on in the mind which came up with the
idea to take a five year old email, change Matt Dillons name and
repost it to our mailing list ?

So that's what this lowlife is quoting, heh. I already wondered last 
time, but it just didn't occur to me I had to go _that_ far back into 
the list archives :-).

Will the pipermail archive on the main site even go back that far? I had 
to go to mail-archive.com to go back that far. Furthest I saw on the 
main page (mind you I didn't bother downloading the full raw mbox file) 
was back to Apr 2003.

--
Ryan Sommers
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: GENERIC build broken

2005-01-24 Thread Ryan Sommers
These smear campaign artists get lazier each time. The least they could do
would be to copy PHK's current signature, instead of the one he used in
1999.

http://www.mail-archive.com/freebsd-current@freebsd.org/msg04778.html

-- 
Ryan Sommers
[EMAIL PROTECTED]

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: device id question (usb and scsi)

2005-01-20 Thread Ryan Sommers
Bram Van Steenlandt wrote:
Hi,
I've been having some problems with the following:
ex1: I have two scsi scanners and I use sane to scan all works well my 
two scanners are /dev/pass0 and /dev/pass1 however when one of them is 
turned of the device are renumbered (wich is a problem because then I 
have to change the sane configuration files)

ex2: Same thing as above happens with usb printer, I work with cups and 
printers get mixed from the moment you leave one of.

I have a support pack for cups and they tell my there is no other 
solution then to move to linux or osx because they have device id 
numbers (they save the number kinda like a dhcp server and fixed ip 
adresses). Or that I have to wait untill freebsd implements this.

I am a very FreeBSD minded person (but also a newbie) and I find it very 
hard to believe that such an advanced OS does not have some solution for 
this.

So if anybody has any hints or solutions please send them.
The problem is that devfs automatically assigns numbers based on when 
devices appear. In most cases this is a Godsend for system admins. In 
your case though, where devices come and go but need static naming, it 
doesn't work so well. Unfortunately I'm not a devfs guru. However, you 
might have a look at the devfs man page. You can add rule-sets to the 
devfs configuration file in /etc. If I remember correctly this can even 
work off the device ID tag. What you would do is add rules that create 
symlinks between the devfs dynamic rules and static symlinks you name.

--
Ryan Sommers
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: clock time in milliseconds into a c program

2005-01-19 Thread Ryan Sommers
Marco Trentini wrote:
Hi, I need to clock the function execution time into a C
program. I know /usr/include/time.h library but I need to
clock the time in milliseconds.
Any suggestions, links?
Are you looking for how long the processor spent executing your code? Or 
the difference in wall time between when it enters the function and when 
it exits the function?

The difference will be subtle, but will still be there. The problem with 
using wall time (the amount of time elapsed on the clock on the wall) is 
that it doesn't factor in context switches. In 1 second of wall time 
your code might only have been executing for a very small piece of it. 
Other programs could have been scheduled to run, the kernel could be 
doing a lot of system maintenance, all will eat time slices, and none 
will be shown if you just just look at the wall clock time.

However, if all you want if to look at where a bottleneck is, or how 
long your program is spending in a given function, you could just 
generate a profile.

It might be useful to know if you are looking for wall time or CPU time 
spent in those functions.

At any rate, I'd suggest looking at microtime or nanotime. the (struct 
timeval) that microtime uses is defined in /usr/include/sys/_timeval.h 
if I remember.

There are a lot of good guides to time keeping and accuracies. You might 
check out http://people.freebsd.org/~phk/ I remember him having a 
section on his timekeeping hobbies.

--
Ryan Sommers
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: - I A - (was Kernel mode programming - precisions)

2005-01-18 Thread Ryan Sommers
Street Chaman wrote:
NOTE: THIS IS NOT A JOKE.
I don't know if it is the right place to post this; I actually don't 
know even if I should post this; but, before giving it up because of my 
own limits, I have to write down what I was trying to do. Maybe someone 
will be interested in; maybe someone will finish it.

This is a fine (the best) place to post all the questions you have 
asked. Few things to note:

1) Don't keep changing subject lines. By leaving your subject line as is 
you aid not only those reading their list mail in a threaded view, but 
those that search google or the archives have a much easier time 
following the logical progression of the discussion.

2) I'm not sure (nor have I looked) if you are the '- Felix -' that 
posted about kernel mode programming, but same thing goes as for the 
subject line; it helps us make sense of the conversation if you leave 
your From: header line somewhat similar.

Congratulations on thinking up an idea and trying to put it into code. 
That can sometimes be the hardest thing to do in a project; seconded by 
choosing the name of the first source file to write.

I'm still not sure why timing was so critical for an AI (artificial 
intelligence) application. However, for something like artificial 
intelligence I would *definitely* not choose to write it in assembly. C 
or Java should provide a good higher-level language to begin in. 
Although I have no real experience in AI, I hear a lot of designers are 
using languages like Scheme, ML, Haskel or even Prolog, I believe, for 
this area of computer science. Although if you aren't familiar with 
functional languages I'm not sure I'd consider this as a first project 
to undertake in one.

Choosing a higher-level language could probably save you a lot of hair 
pulling over assembly. I would write your ideas in a high-level language 
first. Then once you've thoroughly determined the algorithm isn't at 
fault through profiling look at the generated assembly and see how you 
can squeeze out the extra cycles.

The other benefit is the obvious portability one. Sharing your AI ideas 
with others will be quite limited if you constrain yourself to a single 
architecture and ISA.

--
Ryan Sommers
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Kernel mode programming -precisions

2005-01-18 Thread Ryan Sommers
Street Chaman wrote:
Thanks to everyone who read my question; here some precisions:
Actually, my soft is a kind of interactive filter: it takes a lot of 
imput parameters (from keyboard at the moment, but as soon as i've 
understood how it works, i will increase the number of supported io 
devices); treats it in a particular way and produces an output. This 
'particular way' requires a lot of clock cycle, so speed is my first 
problem; (that's part of reason why everything is directly written in 
assembly). I've already buffered input and output, but only as far at it 
was possible: since loop (X) input could affect loop (X-1) general data 
manipulation, and change output, it must be detected quickly. The time 
needed to read/write is still to long. When CPU is waiting on some new 
data, he cannot preform any other operation, and freezes data 
manipultion; that's why I'm looking for a new way to in/output the soft...
I've found out in syscall.master the aio_read/write call. Man page says 
operation is asynchronous, so it returns quite immediatly after 
enqueuing the io thread. Could that be a solution ?  Or back to kernel 
module (by the way: is it possible to write on in assembly) ?
I don't think you're supplying us with enough information here to give 
you a definitive answer. You mention reading from the keyboard but then 
you say that it can't read/write fast enough? You must be one hellofa 
typist. What are you reading/writing from? Keyboard? Disks? 
Reading/writing to disks is going to be slow, the kernel buffer caches 
will help though. Why is it so critical that syscalls return faster than 
they are? Are you attempting to do real-time computing? Are you doing 
any kind of threading? Is it even physically possible to return faster 
on the IO device you are wishing to access?

You mention doing it all in assembly, have you tried coding the same 
thing in C with a select few (as someone else mentioned) critical paths 
written in assembly? You could then more easily make use of 
multi-threading the application on an SMP box. However, this is all 
blind conjecture because we have relatively little information about 
what you are trying to accomplish.

--
Ryan Sommers
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Kernel mode programming

2005-01-18 Thread Ryan Sommers
Zera William Holladay said:
> Even if the application were run as a kernel module, how much of a
> performance benefit could there be when making system calls?  I suspect
> that the module would get a higher scheduling priority but realistically
> wouldn't the module still have to make system calls in the same manner
> that a regular user process does?  I really don't know, so would some kind
> soul tell me please?
>
> -Zera Holladay

The kernel is already running in privileged mode on the CPU so there is no
need for a system call. Technically the kernel never has to make a system
call. A system call is just a well defined method of transitioning between
user and supervisor code. Since the kernel is already supervisor code
there is no need to make a system call.

Whenever a program makes a system call it has to generate an interrupt,
this is the extra savings he is talking about. By already executing in the
kernel his code does not have to suffer the overhead of an interrupt
handler and can just make a jump to the syscall handler.

Least this is all my understanding of it. :)

-- 
Ryan Sommers
[EMAIL PROTECTED]

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Kernel mode programming

2005-01-18 Thread Ryan Sommers
- Felix - wrote:
Hi everyone,
Doing lot of syscalls interrupts in a soft seems to take quite a long time, and seriously slow performances. As far as you can't reduce the syscall amount, is there any way to run apps in kernel mode, in order to call sysfonctions directly ? Perhaps by re-writing softs in kernel modules ? 

thanks for your time.
Yes, it is possible to write loadable kernel modules. As far as if your 
programs can be rewritten as kernel modules and achieve better 
performance that's entirely dependent on what you are doing. What type 
of syscalls are you executing? What is the rate at which you are calling 
them? If you are calling a syscall on the same arguments thousands of 
times could you implement some sort of cache system for syscall results?

In my opinion it's bad practice to just throw a program into the kernel 
to get better performance without evaluating why the performance is bad. 
Making it a kernel module invites all kinds of security and stability 
issues.

--
Ryan Sommers
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: getting mount points in kernel

2005-01-14 Thread Ryan Sommers

Siddharth Aggarwal said:
>
> Hi all,
>
> Is there a system call to get all the mount points? In a user app, I guess
> I would probably parse the /etc/fstab, but how do I do it in the kernel?
>
> TIA,
> Sid.

>From userland: man getmntinfo, man getfsstat
>From kernel land: I'd have a look at the code for the syscall.

-- 
Ryan Sommers
[EMAIL PROTECTED]

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Benchmark: NetBSD 2.0 beats FreeBSD 5.3

2005-01-08 Thread Ryan Sommers
David Malone wrote:
On Sat, Jan 08, 2005 at 01:21:14PM -0500, Charles Sprickman wrote:
 

Any idea what type of impact this patch would have on say, a large qmail 
server that's drowning in context-switches?
   

It will depend on how many processes you have running at any one
moment and how often processes are created/destroyed. From the look
of the graphs, you won't really be able to tell unless there are
significantly more than 1000 processes running at any moment.
	David.
 

This could be the case.
It's my understanding that Qmail spawns a new qmail-local process 
(specifically qmail-lspawn exec's it) for each locally delivered 
message. For any remote message qmail-rspawn forks a qmail-remote 
process. I don't believe these processes live longer than a single 
instance. Depending on how his mailboxes are setup this can even result 
in new processes being spawned. If you're running vpopmail qmail-local 
will pipe the message to vdelivermail. And if you're running anything 
like spamassassin from vpopmail (as opposed to from qmail via the 
QMAIL_QUEUE patch, although that will spawn a spamc of it's own) this 
could result in another executed process (spamc is spamd's light-weight 
front-end).

Depending on how large and busy this qmail server is, there could 
definately be a large amount of time spent in process creation and teardown.

I'm not sure how much Charles is familiar with the 
Qmail+vpopmail+spamassassin, if he is using spamassassin. But, one of 
the "hidden" features of using SpamAssassin and Vpopmail as installed 
from ports is that spamassassin is called from vpopmail. There is no 
run-time option (only compile time that is defaulted to on) to disable 
this. A lot of users don't realize this and will use the QMAIL_QUEUE 
patch and run spamassassin from it. This can result in scanning every 
email twice, which can be a costly oversight.

--
Ryan Sommers
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: My project wish-list for the next 12 months

2004-12-01 Thread Ryan Sommers

Scott Long said:
> 2.  New installer.  I know some people still consider this a joke, but
> the reality is that sysinstall is no longer state of the art.  It's
> fairly good at the simple task that it does, but it's becoming harder
> and harder to fix bugs and extend functionality in it.  It's also
> fairly unfriendly to those of us who haven't been using it since 1995.
> The DFly folks have some very interesting work in this area
> (www.bsdinstaller.com) and it would be very good to see if we can
> collaborate with them on it.

I've spent a good deal of time taking notes and diagrams of what I wanted
from a new installer. However, time constraints have kept me from actually
putting any of it to code yet.

I've looked at the DFly installed quite a bit and I like what it offers,
however, I have a few complaints with it. Quite honestly I wasn't
impressed with the code.

Another issue I had with the dfly installer was one point I believe needs
to be central to any next-gen installer. Internationalisation. My idea of
an installer front-end would use a dynamically loadable language library.
All resources of the front-end (ie strings, images, etc) would be packaged
into a seperate language-pack. These language-packs can then be grouped
together into a language library. A few basic packs would be distributed
with the default library but other libraries could easily be substituted
to make localized distribution sets with little trouble.

The benefit of this is that instead of translating the code you would only
need to translate the language-(pack|library). I think this would greatly
simplify translation and make a seperation between language and the
front-end code.

This is where my complaint with Dfly comes in, upon reading the source,
there are string constants everywhere. Perhaps I am missing something, but
this means that in order to supply localization support much work would
need to be done to find some scheme that doesn't mean translating the
source.

I have quite a bit of notes on seperation and even down to specific
methods and sub-libraries necessary for the back-end. Perhaps if I have
some time soon I'll put it into a PDF somewhere.

Has anyone else put much thought into this?

-- 
Ryan Sommers
[EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Re; tcsh is not csh

2004-11-12 Thread Ryan Sommers
Kevin Lyons wrote:
>Dan Nelson wrote:
>
> but you're 4 years too late to affect
>the outcome...
I think the problem can still be fixed.  Simply put in /bin/tcsh and 
let /bin/csh be what it actually is, which is to say /bin/csh.  I 
realize that will add all of 300kB to the system. Oh and there would 
also have to be an entry for tcsh in /etc/shells.  Should I send a patch?
([EMAIL PROTECTED])~:cvs co -d etc src/etc
([EMAIL PROTECTED])~:cd etc
([EMAIL PROTECTED])~/etc:grep tcsh shells
/bin/tcsh
([EMAIL PROTECTED])~/etc:
How many programs does this incompatability actually break? 
Realistically? If it hasn't been a problem in the last 4 years it makes 
me wonder if anyone is actually writing or using shell scripts written 
for this.

I'm not opposed to adding a real csh to /bin, but if we're only adding 
it to work around a minor incompatability that few if any programs rely 
on I don't see it as being a necessity.

--
Ryan Sommers
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: EHCI Kernel Panic w/ 5.2.1-RELEASE Kernel

2004-11-01 Thread Ryan Sommers
Martin Nilsson wrote:
Martes Wigglesworth wrote:
My kernel panic seems to come from the usb port actually having a device
in the port, at boot.  When I do not have a device in the port, bootup
continues, however, my usb ports are not usable.  This is my dmesg
output.

I have the same problem with a SeverWorks P3 machine and a 7in1 USB 
cardreader. It panics at the end of kernel init if the cardreader is 
plugged into the machine. This machine does not have EHCI controller 
or USB 2.0

I don't know if this considered a showstopper for 5.3R but it can be 
very confusing if you don't know what is causing the panic! Not a good 
first FreeBSD experience!
I don't think this constitutes a show stopper. A show stopper would be 
if a bug in sysinstall caused it to zero all your harddrives regardless 
of your desires.

--
Ryan Sommers
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


GEOM whitepaper?

2004-10-29 Thread Ryan Sommers
Are there any whitepapers, documentation, etc (aside from the new book
about 5.2) on GEOM? I've been reading over the code and it would be nice
to have an annotation to go with it.


-- 
Ryan Sommers
[EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: bootable install CD - relocate to subdir

2004-10-23 Thread Ryan Sommers
Walter Belgers wrote:
Hello hackers,
I am a board member of the Dutch Unix Users Group, and we would like to
make a DVD with several free/open UNIX releases together with the Dutch
Hobby Computer Club/UNIX.
The DVD boots a program that lets the user select the OS (s)he wants to
install, and then pseudo-boots the boot image of that OS.
Problem: all the FreeBSD files need to be in /. This clashes with other
distributions on the same DVD. I would like to have everyting in
/FreeBSD or some other subdirectory instead.
Has anybody done such a thing before, or knows of someone who has?
Regards,
Walter.
 

You could easily accomplish this by hacking sysinstall to do a chroot 
before anything else. You also might have to help the kernel know where 
the new sysinstall is. Right now it runs sysinstall as init. One thing 
I'm playing around with is looking at alternatives to sysinstall as our 
installer or doing a new one. The more I think about it a complete live 
file-system CD with the installer as a user process seems the logical 
way to go. DFBSD has gone this route with their new installer 
(http://www.bsdinstaller.org).

--
Ryan Sommers
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: open() vs the lowest unused file descriptor

2004-10-16 Thread Ryan Sommers
Carl J wrote:
Hi!
Today I noticed that on Single Unix Specification V2,
as well as on the Linux 2.4.26 machine I have here,
that the open() call promises to return the lowest
unused file descriptor when successful.
I'm just wondering: does FreeBSD 4.x and 5.x promise
that? If so, should we update the manpage
to match SUSv2 more closely?
Thank you!
- Carl

4.x I'm pretty sure about 5.x I know does. This isn't a new thing. Since 
as far back as I can remember the UNIX semantics have been to return the 
lowest unused fd on an open(2) call. This has also been the subject of 
much discussion as finding the first free descriptor can cost a lot of 
processing power for applications that use large numbers of descriptors. 
FreeBSD uses a bitmap with hints I believe. All code would be in 
sys/kern_descrip.c.

--
Ryan Sommers
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Fwd: default resolver(5) configuration and behavior of functions like gethostbyname(3)

2004-10-15 Thread Ryan Sommers

Rostislav Krasny said:
>> Please explain why developers of FreeBSD had chose 4 instead of 2? Maybe
>> they should change it to 2, as this default value is defined on most of
>> other systems, including NetBSD?

Don't know why 4 was chosen instead of 2, haven't had a chance to look at
the commit logs. We might have ported over the code from OpenBSD and just
didn't change their value.

>> why is doubling the number of DNS queries? Is it gethostbyname(3)
>> function or the resolver itself?

Do you have 2 name servers in /etc/resolv.conf? Or do you have a hostname
in /etc/resolv.conf that resolves to multiple IPs?

-- 
Ryan Sommers
[EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Wired memory monitoring

2004-10-02 Thread Ryan Sommers
Jan Srzednicki wrote:
Hello,
I am investigating some VM issues on FreeBSD. I have noticed that wired
memory grows quite rapidly on forking lots of processes. After those
processes exit, it drops a bit, but still can use about 100MB after
launching 3000 processes. I think it's not a leak, as subsequent forks
don't cause it to grow noticeably.
I'm rather curious what eats all that memory. sysctl vm.zone shows some
high values, but they're are not high in memory usage terms, even
considering 50% (or so) efficiency of the slab allocator.
The question is, are there any other memory inspecting tools that would
allow me to see where is all that wired memory? And, are there any ways
to control it's behaviour (eg. to free unused per-process structures and
data)?
greetings,
 

Wouldn't that be the zone allocator grabbing pages from the free list 
and adding them to non-pagable per process structures?

--
Ryan Sommers
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Protection from the dreaded "rm -fr /"

2004-10-02 Thread Ryan Sommers
Edwin Groothuis wrote:
On Sat, Oct 02, 2004 at 11:19:28AM +0300, Giorgos Keramidas wrote:
 

John Beck, who works for Sun, has posted an entry in his blog yesterday
about "rm -fr /" protection, which I liked a lot:
http://blogs.sun.com/roller/page/jbeck/20041001#rm_rf_protection
His idea was remarkably simple, so I went ahead and wrote this patch for
rm(1) of FreeBSD:
   

I'm not so much worried about 'rm -rf /', but I'm more worried about
"rm -rf *" in my home directory. It happened once because I was too
happy switching directories before realising what I was doing in
the wrong directory.
Also, refusing to do it is not the ideal way to go, I think that
if you have two -f's specified it would do it anyway. Just my two
cents of course.
Edwin
 

If you use tcsh for your shell add:
set rmstar
to your .cshrc file. Then anytime you use '*' as an argument to rm it 
will ask you if you are sure you want to do that.

As for adding this kind of oops-proofing. I'm not sure I like the idea 
of completely removing the ability to use / as an argument. How about 
prompting and needing 'yes' as input?

--
Ryan Sommers
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Serial Console / GDB Port

2004-09-29 Thread Ryan Sommers
Is it possible to use the same serial line as the console and GDB port? I
currently have console=comconsole in my loader.conf and am able to break
to the debugger in tip. (I'm Ssh'ing into a box connected via serial line
to the dev box.) I tried setting up gdb on that serial link. Broke into
the debugger in one screen, opened gdb -k kernel.debug in another screen,
when I typed in the target remote /dev/cuaa0 line in gdb though the
garbage printed onto the serial line (beginning of the gdb protocol
session I'm assuming) ended up crashing ddb and panicing the kernel and
I'm unable to access the box over the serial line (and currently don't
have physical access to the box).

Now, I don't think I added the 0x80 flag onto the serial port. Will adding
that flag fix this? Or is there something more I need to do to be able to
enable gdb and a console on the same serial line?


-- 
Ryan Sommers
[EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: jump from kernel to loader

2004-09-22 Thread Ryan Sommers

vijay singh said:
> hello, i have some exposure to the freebsd code, but not extensive. i am
> reading the sys/boot code, and saw that the 3 stage boot process involves
> a
> jump from the loader to the kernel in the last phase. i was wondering if
> it
> is possible to engineer the kernel to jump back to the loader in some
> special cases?
>
> kindly cc me as i am not on the list.
>
> br
> vijay
>

It is my understanding that after jumping to the kernel the kernel assumes
control of all of memory, including where the loader is currently loaded.
In that case it would be impossible to jump back to the loader without
first being sure to reload it into memory.

I could be wrong on this however.

-- 
Ryan Sommers
[EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: gdb attach on 5.3-beta5?

2004-09-21 Thread Ryan Sommers
Short answer, you still need to supply GDB with the executable name. do
'gdb -p  /path/to/executable'.

Long answer: http://00f.net/blogs/index.php/2004/09/11/p98

Hope this helps!

-- 
Ryan Sommers
[EMAIL PROTECTED]

Mike Hunter said:
> Hi,
>
> I am having problems with gdb attach.  I wrote a demo script that just
> prints out it's pid over and over, then tried to sick gdb on it:
>
> #gdb6 program 29353
> GNU gdb 20040720 [GDB v6.x for FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> This GDB was configured as "i386-portbld-freebsd5.2"...program: No such
> file or directory.
>
> Attaching to process 29353
> solib-svr4.c:1307: internal-error: legacy_fetch_link_map_offsets called
> without legacy link_map support enabled.
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Quit this debugging session? (y or n) y
>
> solib-svr4.c:1307: internal-error: legacy_fetch_link_map_offsets called
> without legacy link_map support enabled.
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Create a core file of GDB? (y or n) n
>
> The program itself appears to get KILL, aka it says "Killed".
>
> Same results for gdb and gdb6.  Is this a known issue?
>
> Help will likely enable me to post a question about why my X server is
> crashing :)
>
> Thanks,
>
> Mike
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
>

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


IPFIREWALL_VERBOSE stopped logging?

2004-09-07 Thread Ryan Sommers
I'm trying to figure out why my firewall has stopped logging to
/var/log/security. The last entry was from Aug 17 and there has been at
least one restart and a few hundred thousand packets denied.

FreeBSD * 5.2.1-RELEASE-p8 FreeBSD 5.2.1-RELEASE-p8 #1: Thu Jul  1
18:24:26 CDT 2004 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/MOLEMAN  i386

([EMAIL PROTECTED]):~:#ipfw list | tail -2
03000 deny log tcp from any to any in via xl0 setup
65535 deny ip from any to any

([EMAIL PROTECTED]):~:#sysctl net.inet.ip.fw
net.inet.ip.fw.enable: 1
net.inet.ip.fw.autoinc_step: 100
net.inet.ip.fw.one_pass: 1
net.inet.ip.fw.debug: 1
net.inet.ip.fw.verbose: 1
net.inet.ip.fw.verbose_limit: 0
(truncated)

([EMAIL PROTECTED]):~:#grep security /etc/syslog.conf
security.*  /var/log/security

What am I missing?


-- 
Ryan "leadZERO" Sommers
Gamer's Impact President
[EMAIL PROTECTED]
ICQ: 1019590
AIM/MSN: leadZERO

-= http://www.gamersimpact.com =-

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Question for C++ Experts

2004-07-26 Thread Ryan Sommers
Pardon my sending this to a FreeBSD list. After searching I couldn't
find any other good mailings lists devoted to C++ and this was the
only source I knew of that might have someone that could answer my
question.

I'm working on a project that uses about 3 different coordinate systems and
all are closely related. The only differences are in the bounds and
representation. As a way to represent all of these I came up with
a base class representing the general case and then derived classes
for all the specific systems. As part of my class I use constructors
that take the coordinates as inputs. As a means of bounds checking
I declared a pure virtual function that checks whether it is within
the valid bounds of the derived class. The problem I am running into
is that it seems to be illegal to call a pure virtual function from
an abstract base contructor. I'm not sure exactly why this would be
considered an eror; from what I can think of the dynamic binding would
be no different than for a binding in a non-constructor function.

Anyone know of any tricks to get around this? Or other methods that might
allow me to do the correct bounds checking in the constructor as opposed
to delaying it to a second 'init' type call?

Ryan Sommers
[EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Method of compiling boot0

2004-04-23 Thread Ryan Sommers
I was browsing over the boot0 makefiles and source when I was playing with
some boot sector code of mine and I was wondering why the designers chose
to use objcopy to output a binary file instead of just using the --oformat
option when it's run over the linker.

I'm guessing it's just 6 of one and half dozen of the other but was just
curious incase there was actually some difference.

Ryan

-- 
Ryan "leadZERO" Sommers
Gamer's Impact President
[EMAIL PROTECTED]
ICQ: 1019590
AIM/MSN: leadZERO

-= http://www.gamersimpact.com =-


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: SCM options (was Re: Where is FreeBSD going?)

2004-01-10 Thread Ryan Sommers
Garance A Drosihn wrote:
At 7:27 PM -0800 1/9/04, Pedro F. Giffuni wrote:

Hi;

There is a comparison here:
http://better-scm.berlios.de/comparison/comparison.html
I think there are compelling reasons to try subversion,
but we have to wait for a 1.0 Release, and this would be
something that should be done gradually.. for example
moving the ports tree first.


That's a pretty major test!  Could we perhaps pick off
something smaller?  The "projects" repository, for
instance?  (or is that still tied to the base-system?)
(I am very interested in subversion, but it is still
something I need to learn more about...)
I haven't been following this too closely, so forgive me if this has 
been mentioned. Does Subversion support any type of transaction based 
committing?

One of the frequent problems with CVS is when someone grabs source while 
someone is in the middle of a large or multi-part commit.

--
Ryan Sommers
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Where is FreeBSD going?

2004-01-07 Thread Ryan Sommers
On Wed, 2004-01-07 at 20:29, Nick Rogness wrote:
> 1) Allow for paid development for a specific bug/feature
> 
>- Setup some program that allows users like myself to pay for a 
>   developers time to fix a specific bug.  The company I work for 
>   would easily pay serious dollars to fix our SMP problems with 4.X.
>   Unfortunetly, getting someone's attention that has a great 
>   understanding of the OS is hard to find without rude remarks and 
>   what-not.
> 
>   You could even extend it as far as saying we will promote this PR
>   to the top of the list of tasks if you pay us XX dollars.  Or 
>   maybe, the more you pay the higher you go.
> 
>   This would reassure the user base that things CAN get done if 
>   needed and also let the developer/bug fixer feel like they can 
>   make money and have some fun.  It will also bring in money for the 
>   project as part of that money could go back into the Project.
> 
>   You could easily setup a "pool" mailling list (like -requests) 
>   which someone like myself would email a request with the problem 
>   description (or PR).  If a developer is interested in tackling the 
>   problem for money, we could privately negotiate a price.
> 
>   The same can be done for driver development and others.  Make it a 
>   "Donation for a specific request".  I don't want to give money to
>   some Foundation where money can be thrown around in the wrong 
>   areas.  I want to pay the developer personally for their efforts.  
>   ( I feel the same should be done with our taxes as well ;-) 
> 

I really don't like the idea of making this a "policy," or even some
official part of the project. I think this might discourage some from
contributing in hopes to be paid for it. I think a better solution for
companies looking for this would be to post to the jobs@ mailing list
noting that it is a temp job.

I don't think giving priority to paying entities is a path the project
should tread down. If someone needs FreeBSD developer work they should
look for someone to hire. Something like this might also jeopardize the
project's "not for profit" status. I think the jobs@ mailing list would
be a better start. (I'm going to be looking for a full time job in about
11 months and if I got one where I got to code/administer BSD I'd feel I
was in Heaven.) :-)

> 
> 2) Setup a mailling list for just new developer questions.

This would be a great idea, however, it might be something the hackers@
list was originally intended for. Unfortunately I think no matter what
list you create there will always be those feelings and people that will
speak like that. People just have to remember that although it may sound
as if someone is ridiculing them it might not be there intention. The
Internet is a rather flat medium for communicating emotion.

> 
> 3) Simple but time consuming requests from developers
> 
>   - Isn't it possible to have developers pass off some of 
>   their simple tasks to others?  Think of it like a "pet dog".  
>   Your dog may be able fetch your newspaper but he couldn't read it.
>   Still fetching the newspaper takes time!  
> 
>   The requests I see are usually Jr. kernel type requests.  
>   Everyone wants to contribute at the kernel level but that takes 
>   a lot of knowhow and experience working with fbsd's kernel.  Let
>   users get involved with simple (stupid) tasks which are time 
>   consuming.  Now define "simple"...
> 

Again, I think a JKH (Junior Kernel Hacker) list (like the one PHK had
for awhile) would be a great addition. I'll even volunteer to maintain
it if developers were willing to help me by providing these small
"projects" for people to work on. As someone attempting to join the
ranks of people in the "Submitted by:" log lines this is one of the
hardest things for me to do is find something I can work on.

I think this might be some duplication of the PR database; some PRs are
things that could be accomplished without too much skill. I think the
trouble though is wading through to find these specific issues. Perhaps
such a list could contain cross-references to the PR db.


-- 
Ryan Sommers
[EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: logitech cordless optical mouse problems...

2003-12-30 Thread Ryan Sommers
On Tue, 2003-12-30 at 08:54, Evren Yurtesen wrote:
> I tried to use ums0 device and with moused I tried sysmouse device
> but none makes any effect in X.
> 

Sysmouse is the device moused sets up, you can't just use it. 

Try this:
killall -9 moused
moused -t auto -p /dev/ums0
vidcontrol -m on

if you can see a mouse cursor when you move the mouse around then you
can use that and /dev/sysmouse as your device in X.

Also, do you have usbd running? (ps -xa|grep usbd)
If you don't have usbd running then I don't think you'll get a /dev/ums0
in devfs.

-- 
Ryan "leadZERO" Sommers
Gamer's Impact President
[EMAIL PROTECTED]
ICQ: 1019590
AIM/MSN: leadZERO

-= http://www.gamersimpact.com =-


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: select() in 5.X

2003-12-26 Thread Ryan Sommers
On Fri, 2003-12-26 at 16:39, Yaoping Ruan wrote:
> Not sure if somebody here has already noticed this problem before. I
> have a small program using select() . Though it works correctly on 4.x,
> some problem happens on 5.1. First of all, I notice that macros about
> FD_xx have been moved into sys/select.h. Then FD_ZERO() seems to be
> failed. My program looks like follow:
> 
> main( )
> { ...
> fd_set rfdset;
> 
> FD_ZERO(&rfdset);
> 
> 
> }
> 

I'm unable to duplicate your results. Are you setting FD_SETSIZE
somewhere? Here are my results on 5.2-CURRENT (note sys/select.h hasn't
been changed for 11 months and that log didn't mention the macros):

Script started on Sat Dec 27 00:24:39 2003
[EMAIL PROTECTED](~/src):gdb ./test
GNU gdb 5.2.1 (FreeBSD)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-undermydesk-freebsd"...
(gdb) list 7
2#include 
3
4void
5main()
6{
7int n = _howmany(FD_SETSIZE, _NFDBITS);
8fd_set tset;
9
10FD_ZERO(&tset);
11};
(gdb) break 8
Breakpoint 1 at 0x80484ce: file test.c, line 8.
(gdb) run
Starting program: /usr/home/ryans/src/test 

Breakpoint 1, main () at test.c:10
10FD_ZERO(&tset);
(gdb) print n
$1 = 32
(gdb) print tset
$2 = {__fds_bits = {134513140, 3217025816, 671419022, 134513327,
109760260, 671535104, 
3217025800, 1, 671514200, 3217025816, 671419879, 671547392,
16777216, 671535616, 
671514200, 671514200, 672308176, 3217025864, 671406660, 672307790,
1, 3217025848, 1, 
1, 3217025948, 3217025940, 3217025900, 672308220, 3217025876,
3217025932, 671404993, 
671535104}}
(gdb) next
11};
(gdb) print tset
$3 = {__fds_bits = {0 }}
(gdb) quit
The program is running.  Exit anyway? (y or n) y
[EMAIL PROTECTED](~/src):exit
exit

Script done on Sat Dec 27 00:25:10 2003


-- 
Ryan "leadZERO" Sommers
Gamer's Impact President
[EMAIL PROTECTED]
ICQ: 1019590
AIM/MSN: leadZERO

-= http://www.gamersimpact.com =-


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: A FreeBSD bridge..

2003-12-26 Thread Ryan Sommers
On Fri, 2003-12-26 at 13:47, Sumanth NS wrote:
> Hi!
> 
> I plan to implement a FreeBSD bridge with two
> interfaces connecting my router and my LAN.

> All pointers, ideas and suggestions welcome.

If in doubt check the handbooks first. The doc@ team has a lot of
quality information in there:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-bridging.html

-- 
Ryan "leadZERO" Sommers
Gamer's Impact President
[EMAIL PROTECTED]
ICQ: 1019590
AIM/MSN: leadZERO

-= http://www.gamersimpact.com =-


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Force a dump without panicing?

2003-12-20 Thread Ryan Sommers
Is it possible to force a kernel dump without panicing the system?

I dropped into the debugger and did a "call doadump" however, when I
tried to quit the debugger after this it results in a panic.

-- 
Ryan "leadZERO" Sommers
Gamer's Impact President
[EMAIL PROTECTED]
ICQ: 1019590
AIM/MSN: leadZERO

-= http://www.gamersimpact.com =-


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


FreeBSD VFS System?

2003-12-16 Thread Ryan Sommers
Are there any good web resources or books on the VFS system that the
FreeBSD kernel uses? I'm guessing it might have originated from the
4.4BSD(?) interface. I've been attempting to read through the source
code for different system calls (ie mkdir, rmdir, mount/umount) and
haven't been able to get very far because of the substantial layers of
indirection involved. For this reason I was looking at picking apart the
different subsystems involved and was wondering if there was anything
any more annotated then the source code itself.

Thanks in advance.

-- 
Ryan "leadZERO" Sommers
[EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


x86 Disassembler

2003-08-14 Thread Ryan Sommers
Are there any tools to disassemble an x86 binary file? objdump does a nice 
job on most files. However, I'm messing with some machine-code binary files 
that don't have ELF headers or anything other then the machine-code (ie 
MBR's). I'd like to disassemble them on FreeBSD, possibly to a format that 
G(as) could reassemble. Then I don't have to use something like debug.exe. 

--
Ryan "leadZERO" Sommers
Gamer's Impact President
[EMAIL PROTECTED]
ICQ: 1019590
AIM/MSN: leadZERO 

-= http://www.gamersimpact.com =- 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Assembly Syscall Question

2003-07-31 Thread Ryan Sommers
When making a system call to the kernel why is it necessary to push the 
syscall value onto the stack when you don't call another function? 

Example: 

access.the.bsd.kernel:
int 80h
ret 

func:
mov eax, 4; Write
call access.the.bsd.kernel
; End 

Works. However:
func:
mov eax, 4; Write
int 80h
; End 

Doesn't. 

Now, if you change it to: 

func:
mov eax, 4; Write
push eax
int 80h
; End 

It does work. I was able to find, "By default, the FreeBSD kernel uses the C 
calling convention. Further, although the kernel is accessed using int 80h, 
it is assumed the program will call a function that issues int 80h, rather 
than issuing int 80h directly," in the developer's handbook. But I can't 
figure out why the second example doesn't work. Is the call instruction 
pushing the value onto the stack in addition to pushing the instruction 
pointer on? 

Thank you in advance.
PS I'm not on the list. 



--
Ryan "leadZERO" Sommers
Gamer's Impact President
[EMAIL PROTECTED]
ICQ: 1019590
AIM/MSN: leadZERO 

-= http://www.gamersimpact.com =- 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Playing with Current.

2002-11-21 Thread Ryan Sommers
On Tue, 2002-11-19 at 22:13, Ryan Sommers wrote:
> My question is could I keep and build the CURRENT source tree on the
> FreeBSD desktop, mount it over NFS to the laptop, and install it over
> the NFS mount? 

Is the kernel on the 5.0SP2 ISO built with PCCard support? I installed
from CD-ROM onto a Compaq laptop only to notice nothing about the PCMCIA
Ethernet card I had in the dmesg output. I saw the PCCARD Support
section of the release notes and I'm wondering if this has anything to
do with it.

I'm probably going to have to compile a kernel with either the OLDCARD
support or some other options so my next question, is it possible to
build a -CURRENT kernel on 4.7? I'm getting the following when I tried
to build a kernel for the laptop on my 4.7 workstation. Note: I
installed net/cvsup-mirror and then fetched current with the following
supfile and all of this is run as my cvs user:

*default host=localhost

*default prefix=/usr/home/cvs/
*default base=/usr/home/cvs/
*default release=cvs delete use-rel-suffix
*default tag=.

#cvs-all
src-all



bash-2.05a$ uname -a
FreeBSD lobo 4.7-RELEASE FreeBSD 4.7-RELEASE #5: Fri Nov  8 15:29:17 CST
2002 ryans@lobo:/usr/obj/usr/src/sys/LOBO  i386
bash-2.05a$ make buildkernel KERNCONF=LAPTOP MAKEOBJDIRPREFIX=~
make: no target to make.
"/usr/home/cvs/src/Makefile.inc1", line 141: warning: "make -f /dev/null
-m /usr/home/cvs/src/share/mk  CPUTYPE=dummy -V CPUTYPE" returned
non-zero status

--
>>> Kernel build for LAPTOP started on Thu Nov 21 09:37:05 CST 2002
--
===> LAPTOP
mkdir -p /usr/home/cvs/usr/home/cvs/src/sys
cd /usr/home/cvs/src/sys/i386/conf; 
PATH=/usr/home/cvs/usr/home/cvs/src/i386/usr/sbin:/usr/home/cvs/usr/home/cvs/src/i386/usr/bin:/usr/home/cvs/usr/home/cvs/src/i386/usr/games:/sbin:/bin:/usr/sbin:/usr/bin
  config  -d /usr/home/cvs/usr/home/cvs/src/sys/LAPTOP  
/usr/home/cvs/src/sys/i386/conf/LAPTOP
../../conf/files: coda/coda_fbsd.c must be optional, mandatory or
standard
Your version of config(8) is out of sync with your kernel source.
*** Error code 1

Stop in /usr/home/cvs/src.
*** Error code 1

Stop in /usr/home/cvs/src.
bash-2.05a$

Ryan.

-- 
Ryan "leadZERO" Sommers
[EMAIL PROTECTED]
ICQ: 1019590   AIM/MSN: leadZERO




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Playing with Current.

2002-11-19 Thread Ryan Sommers
First off I wasn't sure which list to send this to: current, hackers or
questions; so if this is the wrong destination my apologies.

Anyway, last year, after years of using Linux, I fell in love with the
FreeBSD project. Now, I've had the desire offer my time and energy to
help development. My problem though is I only have 3 machines where I'm
currently living, 2 desktops and a laptop. I have to leave Windows
installed on one desktop for compatibility and I'd like to leave the
other desktop running 4.x so I have a UNIX computer that I know will
always be working. That leaves me with the laptop to play with 5.0 and
CURRENT. However, the laptop is a puny Cyrix P180+ (I think it's the
MediaGX chip or whatever they were touting a few years back). Doing a
make world or building a kernel would probably take me two weeks, not
the best environment for development. 

My question is could I keep and build the CURRENT source tree on the
FreeBSD desktop, mount it over NFS to the laptop, and install it over
the NFS mount? I know I can do that with 4.x, but I'm wondering if this
is really testing CURRENT if I don't build it on the 5.0 kernel. For now
I really don't think I'll be able to help much with writing anything too
intense; however I noticed in the latest 5.0 release notes that people
have been converting Perl scripts to C and I'm more then capable of
doing that. And I also think the laptop, even though it is slow would be
a usable platform for working on that kind of development.

What are your thoughts on this setup; is it worth my time or should I
just sit idly by until I can get a desktop system to play with CURRENT.
I have a little free time and about 7 years experience programming C in
Linux and UNIX (peanuts compared to most people reading this I imagine)
but I'd like to help a cause I believe in.

Thanks in advance,
Ryan

-- 
Ryan "leadZERO" Sommers
[EMAIL PROTECTED]
ICQ: 1019590   AIM/MSN: leadZERO




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



GDB & Linux binaries.

2002-11-10 Thread Ryan Sommers
Is it possible to use GDB on linux binaries? When I try to run the
program in GDB I get the following errors:

(gdb) run
Starting program: /usr/home/ryans/src/bomb/bomb
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
/lib/libc.so.6: No such file or directory.
(gdb)

I'm guessing this is because the linux libc library file is in
/usr/compat/linux/lib, how do I get GDB to use it instead? Or is it even
possible.

Thanks in advance.

-- 
Ryan "leadZERO" Sommers
Gamer's Impact President
[EMAIL PROTECTED]
ICQ: 1019590
AIM/MSN: leadZERO

-= http://www.gamersimpact.com =-


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Runlevels and opcodes

2002-09-27 Thread Ryan Sommers



On Fri, 2002-09-27 at 11:47, [EMAIL PROTECTED] wrote:
> *** But what does prevent a user-level process from executing
> wild instructions (RESET, traps, other dangerous instructions
> and undocumented features) ?

I'm probably less knowledgeable then you are but in protected-mode
programming isn't the kernel responsible for making sure no programs go
rogue?

-- 
Ryan "leadZERO" Sommers
Gamer's Impact President
[EMAIL PROTECTED]
ICQ: 1019590
AIM/MSN: leadZERO

-= http://www.gamersimpact.com =-


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: runtime

2002-08-16 Thread Ryan Sommers

On Fri, 2002-08-16 at 10:21, Stephen Montgomery-Smith wrote:
> How do I do the following:
> 
> 1)  Find out how much time a program has currently consumed in computer 
> time (something like what the time command outputs - but I want the 
> program to do find this out about itself);

'man 5 procfs' might be a good place to start. 

--
Ryan "leadZERO" Sommers
Gamer's Impact President
[EMAIL PROTECTED]
ICQ: 1019590
AIM/MSN: leadZERO

-= http://www.gamersimpact.com =-


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re:

2002-07-31 Thread Ryan Sommers

Sorry about the double post, I must have hit CTRL+X in Pine while
typing... I was wondering why the message disappeared on me.



-- 
Ryan "leadZERO" Sommers
Gamer's Impact President
[EMAIL PROTECTED]
ICQ: 1019590
AIM/MSN: leadZERO

-= http://www.gamersimpact.com =-



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Assembly, Kernels and Bootstraps

2002-07-31 Thread Ryan Sommers

Greetings,

Recently I became interested in researching and learning whatever I could
about how a computer boots and what is involved. There are probably better
places to get this information but since FreeBSD is my development
environment of choice I thought I would start here.

I just have a few questions that if you could take a few minutes to answer
you would make my day.

Several of the sites I have visited on assembly say it isn't needed
anymore. Is it still needed to write a bootstrap?

Where is a good starting point to just read through some of the Kernel
source? Where is the entry point? I'm on all x86 architecture.

Are there any good references on the Internet or in printed form on the
kernel and how it works, bootsraps or assembly language on FreeBSD?

So far I have bookmarked the following sites, any others you have to add
would be much appreciated:

http://www.xs4all.nl/~smit/asm01001.htm
http://www.r4k.net/mod/
http://www.geocities.com/mvea/bootstrap.htm

Thank you,
Ryan Sommers

-- 
Ryan "leadZERO" Sommers
Gamer's Impact President
[EMAIL PROTECTED]
ICQ: 1019590
AIM/MSN: leadZERO

-= http://www.gamersimpact.com =-



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Assembly Language and writing bootstraps?

2002-07-31 Thread Ryan Sommers

Greetings, I haven't posted here much but I've been watching the list for
awhile. I recently became interested in researching how bootstraps,
kernels and the basic systems of the computer work. One project I would
like to mess with is to just write a very VERY basic "operating system"
that would just boot a machine (from disk of course). The only purpose for
this project is educational experiences along the way. I have a few
questions though for those of you familiar with the topic; I realize there
might be better places to go for these answers but seeing that I like
using FreeBSD as my development platform this seemed like a good place to
start.

Where is the "entry point" in the kernel source? Some place that I can
just start looking to read through some source and take a peak at the
inner workings of the FreeBSD kernel.

Is assembly language required or recommended for writing a bootstrap? (All
my work will be on x86 architecture seeing as I don't own any other types
unless you count countless TI calculators). Most of the ASM information
I've been reading always seems to say assembly isn't needed anymore but it
doesn't say if you can write a 512 byte bootstrap in C.

Are there any good references out there for FreeBSD Kernel Hacking?
Assembly language on x86? Bootstraps, how

-- 
Ryan "leadZERO" Sommers
Gamer's Impact President
[EMAIL PROTECTED]
ICQ: 1019590
AIM/MSN: leadZERO

-= http://www.gamersimpact.com =-



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message