Re: De-setgid-ifying ipcs(1)

2001-05-18 Thread Peter Wemm

Alfred Perlstein wrote:
> * Dima Dorfman <[EMAIL PROTECTED]> [010518 01:05] wrote:
> > Hi folks,
> > 
> > ipcs(1) is currently installed as setgid kmem.  This isn't good for
> > obvious reasons.  Moreover, the information it needs is easily
> > exported via sysctl.  Below is a patch which adds the necessary sysctl
> > oids and changes ipcs(1) to use them.
[..]
> I'm glad you kept kmem backwards compatibility, as this is required
> for post mortem analysis of crashdumps.

Yes. Thanks!  (and the same from me about the !use_sysctls thing)

Does anybody feel like fixing netstat(1) while we're at it?

Cheers,
-Peter
--
Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
"All of this is for nothing if we don't go to the stars" - JMS/B5


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



Re: De-setgid-ifying ipcs(1)

2001-05-18 Thread Kris Kennaway

On Fri, May 18, 2001 at 01:16:35AM -0700, Peter Wemm wrote:
> Alfred Perlstein wrote:
> > * Dima Dorfman <[EMAIL PROTECTED]> [010518 01:05] wrote:
> > > Hi folks,
> > > 
> > > ipcs(1) is currently installed as setgid kmem.  This isn't good for
> > > obvious reasons.  Moreover, the information it needs is easily
> > > exported via sysctl.  Below is a patch which adds the necessary sysctl
> > > oids and changes ipcs(1) to use them.
> [..]
> > I'm glad you kept kmem backwards compatibility, as this is required
> > for post mortem analysis of crashdumps.
> 
> Yes. Thanks!  (and the same from me about the !use_sysctls thing)
> 
> Does anybody feel like fixing netstat(1) while we're at it?

Thomas Moestl has patches for most of the setgid kmem applications -
they were posted to -arch a while back, but didn't get all that much
review.

See http://people.FreeBSD.org/~tmm/ for the patches.

Kris

 PGP signature


Request for CDR/CDRW drives working status

2001-05-18 Thread Søren Schmidt


I've decided to do a quick poll on which CDR/CDRW drives people
have that either work or doesn't work.

I'll collect all the info and make a web page that will show
which drives are supported, and which are not, and hopefully
this will help me find a solution that works for all.

Please send a message to [EMAIL PROTECTED] with [CDR INFO] in
the subject, stating:

Drive model/version (from dmesg and possibly  from the label on the drive).

Does it work with burncd ?

If it fails, please add the error messages from the kernel from a
failed burn so I have something to go by.

Does it work with PIO and/or DMA ?

Thanks!

-Søren

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



Re: How to transfer data from netgraph node to user program?

2001-05-18 Thread Roman V. Palagin

On May 17, at 1:04pm -0700, Archie Cobbs wrote:

> > The question is: how I can initiate smth. like asynchronous reply (so I
> > can get data via NgRecvMsg later in my prgram)? Or I'm going wrong way and
> > should use another scheme for data transfer? Data size ranges from 10Kb to
> > 500Kb.
>
> Whenever you're ready to send the reply, just create one and send it.

It doesn't work. This is fragment of my code:

user-level program:


token = NgSendMsg(..., NGM_XXX_SHOW, ...);
/* XXX not reached until ng_xxx_msg() returns */
for(;;) {
...
error = NgRecvMsg(...)
...
}

netgraph node:

/*
 * Process control messages
 */
int
ng_xxx_msg()
{

case NGM_XXX_SHOW:
error = ng_xxx_show_data()
goto out;

out:

return (error);
}

/*
 * send collected data
 */
int
ng_xxx_show_data()
{
for(;;) {
get_next_data_item();
if (no_more_data)
break;
NG_MKRESPONSE()
error = ng_send_msg()
}
return (error);
}

When size of collected data about 10Kb, all works fine. But when I need to
send 400Kb in reply - oops, ng_xxx_show_data() returns ENOBUFS (I think
because ng_socket receive queue is full, nobody reads from socket). So, I
don't understand how I can transfer large amount of data :-\ Any ideas?

 - Roman
---
Any opinions in this posting are my own and not those of my present
or previous employers.


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



Re: Request for CDR/CDRW drives working status

2001-05-18 Thread Alexey V. Neyman

Hello, Soren!

>Drive model/version (from dmesg and possibly  from the label on the drive).
I've sent you info about
acd0:  CD-RW drive
(PR: 25840), I think it was complete enogh for poll? :)

Best regards,
Alexey.



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



Re: How to transfer data from netgraph node to user program?

2001-05-18 Thread Archie Cobbs

Roman V. Palagin writes:
> When size of collected data about 10Kb, all works fine. But when I need to
> send 400Kb in reply - oops, ng_xxx_show_data() returns ENOBUFS (I think
> because ng_socket receive queue is full, nobody reads from socket). So, I
> don't understand how I can transfer large amount of data :-\ Any ideas?

FreeBSD 4.x will not allow a context switch from within the kernel.
Therefore, it is possible to overflow a socket if you keep adding
data to it without leaving the kernel... because the user process
never gets a chance to read the data.

Maybe you can set a short timeout in your node after writing a
certain amount of data, return, and then write some more when
the timer goes off.

-Archie

__
Archie Cobbs * Packet Design * http://www.packetdesign.com

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



Re: ifindex

2001-05-18 Thread JINMEI Tatuya / $B?@L@C#:H(B

> On Fri, 18 May 2001 06:06:55 +0100 (BST), 
> vishwanath pargaonkar <[EMAIL PROTECTED]> said:

> why is ifindex used for an interface.i know it is said
> itz for unique identification of device.Can we not do
> that using interfac name ?

Yes, you could.  But then

- we should do string comparison to compare two interface indices
 (which is usually much heavier than comparing integers).
- we should check all interface names in order to check the validity
  of a given interface index (i.e. name).

and I believe we'll still see much more weird situations if we
eliminate numeric interface indices.

JINMEI, Tatuya
Communication Platform Lab.
Corporate R&D Center, Toshiba Corp.
[EMAIL PROTECTED]

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



md disks more than one from a kldload?

2001-05-18 Thread Jaye Mathisen


I kldload md.ko.  First md device comes up just peachy.

however, attempts to now create an md1 fail with device not
configured.

It is not obvious to me what flag needs to be passed
or how I can get 3 or more MD disks when using the module.

Is the only way to compile it into the kernel with
pseudo-device md 3?

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



Re: md disks more than one from a kldload?

2001-05-18 Thread Andrew Gallatin


Jaye Mathisen writes:
 > 
 > I kldload md.ko.  First md device comes up just peachy.
 > 
 > however, attempts to now create an md1 fail with device not
 > configured.

If you're feeling brave, I just back ported the all-singing /
all-dancing md device from -current today (I wanted a
size-configurable, non MFS malloc disk for something).  I haven't
pushed it very hard, but multiple disks appear to work from a module.

Apply the patch at http://people.freebsd.org/~gallatin/md.diff
Then grab sys/sys/mdioctl.h and sbin/mdconfig from -current.
You'll need to make the mdctl device node yourself (95, 0x00ff)

If anybody else feels like testing this, please do so.  Is there
some interest an MFC?

Cheers,

Drew

--
Andrew Gallatin, Sr Systems Programmer  http://www.cs.duke.edu/~gallatin
Duke University Email: [EMAIL PROTECTED]
Department of Computer Science  Phone: (919) 660-6590

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



Re: md disks more than one from a kldload?

2001-05-18 Thread Warner Losh

In message <[EMAIL PROTECTED]> Andrew Gallatin writes:
: If anybody else feels like testing this, please do so.  Is there
: some interest an MFC?

If this fixes the problem where sometimes the system would hang when
writing to MFS, there'd be a large interest.  However, there'd be
little interest in killing MFS in -stable.

Warner

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