Linux-Development-Sys Digest #757, Volume #8     Tue, 29 May 01 16:13:12 EDT

Contents:
  linux process monitoring using java??? ("Ben Tan")
  Re: unresolved symbol: open_namei (Sumithra Ramanathan)
  chainge in struct sk_buff doesn't quite work ([EMAIL PROTECTED])
  Re: what does the prefix "__" mean (Michael Meissner)
  Sharing interrupts with Real Time driver (Iwo Mergler)
  Re: scsi tape robotic changer question (bill davidsen)
  Re: Kernel (mal)function after harmless driver Segmenttion Error (bill davidsen)
  block keyboard (Mirek)
  Re: linux smp/RT development question. (bill davidsen)
  Re: Lilo question (bill davidsen)
  Re: is there a way to password protect LILO? (bill davidsen)
  Re: Crypto API/filesystems (J.H.M. Dassen (Ray))
  Re: block keyboard ("Norm Dresner")
  Re: Kernel (mal)function after harmless driver Segmenttion Error ("Norm Dresner")
  Prob. w/ mem mapped ISA card ("Jason M. LaPenta")
  Re: Kernel (mal)function after harmless driver Segmenttion Error

----------------------------------------------------------------------------

From: "Ben Tan" <[EMAIL PROTECTED]>
Subject: linux process monitoring using java???
Date: Mon, 28 May 2001 12:27:06 +0800

hi,
    I would like to know if there is any program utilies like top that I can
use to extract each process uptime? I can't find any info about the /proc/
directory that I can parse to extract the info. I would be greatly
appreciated if any of you can help ....thanxs...

regards
ben





------------------------------

From: Sumithra Ramanathan <[EMAIL PROTECTED]>
Subject: Re: unresolved symbol: open_namei
Date: Tue, 29 May 2001 11:15:08 -0500
Reply-To: [EMAIL PROTECTED]

Yes it is my code. I now understand that open_namei is not exported.

Thanks
Sumithra

Alexander Viro wrote:

> In article <[EMAIL PROTECTED]>,
> Sumithra Ramanathan  <[EMAIL PROTECTED]> wrote:
> >I am trying to get the driver upgraded for 2.4.x . That's when I see this
> >error. I am not trying to downgrade the kernel version.
>
> There is no chance to do that unless you have the source of driver.
> If you do - well, it can be ported, but it may be nontrivial. Is it
> your code?
>
> --
> "You're one of those condescending Unix computer users!"
> "Here's a nickel, kid.  Get yourself a better computer" - Dilbert.


------------------------------

From: [EMAIL PROTECTED]
Subject: chainge in struct sk_buff doesn't quite work
Date: Tue, 29 May 2001 16:56:48 GMT

Hello,

I want to add a member to the struct sk_buff:
unsigned int newmember;
Obviously this is no problem.
Then I want a newly made sk_buff variable's newmember to be 0:
In skb_headerinit() (net/core/skbuff.c) I add the line:
skb->newmember = 0;

Because it oopses everytime (shortly or directly after the login
screen) I tested the kernel with only these 2 changes... It still
oopses. Everytime in 'process swapper'. Because the oops always halts
my system I can't debug it.

Does anyone know what I am missing?

cheers,
Bart

------------------------------

Subject: Re: what does the prefix "__" mean
From: Michael Meissner <[EMAIL PROTECTED]>
Date: 29 May 2001 13:04:36 -0400

[EMAIL PROTECTED] (yingyi) writes:

> hi, some functions in the kernel source has a prefix "__". anynoe can tell me
> what this prefix means?  Thanks!

Note, under the ISO C standard, any name that is prefixed with either __ or _
followed by an upper case letter is reserved for any use by the compiler or
library system.  GCC uses __*__ names to create new keywords for instance.

-- 
Michael Meissner, Red Hat, Inc.  (GCC group)
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:     [EMAIL PROTECTED]           phone: +1 978-486-9304
Non-work: [EMAIL PROTECTED]   fax:   +1 978-692-4482

------------------------------

Date: Tue, 29 May 2001 18:39:13 +0100
From: Iwo Mergler <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Sharing interrupts with Real Time driver


Hi,

I'm having an interrupt conflict between my USB controller
and a a custom PCI card. As far as I can tell, there is no 
way to physically move either device to a different interrupt 
line (and I don't really want to).

The PCI card driver is running under Real Time Linux. I tried
to pass the pending interrupt to the non real-time part of the
kernel using this code fragment within the real time ISR:

unsigned int  handler(unsigned int irq_number, struct pt_regs *p) {

        unsigned long tmp;
        
        /* If the interrupt is not originating from card, schedule it for unreal-time 
*/
        if (!Bit(EPLD_New_Block,inl(RegBase+EPLD_Status))) {
                rtl_global_pend_irq(cInt);
                rtl_hard_enable_irq(cInt);
                return 0;
        }

        ...
        Real Time ISR code
        ...

        rtl_hard_enable_irq(cInt);
        return 0;

}

Unfortunately, it still doesn't work. Every time the driver
for the USB controller is loaded (with the real time driver
running), the system just freezes and needs a reset. The same
thing happened without the mentioned code.

Do you have any idea what I'm missing here?

Thanks,

Iwo

------------------------------

From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: scsi tape robotic changer question
Date: Tue, 29 May 2001 17:45:52 +0000 (UTC)

In article <[EMAIL PROTECTED]>,
Gene Heskett <[EMAIL PROTECTED]> wrote:

| You sound like you're familiar with devices, and I have a device
| problem.  I just bought a new Seagate 4586 for backing things up. 
| 
| During bootup, after setting the SCAN_ALL_LUNS in the kernel config and
| rebuilding it, the changer robot in the tape drive is found, at the same
| address, 0,0,6 as the drive itself, but the drive is LUN=0 where the
| changer is LUN=1.

  So far so good.

| If i address the drive at /dev/tape which is a link to /dev/nst0, then
| where does the changer show up for mtx, and/or amanda's amtape utility?
| 
| I seem to be getting errors from /dev/sg for some of the sample command
| lines I've tried, and the last I heard, sg was my cd burner here at home.

  You should have /dev/sg0, sg1, etc. I would expect sg1 to be the
changer here, if you have your CD burner as sg0. SHould be major 21,
minor 1 unless you use devfs, in which case you're on your own!

  Let me know if this helps.

-- 
  bill davidsen <[EMAIL PROTECTED]>  CTO, TMR Associates, Inc
At LinuxExpo Sun was showing Linux applications running on Solaris.
They don't get it, the arrow points the other way. There's a reason why
there's no SolarisExpo, Solaris is a tool; Linux is a philosophy, a
religion, a way of life, and only incidentally an operating system.

------------------------------

From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: Kernel (mal)function after harmless driver Segmenttion Error
Date: Tue, 29 May 2001 17:59:19 +0000 (UTC)

In article <teBO6.36702$[EMAIL PROTECTED]>,
Norm Dresner <[EMAIL PROTECTED]> wrote:

| Yesterday, after finally getting the driver working, I intentionally
| introduced a controllable segmentation fault into it via an ioctl-code which
| tried to read from the raw PCI address -- not the ioremap-ed virtual address
| that I know works.  That's all it did: read a word from this address into a
| local variable and if successful print it out via printk().
| 
| And, exactly as before, after the segmentation fault, the system log was
| inoperative.  This time I know that there was no clobbering of kernel code.
| So ...  I ask again:  Why does the system log either die or hang after any
| segmentation error?

  I think the term "harmless driver Segmenttion Error" is an oxymoron. I
don't know if disabling logging is deliberate good practice to avoid
(further?) filesystem corruption, or just a happy accident, but drivers
are supposed to be doing error checking and returning bad status to the
calling program. A SEGV in a driver or other part of the kernel is not
like belching at a beer party, there is no "'scuse me" system call to
say that you are sure it's okay.

  I would be interested to know if this is by design, but not enough to
read the source, at least this week.

-- 
  bill davidsen <[EMAIL PROTECTED]>  CTO, TMR Associates, Inc
At LinuxExpo Sun was showing Linux applications running on Solaris.
They don't get it, the arrow points the other way. There's a reason why
there's no SolarisExpo, Solaris is a tool; Linux is a philosophy, a
religion, a way of life, and only incidentally an operating system.

------------------------------

From: Mirek <[EMAIL PROTECTED]>
Subject: block keyboard
Reply-To: [EMAIL PROTECTED]
Date: Tue, 29 May 2001 18:09:00 GMT

Hi

What is the right way to block and unblock keyboard from a program,
preferably using I/O commands or ioctl()?

...
#define KEYPORT 0x060
...
outb( 0x??, KEYPORT); 
         ^^^^-- What shall I insert here?

-- 
Mirek

------------------------------

From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: linux smp/RT development question.
Date: Tue, 29 May 2001 18:08:20 +0000 (UTC)

In article <[EMAIL PROTECTED]>, Klaas-Henning  <[EMAIL PROTECTED]> wrote:

| thanks for your answer. i looked at rtlinux before and it would definetly
| solve the problem and using it will be one approach to implement a solution.
| 
| but to achieve a comparable solution by modifying the standard linux kernel
| would give me the opportunity of using every linux system call (which is
| included
| in any -must have- rt-modifications).
| 
| in rtlinux it's not possible to use any linux system calls for rt purposes
| and it would be neccessyry to reimplement everything and one isn't able
| to use the great number of hardware and algorythms linux offers.

  As long as you realize that some system calls do not produce
deterministic clock time delays. You probably would be getting more
result for less effort if you ran your RT process and had it use a
standard Linux process to do the possibly slow things. Shared memory
comes to mind as one possible way to do this, depending on data rate.

  It also means you will have great portability, instead of maintaining
your own patches of the kernel into the future.

  Note that if you use non-RT system services, you may need them faster
than the kernel can provide them, and your RT process will either block
and stop being RT, or it must gracefully cope with unavailable services.
I'm sure you know this, but it's worth saying as a discussion point.

-- 
  bill davidsen <[EMAIL PROTECTED]>  CTO, TMR Associates, Inc
At LinuxExpo Sun was showing Linux applications running on Solaris.
They don't get it, the arrow points the other way. There's a reason why
there's no SolarisExpo, Solaris is a tool; Linux is a philosophy, a
religion, a way of life, and only incidentally an operating system.

------------------------------

From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: Lilo question
Date: Tue, 29 May 2001 18:21:13 +0000 (UTC)

In article <KCNQ6.2553$[EMAIL PROTECTED]>,
Hugin <[EMAIL PROTECTED]> wrote:

| It's not a "real" SCSI card, eg. its an IDE Raid card: Promise FastTrak100.
| Its got its own BIOS, and I have windows installed on a 90GB raid array,
| which boots just fine if my MB-bios is set to boot SCSI.
| 
| MB-BIOS and OSes treats it as a SCSI card. My problem is that the controller
| is not supported under linux, so lilo can't see it. Therefore I cannot add a
| bootline to lilo either. If you know how, please let me know!

  I think your BIOS is confused... It sounds as if the "SCSI" setting
really means to use the BIOS on the controller. Try booting a CD like
Slackware or Redhat (rescue) and see if you have hda and hdb or some
such available. I thought that the Promise controller made the multiple
drives look like a single drive at the register level, but I just read
the advertising blurb.

  Also... there is support (experimental) for Promise 4030 and 5030
chipsets, you might try using that in 2.4.5 or so and see if it helps.

-- 
  bill davidsen <[EMAIL PROTECTED]>  CTO, TMR Associates, Inc
At LinuxExpo Sun was showing Linux applications running on Solaris.
They don't get it, the arrow points the other way. There's a reason why
there's no SolarisExpo, Solaris is a tool; Linux is a philosophy, a
religion, a way of life, and only incidentally an operating system.

------------------------------

From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: is there a way to password protect LILO?
Date: Tue, 29 May 2001 18:28:09 +0000 (UTC)

In article <[EMAIL PROTECTED]>,
Anonymous  <[EMAIL PROTECTED]> wrote:
| Is there a way to password protect LILO
| so some random person can't just
| type 
|   linux 1
| at the prompt and get into single user mode?

  If you read the doc (not just the man page) there is a password, which
can be used either to prevent any operations on the boot line, or to
prevent options, so that you could allow users to choose Linux or
Windows, but not get single user mode on Linux.

-- 
  bill davidsen <[EMAIL PROTECTED]>  CTO, TMR Associates, Inc
At LinuxExpo Sun was showing Linux applications running on Solaris.
They don't get it, the arrow points the other way. There's a reason why
there's no SolarisExpo, Solaris is a tool; Linux is a philosophy, a
religion, a way of life, and only incidentally an operating system.


------------------------------

From: [EMAIL PROTECTED] (J.H.M. Dassen (Ray))
Subject: Re: Crypto API/filesystems
Date: Sun, 27 May 2001 20:44:46 +0200

Jonathan Buzzard <[EMAIL PROTECTED]> wrote:
> Patched my kernel (2.4.3 with XFS patches) for the crypto stuff so I can
> have a loopback encrypted filesystem. No problems with that and the kernel
> looks to be working fine.
> 
> Next step is the patched losetup and mount. The patches left in
> Documenation/crypto are for util-linux-2.10b which is sort of
> ancient

Hmmm? patch-int-2.4.3.1 (the latest one; found at
ftp://ftp.kernel.org/pub/linux/kernel/crypto/v2.4) contains a util-linux
patch for 2._11_b, which is fairly recent.

HTH,
-- 
Ray Dassen <[EMAIL PROTECTED]>

------------------------------

From: "Norm Dresner" <[EMAIL PROTECTED]>
Subject: Re: block keyboard
Date: Tue, 29 May 2001 19:14:11 GMT

Mirek <[EMAIL PROTECTED]> wrote in message
news:0BRQ6.5393$[EMAIL PROTECTED]...
> Hi
>
> What is the right way to block and unblock keyboard from a program,
> preferably using I/O commands or ioctl()?
>
> ...
> #define KEYPORT 0x060
> ...
> outb( 0x??, KEYPORT);
>          ^^^^-- What shall I insert here?

Exactly what are you trying to accomplish here?  Preventing the user from
terminating a program with ^C?  Then you have to handle signals.  That's an
application development issue, not a system issue and you should post a
meaningful question to places like
        comp.os.linux.development.system
   and
        comp.unix.programming

Also, except in unusual circumstances, no user program should ever do direct
I/O.  In the case of the keyboard, it many not even be connected to your
application.

    Norm




------------------------------

From: "Norm Dresner" <[EMAIL PROTECTED]>
Subject: Re: Kernel (mal)function after harmless driver Segmenttion Error
Date: Tue, 29 May 2001 19:29:38 GMT

bill davidsen <[EMAIL PROTECTED]> wrote in message
news:9f0o1m$a77a$[EMAIL PROTECTED]...
> In article <teBO6.36702$[EMAIL PROTECTED]>,
>   I think the term "harmless driver Segmenttion Error" is an oxymoron. I
> don't know if disabling logging is deliberate good practice to avoid
> (further?) filesystem corruption, or just a happy accident, but drivers
> are supposed to be doing error checking and returning bad status to the
> calling program. A SEGV in a driver or other part of the kernel is not
> like belching at a beer party, there is no "'scuse me" system call to
> say that you are sure it's okay.
>
>   I would be interested to know if this is by design, but not enough to
> read the source, at least this week.
>
> --

The history of this is that about a month ago I had a driver crash with a
SEGV and found that the system log was disabled for all parts of the kernel
until I rebooted.  Several readers of this NG suggested that it may have
happened because I had inadvertently clobbered something in the kernel.
While I was almost positive that it happened while trying to
copy_from_user() from a bad address to my own memory region, I couldn't
absolutely disprove this conjecture.  But, of course, debugging the module
was first priority.

After I succeeded in getting that driver to (what I'm 99+% sure is) 100%
functional, I wanted to test the various theories that had been propounded
to explain what I had observed.  The first thing I did was to introduce an
intentional SEGV into an already debugged ioctl()-call.  This was done by
trying to dereference the pointer
        int        *pBad = 0xD0000;
where this address was the ISA-bus address of the board I was dealing with
at the time;  I had a virtual address from ioremap() (something like
0xC00D0000 IIRC) but I knew that there was nothing addressable at the
virtual address associated with pBad.  The entire system load was known
since this is a machine (which will eventually become an embedded
controller) which was connected to no network and I was the sole user and
knew exactly what was running (except for cron, but several repetitions of
the experiment could discount that too).
    This is, in this context, a "harmless driver Segmentation Error".
There is no memory that can be clobbered by this because the code was
something like
        int        *pBad = 0xD0000;
            ...
        printk( KERN_ERR "Reading from Bad pointer I get %08X\n" , *pBad );

The result is that the system log is disabled/hung/crashed/...  It ceases to
function.  No driver that I had loaded -- but inactive because I also
controlled all physical input to the computer -- could log any activity to
the logfile.


So...  My question still remains:  Why, even after a totally harmless SEGV
error in a module, does the system log cease to function.  I conjectured
that the printk-statement might have locked the log even before all data was
available for it.  I agree it's a WAG,  but I couldn't think of another
mechanism that would "lock" the system log.  Can you?

    Norm




------------------------------

From: "Jason M. LaPenta" <[EMAIL PROTECTED]>
Subject: Prob. w/ mem mapped ISA card
Date: Tue, 29 May 2001 15:38:06 -0400

Hello.

I'm trying to figure out why I can't access my custom built ISA card on
my linux box. It supposedly works fine with some ISA tester under WinNT
that someone else checked the board out with.

As a fundamental test I searched through the ISA memory 0xA0000 -
0xFFFFF to see what was there with both the board in the machine and the
board out of the machine. In both cases I got the same result. Here's
the code I ran via IOCTRL. Other cards show up when I test byte by byte,
but nothing shows up when I test word by word ( my custom card is a
16bit isa card ). Am I doing something wrong or is my card not working?

Thx in advance
Jason

int index = 0;
unsigned short int testw = 0;
unsigned short int savew = 0;
int good = 0;

printk( "scan : debug information\n" );
printk( "scan : searching for memory\n" );

for( index = 0xA0000; index < 0xFFFFF; index++ )
{
        savew = isa_readw( index );
        isa_writew( 0x5555, index );
        testw = isa_readb( index ); 
        if( testw == 0x5555 && good == 0 )
        {
                printk("0x%x", index);
                good = index;
        }
        else if( testw != 0x5555 && good != 0 && index != (good + 1) )
        {
                printk(" - 0x%x \n", (index - 1));
                good = 0;
        }
        else if( testw != 0x5555 && good != 0 )
        {
                printk(", ");
                good = 0;
        }
        isa_writeb( savew, index );
}

------------------------------

From: [EMAIL PROTECTED] ()
Subject: Re: Kernel (mal)function after harmless driver Segmenttion Error
Date: Tue, 29 May 2001 19:50:59 -0000

In article <xQQP6.1059$[EMAIL PROTECTED]>,
Norm Dresner <[EMAIL PROTECTED]> wrote:

>BUT ...
>    IIRC, the driver had the code:
>
>        int        temp;
>              ..
>        printk( KERN_ERR "Value is %d\n" , temp = ReadFromNowhere() );
>
>where the ReadFromNowhere function contains the intentional error.

In that case the process was killed during the call to ReadFromNowhere
and printk was never executed.

--
http://www.spinics.net/linux

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list by posting to the
comp.os.linux.development.system newsgroup.

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Development-System Digest
******************************

Reply via email to