Re: Why was rsh removed from the fixit floppy?

2000-01-20 Thread Jordan K. Hubbard

> I would *strongly* suggest to put rsh/rlogin + tar onto the root
> filesystem. I allways found these commands to be *extremely* useful in
> single user mode with all other partitions unmounted (e.g. when
> reorganizing the structure of my partitions/disks etc.)
> 
> How about it?

I doubt it. :-)

- Jordan


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



UDF approach comments?

2000-01-20 Thread Brian Beattie

As I mentioned earlier, I'm thinking about trying to implement a UDF
filesystem.  I've been thinking how to start and have come up with the
following, and would appreciate any comments.

Waht I was thinking about doing, was first writting, (probably using the
nullfs code a a base) a userfs, that would allow me to run most of the
guts of the filesystem code in a user process. Then I would write the UDF
filesystem to run in a user process.

What do you think, am I nuts?  Is there a better way, a better base for
the userfs?

Brian Beattie| The only problem with
[EMAIL PROTECTED]  | winning the rat race ...
www.aracnet.com/~beattie | in the end you're still a rat



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



Re: Why was rsh removed from the fixit floppy?

2000-01-20 Thread Jan Conrad

Hi again,

On Thu, 20 Jan 2000, Jordan K. Hubbard wrote:

> > I would *strongly* suggest to put rsh/rlogin + tar onto the root
> > filesystem. I allways found these commands to be *extremely* useful in
> > single user mode with all other partitions unmounted (e.g. when
> > reorganizing the structure of my partitions/disks etc.)
> > 
> > How about it?
> 
> I doubt it. :-)

nice rhyme :-)

When I cloned a new machine, I usually booted with the floppies, set up
DOS partitions and disk label and then pulled everyting over by tar and
rsh, thereby overwriting fstab etc. with prepared files. Worked pretty
fast...

What would you suggest how to do it?

>
> - Jordan
>
regards
-Jan



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



How do I allocate 2 blocks of memory?

2000-01-20 Thread Tony Frank (EPA)

Hi,

In my spare time I have been working on a driver for IBM Shared RAM style
token-ring adapters.

So far I am progressing well enough (using Larry Lile's earlier version and
also the NetBSD driver for reference) however I am running into one
particular problem.

The card itself has a block of memory mapped IO ports, size 0x2000, and
another block of SRAM, size 0x4000.

At the moment, I can successfully allocate the MMIO area using something
similar to the following:

struct resource *res;

rid = 0;

res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid,
 0ul, ~0ul, TR_MMIO_SIZE, RF_ACTIVE);
if (res) {
sc->mem_rid = rid;
sc->mem_res = res;
sc->mem_used = size;
return (0);
} else {
return (ENOENT);
}

my config line is:

device tr0 at isa? irq 9 iomem 0xd

My card has been configured to use 0xd for the 0x2000 MMIO, and 0xd4000
for the 0x4000 SRAM...

This then lets me access 0xd - 0xd1fff.

However if I try to use the above code with rid = 1, I get no resource back.

I think I could configure the card to use the range 0xd - 0xd3fff for
the SRAM and then 0xd4000 - 0xd5fff for the MMIO, thus having a continuous
block between 0xd and 0xd5fff that I might be able to allocate in one
hit.   This however seems to be a bit of a workaround.

Essentially I have been using the source from other drivers to try and
understand how the system works, but I am yet to find one that allocates two
sets of memory.

One other issue that I am wondering about is overriding settings provided in
the config file.  If I specify an IRQ of 11, when the card is programmed to
use 9, the bus_alloc_resource will give back an IRQ value of 11, which
causes problems later as the card is using 9.   I can read the IRQ value
that the card is set to, but I'm not sure on the correct procedure to
request that specific IRQ for my driver?

Any suggestions would be most welcome.

Regards,

Tony Frank



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



Re: Why was rsh removed from the fixit floppy?

2000-01-20 Thread Ian Dowse

In message <[EMAIL PROTECTED]
de>, Jan Conrad writes:

>When I cloned a new machine, I usually booted with the floppies, set up
>DOS partitions and disk label and then pulled everyting over by tar and
>rsh, thereby overwriting fstab etc. with prepared files. Worked pretty
>fast...
>
>What would you suggest how to do it?

Unless this has changed recently, the "Emergency Holographic Shell" option
provides ifconfig and mount_nfs. That should allow you to get all the
commands that you need from an NFS server, without even having to wait
for the fixit floppy to load :)

It's a while since I used this, but I remember doing something like:

set -o emacs
ifconfig fxp0 x.x.x.x netmask x.x.x.x
mount_nfs x.x.x.x:/scratch /mnt

/mnt/bin/ln -s /mnt/usr /usr
/mnt/bin/mv /bin /bin.old
/mnt/bin/mv /sbin /sbin.old
/mnt/bin/ln -s /mnt/bin /bin
/mnt/bin/ln -s /mnt/sbin /sbin

where /scratch on the server can contains a minimal /bin, /sbin and
/usr etc. The last few commands could obviously be put in a script on
the server. 

Ian


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



ioctl(... TUNSLMODE ...)

2000-01-20 Thread Brian Somers

Hi,

I know this is a while in coming, but now that I'm looking at getting 
ppp(8) to talk IPv6 (with the help of some KAME patches), I've looked 
at how TUNSLMODE is implemented... it doesn't look good to me.

What's the rationale behind stuffing the entire sockaddr in front of 
the packet ?  AFAIK the only information of any use is the address 
family.

By default, OpenBSD has a u_int32_t in front of every packet (I 
believe this is unconfigurable), and I think this is about the most 
sensible thing to do - I don't see that alignment issues will cause 
problems.

Alfred, this was originally submitted by you.  Do you have any 
argument against me changing it to just stuff the address family 
as a 4-byte network-byte-order quantity there ?

Any other opinions/arguments ?

Cheers.
-- 
Brian <[EMAIL PROTECTED]><[EMAIL PROTECTED]>
     <[EMAIL PROTECTED]>
Don't _EVER_ lose your sense of humour !  <[EMAIL PROTECTED]>




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



Re: ioctl(... TUNSLMODE ...)

2000-01-20 Thread Alfred Perlstein

* Brian Somers <[EMAIL PROTECTED]> [000120 15:30] wrote:
> Hi,
> 
> I know this is a while in coming, but now that I'm looking at getting 
> ppp(8) to talk IPv6 (with the help of some KAME patches), I've looked 
> at how TUNSLMODE is implemented... it doesn't look good to me.
> 
> What's the rationale behind stuffing the entire sockaddr in front of 
> the packet ?  AFAIK the only information of any use is the address 
> family.
> 
> By default, OpenBSD has a u_int32_t in front of every packet (I 
> believe this is unconfigurable), and I think this is about the most 
> sensible thing to do - I don't see that alignment issues will cause 
> problems.
> 
> Alfred, this was originally submitted by you.  Do you have any 
> argument against me changing it to just stuff the address family 
> as a 4-byte network-byte-order quantity there ?
> 
> Any other opinions/arguments ?

No objections, I just did it as an excercise to implement something
in the manpages.

-- 
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]


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



RLIMIT_NPROC can be exceeded via setuid/exec

2000-01-20 Thread Matthew Reimer

My question is, should setuid() fail if the target user's maximum number
of processes (RLIMIT_NPROC) would be exceeded?

Background: in an attempt to manage our webserver to keep too many CGIs
from taking down the machine, I've been experimenting with RLIMIT_NPROC.
This appears to work fine when forking new processes, causing the fork
to fail with error EAGAIN.

However, this didn't solve our problem. We're using Apache with suexec,
and still CGIs would multiply far beyond the specified resource limit. 

Apache forks suexec, which is suid root; fork1() increments the number
of processes for root, unless RLIMIT_NPROC has been exceeded, in which
case the fork fails with EAGAIN.

suexec calls then calls setuid() (before it calls execv), which
decrements root's process count and increments the target user's process
count, but RLIMIT_NPROC is not consulted, and voila, we've just exceeded
the target user's maximum process count.

So should the setuid() fail with EAGAIN (or some such) if the target
user's maximum number of processes would be exceeded? Or would this
break too many programs?

Matt


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



Re: ioctl(... TUNSLMODE ...)

2000-01-20 Thread Brian Somers

> * Brian Somers <[EMAIL PROTECTED]> [000120 15:30] wrote:
> > Hi,
> > 
> > I know this is a while in coming, but now that I'm looking at getting 
> > ppp(8) to talk IPv6 (with the help of some KAME patches), I've looked 
> > at how TUNSLMODE is implemented... it doesn't look good to me.
> > 
> > What's the rationale behind stuffing the entire sockaddr in front of 
> > the packet ?  AFAIK the only information of any use is the address 
> > family.
> > 
> > By default, OpenBSD has a u_int32_t in front of every packet (I 
> > believe this is unconfigurable), and I think this is about the most 
> > sensible thing to do - I don't see that alignment issues will cause 
> > problems.
> > 
> > Alfred, this was originally submitted by you.  Do you have any 
> > argument against me changing it to just stuff the address family 
> > as a 4-byte network-byte-order quantity there ?
> > 
> > Any other opinions/arguments ?
> 
> No objections, I just did it as an excercise to implement something
> in the manpages.

I think the best plan is if I remove TUNSLMODE and introduce (say) 
TUNSIFHEAD.  If I reuse TUNSLMODE, I'll bump into all sorts of 
problems.

Now if someone was to say ``NetBSD does it this way'' I'd be 
interested in copying that :*]

> -- 
> -Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
> 

-- 
Brian <[EMAIL PROTECTED]><[EMAIL PROTECTED]>
     <[EMAIL PROTECTED]>
Don't _EVER_ lose your sense of humour !  <[EMAIL PROTECTED]>




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



No Subject

2000-01-20 Thread Tomoya Yoshida

subscribe



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



Query??

2000-01-20 Thread Saurabh Bhandari

Dear Sir,

I am a M.S. student with major as Computer Science. I am doing an 
independent study with my professor. I have been told that BSD drivers are 
not documented at this point of time. So I would like to document the BSD 
Drivers.

It would be a big help for me if you could answer the following questions:

1)Are BSD drivers not really documented?(I fear that I may not end up 
re-inventing the wheel)

2)I am new in this field. Will it be possible for you to tell me from where 
should I start as I dont have any experience in this field?

Thanking You,

Yours Sincerely,
Saurabh Bhandari
__
Get Your Private, Free Email at http://www.hotmail.com



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



Re: How do I allocate 2 blocks of memory?

2000-01-20 Thread Matthew N. Dodd

On Fri, 21 Jan 2000, Tony Frank (EPA) wrote:
> I think I could configure the card to use the range 0xd - 0xd3fff
> for the SRAM and then 0xd4000 - 0xd5fff for the MMIO, thus having a
> continuous block between 0xd and 0xd5fff that I might be able to
> allocate in one hit.  This however seems to be a bit of a workaround.

I'm not sure how using 1 memory area is a workaround; from your driver
point of view you're just going to be assigning pointers in your softc to
physical memory addresses in that range no?

> Essentially I have been using the source from other drivers to try and
> understand how the system works, but I am yet to find one that allocates two
> sets of memory.

Thats what 'rid' is for; since you can probably ask the card what its
resources are you really don't need to use the ISA hint mechanism; you can
do something like this:

device foo0 at isa? port 0xa20

And let your probe routine dig the rest of the resources out of the
adpater and add them using bus_set_resource(), or you can be more tricky
and use a DEVICE_IDENTIFY method to look for any cards, add devices for
them and assign resources to them.  This would net you a config entry
looking something like this:

device foo0

Anyhow, I can help you out with any of the newbus/resource questions you
may have.  I've got the MCA versions of those boards and will add the
bus front ends to your driver when you've got it ready.  I suggest you
split your driver into the driver proper, and the bus front ends:

if_foo_isa.c
if_foo.c
if_fooreg.h
if_foovar.h

etc...

> One other issue that I am wondering about is overriding settings
> provided in the config file.  If I specify an IRQ of 11, when the card
> is programmed to use 9, the bus_alloc_resource will give back an IRQ
> value of 11, which causes problems later as the card is using 9.  I
> can read the IRQ value that the card is set to, but I'm not sure on
> the correct procedure to request that specific IRQ for my driver?

In your probe routine you may use bus_set_resource(dev, SYS_RES_IRQ, 0,
irq#, 1);

This will override the IRQ that was specified in the config file; you
might want to do a test to see if the configured IRQ is different than the
board IRQ though.

-- 
| Matthew N. Dodd  | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD  |
| [EMAIL PROTECTED] |   2 x '84 Volvo 245DL| ix86,sparc,pmax |
| http://www.jurai.net/~winter | This Space For Rent  | ISO8802.5 4ever |



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



RE: How do I allocate 2 blocks of memory?

2000-01-20 Thread Tony Frank (EPA)

Hi,

>> I think I could configure the card to use the range 0xd -
0xd3fff
>> for the SRAM and then 0xd4000 - 0xd5fff for the MMIO, thus having
a
>> continuous block between 0xd and 0xd5fff that I might be able
to
>> allocate in one hit.  This however seems to be a bit of a
workaround.

> I'm not sure how using 1 memory area is a workaround; from your
driver
> point of view you're just going to be assigning pointers in your
softc to
> physical memory addresses in that range no?

Basically, it would mean manually configuring the card (eg using LANAIDC via
bootable floppy) to have the configuration described above.

Since the card supports having the MMIO and the SRAM in seperate areas,
essentially the driver should support this also.

I'm not sure whether the card will let me arrange the memory locations so
that it's all continuous.

> Anyhow, I can help you out with any of the newbus/resource
questions you
> may have.  I've got the MCA versions of those boards and will add
the
> bus front ends to your driver when you've got it ready.  I suggest
you
> split your driver into the driver proper, and the bus front ends:

Hmm...  I have the "IBM Auto 16/4 Token-Ring Adapter"...  I have about 3
different revisions too, although they all appear to work the same way.  

One issue that I havn't really looked at yet is having the adapter in 'plug
and play' mode.  

So far, if the adapter is in PnP mode, when I do my "normal" probing, it
appears that there is no configuration stored, ie I read 0x0 instead of some
valid details.

I assume that I need to do some form of 'PnP configuration' but I am yet to
start looking into this.

>> One other issue that I am wondering about is overriding settings
>> provided in the config file.  If I specify an IRQ of 11, when the
card
>> is programmed to use 9, the bus_alloc_resource will give back an
IRQ
>> value of 11, which causes problems later as the card is using 9.
I
>> can read the IRQ value that the card is set to, but I'm not sure
on
>> the correct procedure to request that specific IRQ for my driver?

> In your probe routine you may use bus_set_resource(dev,
SYS_RES_IRQ, 0,
> irq#, 1);

> This will override the IRQ that was specified in the config file;
you
> might want to do a test to see if the configured IRQ is different
than the
> board IRQ though.

I think bus_set_resource() is what I'm looking for, as opposed to
bus_alloc_resource()...

One other general sort of question...  is there any kind of description on
how these bus_* functions operate and interact?

I've basically been working my way through a few different drivers and from
other assorted files in the /usr/src/sys area, but although I see examples
of what other drivers are doing, I'm not always sure on why.   It seems to
be mostly luck for me to accidentally stumble on an answer to a question I'm
wondering about...

Thanks for you help,

Tony




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



Re: Harlan Stenn:

2000-01-20 Thread Sheldon Hearn



On Thu, 20 Jan 2000 00:59:53 +0100, Ollivier Robert wrote:

>  Harlan is the *maintainer* of the ntp source tree at udel and
> generates all releases :-) 

Okay, people, relax.  So far, the only person I haven't been chewed
out by for this is Mr. Stenn himself, who seemed to feel that he'd
misposted and wasn't nearly as offended as others have been on his
behalf.

:-P

Ciao,
Sheldon.


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



RE: How do I allocate 2 blocks of memory?

2000-01-20 Thread Matthew N. Dodd

On Fri, 21 Jan 2000, Tony Frank (EPA) wrote:
> Since the card supports having the MMIO and the SRAM in seperate areas,
> essentially the driver should support this also.
> 
> I'm not sure whether the card will let me arrange the memory locations so
> that it's all continuous.

Ah, in that case you just need to add 2 separate resources; you might want
to do something like this:

#define FOO_MEM_RID_MMIO0
#define FOO_MEM_RID_SRAM1

bus_set_resource(dev, SYS_RES_MEMORY, FOO_MEM_RID_MMIO, start, end);
bus_set_resource(dev, SYS_RES_MEMORY, FOO_MEM_RID_SRAM, start, end);

Then, when you're going to call bus_alloc_resource() you'll initialize
'rid' to one or the other of FOO_MEM_RID_{MMIO,SRAM}, depending on which
one you want to deal with.

> One issue that I havn't really looked at yet is having the adapter in 'plug
> and play' mode.  

Ah, PnP is even easier.

> So far, if the adapter is in PnP mode, when I do my "normal" probing,
> it appears that there is no configuration stored, ie I read 0x0
> instead of some valid details.

That makes it easy to skip over the PnP adapters in your IDENTIFY method.

Put an adapter in PnP mode and boot up; make note of the 'unknownN:'
messages; one will be your TR board.  It should have a number of resources
associated with it.

> I assume that I need to do some form of 'PnP configuration' but I am
> yet to start looking into this.

Look at the if_ep driver in sys/dev/ep/; its about the cleanest example
you'll get.  I've got another driver for the TMS380 I'm working on thats
about as widely attached but its not yet ready for the general public so
you'll have to make do with if_ep for your example.

> I think bus_set_resource() is what I'm looking for, as opposed to
> bus_alloc_resource()...

Indeed.  bus_alloc_resource() is what you do in your attach routine when
you're ready to reserve the resource and use it.

> One other general sort of question...  is there any kind of description on
> how these bus_* functions operate and interact?

Not as such, no.  The good news is that the resource manager (such as it
is) and the newbus calls are fairly easy to understand and examples are
available, though in some cases confusing.  Check out sys/kern/subr_bus.c
and sys/kern/subr_rman.c.

> I've basically been working my way through a few different drivers and
> from other assorted files in the /usr/src/sys area, but although I see
> examples of what other drivers are doing, I'm not always sure on why.  
> It seems to be mostly luck for me to accidentally stumble on an answer
> to a question I'm wondering about...

Well, you can do it the trial and error way like I did or you can ask
questions; I feel I've got a pretty good handle on things or at least
enough to field questions.

-- 
| Matthew N. Dodd  | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD  |
| [EMAIL PROTECTED] |   2 x '84 Volvo 245DL| ix86,sparc,pmax |
| http://www.jurai.net/~winter | This Space For Rent  | ISO8802.5 4ever |



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



Re: Query??

2000-01-20 Thread Jordan K. Hubbard

> 1)Are BSD drivers not really documented?(I fear that I may not end up 
> re-inventing the wheel)

I assume that by "drivers" you mean "device drivers" in this context,
e.g. our code for supporting various network interface cards, SCSI
controllers, etc.

They are documented in the sense that there are various files one
refers to when writing a new device drivers in FreeBSD (usually
assorted header files and the sources to at least one related driver)
and the skillful kernel programmer generally knows where to look for
them.  If there were no information at all, new device drivers would
never be written in FreeBSD.

They're not, however, documented in the sense that there's a well
laid-out DDK with lots of examples and high-level architectural
overviews of various subsystems.  The new-bus system, in particular,
is in great need of documentation.

> 2)I am new in this field. Will it be possible for you to tell me from where 
> should I start as I dont have any experience in this field?

Start at the beginning. :)

Seriously, it is a bit like saying "I wish to build and fly my own
experimental airplane.  I have no aviation or aeronautical experience,
however, so could somebody please tell me where I should start?"

Well, perhaps that particular question would be more easily answered
than yours ("with an excellent life insurance policy"), but I think
you get the basic idea.  It's a very broad subject and there are
dozens of individual skills which go into producing a really good doc
set in this area.  That's why it's work usually done by teams when you
get over to the corporate side of things.

- Jordan


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



No Subject

2000-01-20 Thread New Star Service Co.

unsubscribe  freebsd-hackers




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



Re: How do I allocate 2 blocks of memory?

2000-01-20 Thread Warner Losh

In message <[EMAIL PROTECTED]> "Matthew N. Dodd" 
writes:
: Well, you can do it the trial and error way like I did or you can ask
: questions; I feel I've got a pretty good handle on things or at least
: enough to field questions.

Also some drivers are better to look at than others.  ed, ep, and sn
are the ones that I look at as a cheat sheet.  Don't look at aha since
it is old and hasn't been updated enough yet (I'm working on that
right now :-).

Warner



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



Force dynamic linking?

2000-01-20 Thread Nils M Holm


Hello!

Is there any way to force the creation of dynamically linked executables
using the ELF linker (like 'ld -Bforcedynamic' in the a.out version)?

I have to link against static libs, but I want to use dlopen() etc.

Thank you for your help!

Bye,
nmh.

--
Nils M Holm <[EMAIL PROTECTED]>[Please use Reply-To:]
http://www.homepages.de/home/nmh/ -- The home of the T3X compiler



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



does -frepo work in gcc-devel or -current gcc?

2000-01-20 Thread Max Khon

hi, there!

This small program does not build with both -current gcc
(gcc version 2.95.2 19991024 (release), I built collect2 for it
manually) and gcc-devel (gcc version 2.96 2110 (experimental))

--- cut here ---
CXX=g++ -frepo
LD=g++

foo: foo.o
$(LD) -o $* $>

clean:
rm -f foo.o foo foo.rpo
--- cut here ---

--- cut here ---
#include 
#include 

main(void)
{
std::vector v;
std::string s = "foo";
v.push_back(s);
return 0;
}
--- cut here ---

When I tried to compile the same program on Solaris (gcc 2.95.1) and Linux
(gcc 2.95.2) everything went ok but I noticed that collect2 recompiles
foo.cc twice. On FreeBSD foo.cc gets recompiled only once and on the
second pass collect2 bails out in tlink.c:do_tlink after
scan_linker_output() call.

I need -frepo because I'm porting quite large project to FreeBSD
and -frepo is used there heavily. However porting it to Linux was not that
hard.

/fjoe



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



Re: IEEE-488: looking for junk :-)

2000-01-20 Thread Poul-Henning Kamp

In message <[EMAIL PROTECTED]>, "Ray Hyatt Jr." writes:

>Are you interested in external floppy drives with that type
>of bus?

Not really.  The intent of the driver is to interface to ascii
based test/lab equipment, not to apply for membership in the
antique hardware society :-)

--
Poul-Henning Kamp FreeBSD coreteam member
[EMAIL PROTECTED]   "Real hackers run -current on their laptop."
FreeBSD -- It will take a long time before progress goes too far!


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



RE: Force dynamic linking?

2000-01-20 Thread Daniel J. O'Connor


On 20-Jan-00 Nils M Holm wrote:
>  Is there any way to force the creation of dynamically linked executables
>  using the ELF linker (like 'ld -Bforcedynamic' in the a.out version)?
>  
>  I have to link against static libs, but I want to use dlopen() etc.

I think you have to link against the libs you need by hand.. (And don't specify
-Bstatic).. eg ->

gcc foo.o bar.o /usr/local/lib/liba.a -o foo

That way you end up with a dynamic executable with no unresolved symbols. (Been
here done this ;)

---
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum




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



-frepo broken

2000-01-20 Thread Max Khon

hi, there!

seems that i tracked down the problem: ld uses cplus-dem.c from
libiberty (contrib/binutils/libiberty/cplus-dem.c) which differs
from that one gcc is compiled with (contrib/gcc/cplus-dem.c).
When I compiled collect2 with libiberty's cplus-dem.c
everything went ok.

/fjoe



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



Re: -frepo broken

2000-01-20 Thread Max Khon

hi, there!

On Thu, 20 Jan 2000, Max Khon wrote:

> seems that i tracked down the problem: ld uses cplus-dem.c from
> libiberty (contrib/binutils/libiberty/cplus-dem.c) which differs
> from that one gcc is compiled with (contrib/gcc/cplus-dem.c).
> When I compiled collect2 with libiberty's cplus-dem.c
> everything went ok.

sorry, this is really for ports. I mean egcs and gcc-devel ports.
collect2 is not built in base distro yet (but should?)

/fjoe



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



Re: Accessing user data from kernel

2000-01-20 Thread Zhihui Zhang


On Wed, 19 Jan 2000, Arun Sharma wrote:

> In muc.lists.freebsd.hackers, you wrote:
> > 
> > When the kernel wants to access any user data, it either copies them into
> > the kernel or maps them into kernel address space.  Can anyone tell me the
> > reasons why this is done?  When a process enters the kernel mode, the
> > page tables are not changed. 
> > 
> > I have taken this for granted for a long time without knowing the reasons.
> 
> 1. The kernel may be entered asynchronously - from interrupts and traps.
>You can't always be sure of which is the currently running user process.
> 
> 2. For cases where you've entered the kernel synchronously - through syscalls
>for example, you need to check for the validity of data. You could 
>potentially skip the step and validate the data where it is used, rather
>than doing it upfront - but that may mean too many checks. It's just
>cleaner to copyin/copyout once at entry/exit, rather than repeating the
>code all over the place.

Thanks for your reply.  But I am still lost.

Point 1 seems to make sense. If the user data is already copied into the
kernel, we can access it just at any time, i.e., asynchronously. 

Point 2 seems to be saying that we would rather sacrifice some performance
to gain a cleaner interface (people are talking about eliminating kernel
copying for a long time). Consider the physical I/O on a raw device, where
we map the user data again in the KVA without copying the data. Why do we
do this double mapping, when we can access the user data directly?

-Zhihui




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



Re: Accessing user data from kernel

2000-01-20 Thread Ville-Pertti Keinonen


[EMAIL PROTECTED] (Arun Sharma) writes:

> 2. For cases where you've entered the kernel synchronously - through syscalls
>for example, you need to check for the validity of data. You could 
>potentially skip the step and validate the data where it is used, rather
>than doing it upfront - but that may mean too many checks. It's just
>cleaner to copyin/copyout once at entry/exit, rather than repeating the
>code all over the place.

That's only part of the story.

The copyin/copyout interface provides a portable interface.  Some
architectures have efficient ways of keeping separate user and kernel
page tables, so they require that copyin/copyout be done using unusual
methods for access.

Additionally, you often want to access data in a section of code where
page faulting is not acceptable.  Accessing a non-wired memory address
implicitly allows you to block.

Recovering from fatal faults (translating them into errors) is hard to
do properly in C...  All methods of accessing user pages while
avoiding faults are very slow.

So copyin/copyout functions implemented in assembly language are
probably the most convenient way of accessing user data in FreeBSD or
any other similar kernel.


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



Re: Accessing user data from kernel

2000-01-20 Thread Arun Sharma

On Thu, Jan 20, 2000 at 10:04:16AM -0500, Zhihui Zhang wrote:
> Point 2 seems to be saying that we would rather sacrifice some performance
> to gain a cleaner interface (people are talking about eliminating kernel
> copying for a long time). Consider the physical I/O on a raw device, where
> we map the user data again in the KVA without copying the data. Why do we
> do this double mapping, when we can access the user data directly?
> 

Direct I/O to user space should be treated as an optimization. Such I/O
requires wiring down all the user pages before I/O can happen. Hence
it requires special previleges.

Why does it get mapped to KVA ? Because of point 1.

-Arun


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



Re: Why was rsh removed from the fixit floppy?

2000-01-20 Thread Jan Conrad

Hi,

On Wed, 19 Jan 2000, D. Rock wrote:

> > If there are no good reasons, please could somebody put back rsh onto the
> > floppy! Currently I don't see how to do cloning easily without rsh?
> Same here.
> 
> Had some trouble to dump/restore the system from a life 2nd system.
> 
> Finally found a solution:
> Created a named pipe on the system with the cloning device and used
> restore's integrated rsh capability:

thanks for your hint.

But doesnt rrestore use rmt, that is rexecd?
We have no firewall here so using rexecd is giving me some pain...

regards
Jan



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



Re: Why was rsh removed from the fixit floppy?

2000-01-20 Thread Jan Conrad

On Wed, 19 Jan 2000, Jordan K. Hubbard wrote:

> > Why was it removed?
> > If there are no good reasons, please could somebody put back rsh onto the
> > floppy! Currently I don't see how to do cloning easily without rsh?
> 
> The fixit floppy is very full and its days as a truly useful tool are
> sort of numbered.

Well - after thinking on this for a while I'd still suggest to eliminate
telnet in favor of rsh/rlogin. The reason is that you can really do a
*lot* of things with rsh (especially compared to telnet..)

I now resolved the problem by mounting the root dir of the other machine
by nfs and copying directly from that. Doing this I found - to my great
surprise - that FreeBSD's root filesystem neither contains rsh/rlogin nor
tar!!

I would *strongly* suggest to put rsh/rlogin + tar onto the root
filesystem. I allways found these commands to be *extremely* useful in
single user mode with all other partitions unmounted (e.g. when
reorganizing the structure of my partitions/disks etc.)

How about it?

> 
> > By the way: How about putting the boot + fixit stuff onto a cdrom
> 
> That's what CD #2 of every Walnut Creek CDROM product is.

Sounds good... Does it contain rsh/rlogin + tar??

Anyway - supporting FreeBSD by buying the CDROMs is a great idea - no
doubt... But shouldn't be there a way of installing FreeBSD with CDROMs
instead of floppies - I mean with a *small* iso image of some megabytes
length to do the rest over the network (think of STABLE...).


> 
> - Jordan
> 
regards
Jan



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



Re: Why was rsh removed from the fixit floppy?

2000-01-20 Thread David Scheidt

On Thu, 20 Jan 2000, Jan Conrad wrote:

> I now resolved the problem by mounting the root dir of the other machine
> by nfs and copying directly from that. Doing this I found - to my great
> surprise - that FreeBSD's root filesystem neither contains rsh/rlogin nor
> tar!!
> 

dms@rally3 ~ 239$ which pax
/bin/pax





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



NFS/AMD interop failure with Solaris

2000-01-20 Thread Robert Withrow

Trying to use AMD mounted filesystems on FreeBSD 3.2 served
on a Solaris 2.6 system fails.  Navigating to a directory
and doing a "ls" hangs.  In my case, other NFS/AMD operations
still succeed.  This was all working before the server was
upgraded from Solaris 2.5 to 2.6.  Ideas or assistance
gladly accepted.

I would normally post this to questions, except I notice a
similar complaint, posted in November, that never received
a reply...

Client details:

bash-2.03$ uname -a
FreeBSD tuva.engeast.baynetworks.com 3.2-RELEASE FreeBSD 3.2-RELEASE #0: Tue May 18 
04:05:08 GMT 1999 jkh@cathair:/usr/src/sys/compile/GENERIC  i386
bash-2.03$ amq -m | grep tannu
tannu:/net/tannu  /a/net/tannu/root  host1   
tannu.engeast.baynetworks.com is up
bash-2.03$ cat /etc/amd/amd.net
# Generated by genamd V1.1 on Wed Nov 10 19:05:36 1999

/defaults type:=host;fs:=${autodir}/net/${rhost}/root;rhost:=${key}
* 
opts:=rw,soft,intr,nodev,nosuid,grpid,resvport,vers=2,proto=udp,rsize=8192,wsize=8192,noconn

Server details:
bash-2.03# uname -a
SunOS tannu 5.6 Generic_105181-17 sun4u sparc SUNW,Ultra-5_10
bash-2.03# share
-   /t115   rw   "local filesystem" 
-   /opt/views   rw   ""  
-   /view/bob-1/tree/bac   rw   ""  
-   /view/bob-1/tree/bacvob1   rw   ""  
-   /view/bob-1/tree/bacvob2   rw   ""  
-   /view/bob-1/tree/bacvob3   rw   ""  
-   /view/bob-1/tree/bacvob4   rw   ""  
-   /view/bob-1/tree/bcc   rw   ""  

-- 
Robert Withrow -- (+1 978 288 8256)
[EMAIL PROTECTED]



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



rpc.lockd

2000-01-20 Thread David E. Cross

It is almost done.  A working and very lightly tested version of the code will
be made available on Monday (Jan 24).  It should be considered alpha quality,
I would not recommend running important NFS servers with this code.

--
David Cross   | email: [EMAIL PROTECTED] 
Acting Lab Director   | NYSLP: FREEBSD
Systems Administrator/Research Programmer | Web: http://www.cs.rpi.edu/~crossd 
Rensselaer Polytechnic Institute, | Ph: 518.276.2860
Department of Computer Science| Fax: 518.276.4033
I speak only for myself.  | WinNT:Linux::Linux:FreeBSD


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