Re: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa

2000-10-19 Thread Trond Myklebust

> " " == Linus Torvalds <[EMAIL PROTECTED]> writes:

 > How about adding a test in invalidate_inode_pages() like

 >  /* We cannot invalidate a locked page */ if
 >  (TryLockPage(page))
 >  continue;

 > + /* We cannot invalidate a page that is in use */
 > + if (page_count(page) != 1) {
 > + UnlockPage(page);
 > + continue;
 > + }
 > +
 >  __lru_cache_del(page); __remove_inode_page(page);

 > Because otherwise we might end up invalidating pages that might
 > have pending write-back etc (although I think the NFS logic
 > tries to avoid invalidating when there's pending activity).

You may remember that I've been fighting a rearguard action against
this for some time.

Under NFS the problem is that pages can (and *should*) be invalidated
despite there being pending write backs. The server can trigger the
need for a cache invalidation at any time.
The existence of file locks that aren't page aligned, as well as
partial page writeback ensure that we cannot make the equivalence
   page has pending write == page is correct.

Cheers,
  Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa

2000-10-19 Thread Trond Myklebust

> " " == Russell King <[EMAIL PROTECTED]> writes:

 > invalidate_inode_pages nfs_zap_caches nfs_lock fcntl_setlk
 > do_fcntl sys_fcntl

 > So I guess that NFS locking is really bad if the region is
 > mmapped!

Yep, but that's a symptom, not a cause. We want to be able to run
invalidate_inode_pages() safely at any moment, since the need can be
triggered externally (because the server and client page caches
disagree).

Cheers,
  Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa

2000-10-19 Thread Trond Myklebust

> " " == Russell King <[EMAIL PROTECTED]> writes:

 > Indeed.  page->mapping is set to NULL in two places, one in
 > __remove_inode_pages() and the other one in the swap code after
 > we've checked that it was NULL.  I hadn't found the particular
 > call trace that caused us to ended up in __remove_inode_page()
 > though with this page.

Have you tried tagging invalidate_inode_pages() with a debugging
statement?

Cheers,
  Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa

2000-10-19 Thread Trond Myklebust

> " " == David S Miller <[EMAIL PROTECTED]> writes:

 > Actually, judging by the trace you provided Russell, I'd say
 > this is some peculiarity with NFS silly rename handling, and
 > it'd be best to look for the bug in that code (early inode
 > reference loss, for example?)

Russel's trace indicates that the unlink actually has completed and
has become a negative dentry since the file is labelled '(deleted)'.
That means that the dentry count must have been zero, so that
dentry_iput() was called.

I don't see how dentry_iput() can be called on an open file. In
principle the dentry count should always be >= 1, so unless there is
some place where we're calling d_delete() without get()ing the dentry
first, there should be no path for early inode loss.

Cheers,
  Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa

2000-10-19 Thread Russell King

Linus Torvalds writes:
> Can you get a full stack trace?

filemap_write_page
filemap_sync
filemap_unmap
do_munmap
sys_munmap

> How about adding a test in invalidate_inode_pages() like

(Added, along with a call to drop a stack trace out).

Yes, this does stop the problem in filemap_write_page.  The stack trace
here shows:

invalidate_inode_pages
nfs_zap_caches
nfs_lock
fcntl_setlk
do_fcntl
sys_fcntl

So I guess that NFS locking is really bad if the region is mmapped!
   _
  |_| - ---+---+-
  |   | Russell King[EMAIL PROTECTED]  --- ---
  | | | | http://www.arm.linux.org.uk/personal/aboutme.html   /  /  |
  | +-+-+ --- -+-
  /   |   THE developer of ARM Linux  |+| /|\
 /  | | | ---  |
+-+-+ -  /\\\  |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [PATCH] fs/nls/Config.in

2000-10-19 Thread Tom Rini

On Thu, Oct 19, 2000 at 10:20:25PM +0200, Urban Widmark wrote:
> On Thu, 19 Oct 2000, Tom Rini wrote:
> 
> > Hello all.  The attached patch changes the behavoir of fs/nls/Config.in from:
> > CONFIG_SMB_FS != n to CONFIG_INET = y && CONFIG_SMB_FS != n.  This is neeed
> > because if CONFIG_INET isn't set, CONFIG_SMB_FS isn't asked about and
> > therefor isn't set at all, so CONFIG_NLS is set to y.  My only question about
> > this patch is if it shouldn't have depended on CONFIG_SMB_NLS_DEFAULT to start
> > with?  (Maintainer CC'ed).

> It was supposed to be ok to not have a default nls value set but still be
> able to activate nls if you want to. Giving it the old no-nls behaviour
> until you say otherwise. Missing support from smbmount is the main reason
> for having the default.

Ah, ok.

> One solution might be to change the smbfs config to look more like the
> ncpfs config and force a 'n' value if CONFIG_INET isn't 'y'. Patch for
> this below, but the second patch you sent looks fine too. You didn't say
> which kernel version you are using ...

Sorry, this was on 2.4.0-test10-pre3, but I'm sure it applies to a good deal
of 2.4.0-testX.

> You could also try the cml2 config tool. The cml2 config language is much
> better at handling unset values and the current version has no problems
> with this (n is the same as undefined, as I understand it).
>   http://www.tuxedo.org/~esr/kbuild
> (if you test it, kernel-rules.cml may need a search of INTEGRATOR
>  with ARCH_INTEGRATOR)

CML2 later, hopefully. :)

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa

2000-10-19 Thread Linus Torvalds

In article <8snvuj$1l0$[EMAIL PROTECTED]>,
Linus Torvalds <[EMAIL PROTECTED]> wrote:
>
>Hmm.. Looks like page->mapping was cleared by truncate_inode_pages()
>when the inode was free'd, and there was still write-back activity on
>one of the pages in question. 

Looking some more, the fact that the oops happens in filemap_sync_pte()
definitely means that we haven't gotten around to truncating the sucker
yet. So invalidate_inode_pages() looks like the more likely cause,
especially as the page writeback correctly increases the file count for
NFS, so we should never be able to get into the horror-schenario of
having write-back after the pages have been truncated due to the inode
getting cleared.

Does the simple added test for page counts to invalidate_inode_pages()
fix the problem for you, Russell?

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



2.2.16 killing innocent processes

2000-10-19 Thread Matthias Andree

Hi,

I maintain a small site with a couple of linux boxes that run 2.2.16 and
cfengine 1.5.4. Recently, I changed the configuration and ever since,
three of the machines randomly have Postfix' smtp process killed by
SIGSEGV. The problem only shows up when cfengine is active.

My kernels have ReiserFS 3.5.22, Andre's 2.2.16 IDE patches, NFS v3
(server + client, not used by cfengine), DC390 v2.0e, the openwall
security patch with low feature set (SECURE_STACK, SECURE_STACK_SMART,
SECURE_RLIMIT_NPROC).

Are there any race conditions as to heavy network load (that cfengine
attracts) and many threads (that cfengine spawns)? Is there anything
related to RLIMIT_NPROC (though I don't see why that would send SIGSEGV
rather than SIGKILL)?

-- 
Matthias Andree
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: about time-slice

2000-10-19 Thread Dan Maas

> I have a question about the time-slice of linux, how do I know it, or how
> can I test it?

First look for the (platform-specific) definition of HZ in
include/asm/param.h. This is how many timer interrups you get per second (eg
on i386 it's 100). Then look at include/linux/sched.h for the definition of
DEF_COUNTER. This is the number of timer interrupts between mandatory
schedules. By default it's HZ/10, meaning that the time-slice is 100ms (10
schedules/sec). (of course the interval could be longer if kernel code is
hogging the CPU; the scheduler won't run until the process leaves the kernel
or sleeps explicitly...)

Experts, please correct me if I'm wrong.

Regards,
Dan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [BUG] 2.4.0-test10-pre4: kernel BUG at vmscan.c:102!

2000-10-19 Thread Linus Torvalds

In article <[EMAIL PROTECTED]>, Matt Yourst  <[EMAIL PROTECTED]> wrote:
>The following bug was just logged for 2.4.0-test10-pre4.

Just remove the two BUG() tests at lines 101-103 in mm/vmscan.c: they
seem to be bogus, and what they test for isn't actually a bug at all..

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa

2000-10-19 Thread Linus Torvalds

In article <[EMAIL PROTECTED]>,
Trond Myklebust  <[EMAIL PROTECTED]> wrote:
>> " " == Petr Vandrovec <[EMAIL PROTECTED]> writes:
>
> > You do not have to use NFS - look for my postings with
> > 'page->mapping == NULL' in archive. Your code uses shared mmap,
> > 'page->isn't
> > it? Probably shared by couple of processes.
>
>It's probably particularly nasty under NFS because of
>invalidate_inode_pages().

Btw, that "invalidate_inode_pages()" thing is just wrong - we can't just
remove pages that are mapped etc, because that would result in no end of
fun aliasing problems etc.

I don't see why invalidate_inode_pages() would be called for this
sequence, though, which is why I'd be more likely to blame the truncate
case, but I think you're right about invalidate_inode_pages() being a
problem none-the-less.

How about adding a test in invalidate_inode_pages() like

/* We cannot invalidate a locked page */
if (TryLockPage(page))
continue;

+   /* We cannot invalidate a page that is in use */
+   if (page_count(page) != 1) {
+   UnlockPage(page);
+   continue;
+   }
+
__lru_cache_del(page);
__remove_inode_page(page);

Because otherwise we might end up invalidating pages that might have
pending write-back etc (although I think the NFS logic tries to avoid
invalidating when there's pending activity).

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa

2000-10-19 Thread Linus Torvalds

In article <[EMAIL PROTECTED]>,
Russell King  <[EMAIL PROTECTED]> wrote:
>Petr Vandrovec writes:
>> ... or from sys_exit() if you forget to unmap. Or from anywhere if
>> swapping code decides to swap such page. I'm trying to hunt it down
>> for more than month, but I have no idea what's wrong. In my case
>> way to trigger bug is:
>
>I actually think its as simple as:
>
>1. shared map a file
>2. close file
>3. unlink file
>4. unmap shared mapping
>
>In my case, I was running newaliases, and there wasn't any other
>processes using that mapping.

Hmm.. Looks like page->mapping was cleared by truncate_inode_pages()
when the inode was free'd, and there was still write-back activity on
one of the pages in question. 

Looking at the problem, it appears that the unmap() will (correctly) do
a writepage() for each dirty page, and that will (again correctly) cause
NFS to do a delayed write-out with all the proper things (increment page
count because of the pending write etc). The inode hasn't been free'd
yet, because we're still using it.

But then when we _do_ release the inode, we end up doing
truncate_inode_pages() and through that we clear page->mapping, so the
pending write-out is SOL.  I have this feeling that we probably should
NOT remove the mapping until the page count has gone down to zero. 

The other alternative would be to flush the pending write-outs (or wait
for them synchronously - but that's just stupid and inefficient), which
would imply that we'd better add the "flush" operation to "struct
address_space_operations". 

Can you get a full stack trace?

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa

2000-10-19 Thread David S. Miller

   From: Russell King <[EMAIL PROTECTED]>
   Date:Fri, 20 Oct 2000 00:07:55 +0100 (BST)

   Trond Myklebust writes:
   > It's probably particularly nasty under NFS because of
   > invalidate_inode_pages(). The latter empties the page cache whenever
   > we can no longer trust it and calls remove_inode_page() on every
   > unlocked page. It won't care whether the page is mmapped or not.
   > 
   > My guess is therefore that the line setting 'page->mapping = NULL' in
   > __remove_inode_page() is a candidate for scrutiny...

   Indeed.  page->mapping is set to NULL in two places, one in
   __remove_inode_pages() and the other one in the swap code after we've
   checked that it was NULL.  I hadn't found the particular call trace
   that caused us to ended up in __remove_inode_page() though with this
   page.

Actually, judging by the trace you provided Russell, I'd say this is
some peculiarity with NFS silly rename handling, and it'd be best to
look for the bug in that code (early inode reference loss, for
example?)

Later,
David S. Miller
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa

2000-10-19 Thread Russell King

Trond Myklebust writes:
> It's probably particularly nasty under NFS because of
> invalidate_inode_pages(). The latter empties the page cache whenever
> we can no longer trust it and calls remove_inode_page() on every
> unlocked page. It won't care whether the page is mmapped or not.
> 
> My guess is therefore that the line setting 'page->mapping = NULL' in
> __remove_inode_page() is a candidate for scrutiny...

Indeed.  page->mapping is set to NULL in two places, one in
__remove_inode_pages() and the other one in the swap code after we've
checked that it was NULL.  I hadn't found the particular call trace
that caused us to ended up in __remove_inode_page() though with this
page.
   _
  |_| - ---+---+-
  |   | Russell King[EMAIL PROTECTED]  --- ---
  | | | | http://www.arm.linux.org.uk/personal/aboutme.html   /  /  |
  | +-+-+ --- -+-
  /   |   THE developer of ARM Linux  |+| /|\
 /  | | | ---  |
+-+-+ -  /\\\  |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa

2000-10-19 Thread Trond Myklebust

> " " == Petr Vandrovec <[EMAIL PROTECTED]> writes:

 > You do not have to use NFS - look for my postings with
 > 'page->mapping == NULL' in archive. Your code uses shared mmap,
 > 'page->isn't
 > it? Probably shared by couple of processes.

It's probably particularly nasty under NFS because of
invalidate_inode_pages(). The latter empties the page cache whenever
we can no longer trust it and calls remove_inode_page() on every
unlocked page. It won't care whether the page is mmapped or not.

My guess is therefore that the line setting 'page->mapping = NULL' in
__remove_inode_page() is a candidate for scrutiny...

Cheers,
  Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa

2000-10-19 Thread Russell King

Roger Larsson writes:
> Will it work correctly if 4. is done before 3. (even before 2?)
> Is it legal/good practice to unmap the file after closing it?
> (Since the sharing needs the fd to mmap it)

Dunno, haven't tried that yet.  I'll have a go tomorrow, but I think
it'll work correctly.  I'll also dig about in the VFS / NFS code some
more to see if I can find anything obvious.

> I would have expected this order:
>   A. open file
>   B. shared map file
>   C. unmap shared mapping
>   D. close file
>   E. unlink file

BTW, the program which is giving grief is good ol' sendmail, v8.11.
It does the unmap after close all over the place.
   _
  |_| - ---+---+-
  |   | Russell King[EMAIL PROTECTED]  --- ---
  | | | | http://www.arm.linux.org.uk/personal/aboutme.html   /  /  |
  | +-+-+ --- -+-
  /   |   THE developer of ARM Linux  |+| /|\
 /  | | | ---  |
+-+-+ -  /\\\  |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: mapping user space buffer to kernel address space

2000-10-19 Thread Jeff Garzik

Andrea Arcangeli wrote:
> 
> On Thu, Oct 19, 2000 at 05:16:14PM -0400, Jeff Garzik wrote:
> > solution is really elegant.  Excluding all the debug code and assertions
> > I stick in there, the guts of via audio mmap support went from ~50 lines
> > to ~10.
> 
> Was it 50 lines with remap_page_range?

Yeah.  Via audio is scatter-gather, so I had a function via_mmap_chan
which had to walk the scatter-gather list, calling remap_page_range for
each PAGE_SIZE'd dma buffer.

Now with nopage(), the need to walk the scatter-gather list is
completely avoided.  The scatter-gather info is stored as an array, so
finding the physical address for a virtual page is a direct lookup.


> Which is the advantage of introducing pagefaults that we can avoid? (and
> that we are also used to avoid)

Well, I don't know the VM well so I can't say how bad the lack of
VM_LOCK will affect latency, if at all.

I prefer this way because it seems the most clean -- let the system
pagefault if it wants to, we're not really losing the buffer, only a
reference to it.

Jeff



-- 
Jeff Garzik| The difference between laziness and
Building 1024  | prioritization is the end result.
MandrakeSoft   |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa

2000-10-19 Thread Roger Larsson

Russell King wrote:
> 
> Petr Vandrovec writes:
> > ... or from sys_exit() if you forget to unmap. Or from anywhere if
> > swapping code decides to swap such page. I'm trying to hunt it down
> > for more than month, but I have no idea what's wrong. In my case
> > way to trigger bug is:
> 
> I actually think its as simple as:
> 
  0. open file
> 1. shared map file
> 2. close file
> 3. unlink file
> 4. unmap shared mapping

Will it work correctly if 4. is done before 3. (even before 2?)
Is it legal/good practice to unmap the file after closing it?
(Since the sharing needs the fd to mmap it)

I would have expected this order:
  A. open file
  B. shared map file
  C. unmap shared mapping
  D. close file
  E. unlink file

But in your case the unlink should be deferred to unmap time...
(if it is legal)

Successful unlinking a file should probably free pages directly to
free list - might be worth optimizing for.

/RogerL


Disclaimer:
 I do not really understand fs code...

> 
> In my case, I was running newaliases, and there wasn't any other
> processes using that mapping.
>_
>   |_| - ---+---+-
>   |   | Russell King[EMAIL PROTECTED]  --- ---
>   | | | | http://www.arm.linux.org.uk/personal/aboutme.html   /  /  |
>   | +-+-+ --- -+-
>   /   |   THE developer of ARM Linux  |+| /|\
>  /  | | | ---  |
> +-+-+ -  /\\\  |
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> Please read the FAQ at http://www.tux.org/lkml/

--
Home page:
  http://www.norran.net/nra02596/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: mapping user space buffer to kernel address space

2000-10-19 Thread Linus Torvalds



On Fri, 20 Oct 2000, Andrea Arcangeli wrote:

> On Thu, Oct 19, 2000 at 05:16:14PM -0400, Jeff Garzik wrote:
> > solution is really elegant.  Excluding all the debug code and assertions
> > I stick in there, the guts of via audio mmap support went from ~50 lines
> > to ~10.
> 
> Was it 50 lines with remap_page_range?

You cannot use remap_page_range() if the pages aren't physically
contiguous.

Face it, Andrea, remap_page_range() is a very limited hack that only works
for a very limited subset of the things that real people want to do. It is
_not_ a generic solution, while the nopage() approach _is_ generic.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: mapping user space buffer to kernel address space

2000-10-19 Thread Linus Torvalds



On Thu, 19 Oct 2000, Jeff Garzik wrote:
>
> I stole the last two lines from drivers/char/drm/vm.c, which might need
> to be fixed up also..  He uses the vm_flags above and nevers calls
> get_page, at the very least.

The DRM code does

atomic_inc(_to_page(physical)->count);

which is basically what get_page() expands into. The DRM code looks ugly,
but correct, at least as far as this thing is concerned.

But you're right about the mmap vm_flags/vm_file things.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: mapping user space buffer to kernel address space

2000-10-19 Thread Andrea Arcangeli

On Thu, Oct 19, 2000 at 05:16:14PM -0400, Jeff Garzik wrote:
> solution is really elegant.  Excluding all the debug code and assertions
> I stick in there, the guts of via audio mmap support went from ~50 lines
> to ~10.

Was it 50 lines with remap_page_range?

Which is the advantage of introducing pagefaults that we can avoid? (and
that we are also used to avoid)

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Proposal: driver initialization pipelining

2000-10-19 Thread Andre Hedrick

On Thu, 19 Oct 2000, Felix von Leitner wrote:

> I don't get it.
> If you say that IDE disables interrupts during init, does that mean that
> it disables _all_ interrupts or just that you mask the IDE IRQs?

Yes, it is called probing.

You issue a command to the channel and hope that something responds.
The command is not fatal if nothing is there.

We have to disable all interrupts and listen for the first probable ping.
Then grab it and hope that it s correct.

> Actually, I was thinking more along the lines of SCSI bus scan, because
> the Linux IDE reset is already barely noticeable.

After the driver know where everything is and what is there

> Does "timing sensitive" mean "don't come again too early" or "be 100%
> punctual"?

It is oh crap, I have to wait 31 seconds if I am using junk hardware to
get out of this wait.

> There ought to be _some_ initializations that don't require interrupts?
> Registering the file systems and network protocols, stuff like that?
> 
> Felix
> 

Andre Hedrick
The Linux ATA/IDE guy



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



[Oops] 2.4.0-test10pre4

2000-10-19 Thread Daniel Mehrmann

Hi !

One kernel oops with 2.4.0-pre4 :


ksymoops 0.7c on i686 2.4.0-test10.  Options used
 -V (default)
 -k /proc/ksyms (default)
 -l /proc/modules (default)
 -o /lib/modules/2.4.0-test10 (specified)
 -m /usr/src/linux/System.map (default)
 
Oct 19 23:40:25 tron kernel: invalid operand: 
Oct 19 23:40:25 tron kernel: CPU:0
Oct 19 23:40:25 tron kernel: EIP:0010:[try_to_swap_out+250/796]
Oct 19 23:40:25 tron kernel: EFLAGS: 00010282
Oct 19 23:40:25 tron kernel: eax: 001c   ebx: 0100   ecx:
c3fc8000   edx: 
Oct 19 23:40:25 tron kernel: esi: c103a06c   edi: 0001   ebp:
00da7045   esp: c3fc9ecc
Oct 19 23:40:25 tron kernel: ds: 0018   es: 0018   ss: 0018
Oct 19 23:40:25 tron kernel: Process kswapd (pid: 2, stackpage=c3fc9000)
Oct 19 23:40:25 tron kernel: Stack: c01e2b25 c01e2ce4 0066 4005
40057000 c3d5c13c 4004e000 0200
Oct 19 23:40:25 tron kernel:c0126493 c25b3640 c11d6660 4004f000
c3d5c13c 0004 4004e000 c11d6660
Oct 19 23:40:25 tron kernel:c25b3640 0004 4044e000 c3d35400
40057000 40057000 c3d35400 c012654d
Oct 19 23:40:25 tron kernel: Call Trace: [tvecs+6653/87364]
[tvecs+7100/87364] [swap_out_vma+279/412] [swap_out_mm+53/96]
[swap_out+278/352] [refill_inactive+199/356]
[do_try_to_free_pages+98/128]
Oct 19 23:40:25 tron kernel: Code: 0f 0b 83 c4 0c 90 f7 c5 02 00 00 00
74 18 6a 68 68 e4 2c 1e
Using defaults from ksymoops -t elf32-i386 -a i386
 
Code;   Before first symbol
 <_EIP>:
Code;   Before first symbol
   0:   0f 0b ud2a
Code;  0002 Before first symbol
   2:   83 c4 0c  add$0xc,%esp
Code;  0005 Before first symbol
   5:   90nop
Code;  0006 Before first symbol
   6:   f7 c5 02 00 00 00 test   $0x2,%ebp
Code;  000c Before first symbol
   c:   74 18 je 26 <_EIP+0x26> 0026 Before
first symbol
Code;  000e Before first symbol
   e:   6a 68 push   $0x68
Code;  0010 Before first symbol
  10:   68 e4 2c 1e 00push   $0x1e2ce4
   

daniel@tron:/ > cat ver_linux.out
-- Versions installed: (if some fields are empty or look
-- unusual then possibly you have very old versions)
Linux tron.dhcp10mbit.netz.de 2.4.0-test10 #1 Thu Oct 19 23:28:30 MEST
2000 i686 unknown
Kernel modules 2.3.15
Gnu C  2.95.2
Gnu Make   3.79.1
Binutils   2.9.5.0.24
Linux C Libraryx   1 root root  4060896 Sep  5 13:57
/lib/libc.so.6
Dynamic linker ldd (GNU libc) 2.1.3
Procps 2.0.6
Mount  2.10m
Net-tools  1.56
Kbd0.99
Sh-utils   2.0
Modules Loaded tulip awe_wave sb sb_lib uart401 sound soundcore
serial

  daniel@tron:/usr/src/linux > cat .config
#
# Automatically generated by make menuconfig: don't edit
#
CONFIG_X86=y
CONFIG_ISA=y
# CONFIG_SBUS is not set
CONFIG_UID16=y

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KMOD=y

#
# Processor type and features
#
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
CONFIG_M686=y
# CONFIG_M686FXSR is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_CMPXCHG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_L1_CACHE_SHIFT=5
CONFIG_X86_TSC=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_PGE=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
# CONFIG_TOSHIBA is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
CONFIG_X86_CPUID=y
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
CONFIG_MTRR=y
# CONFIG_SMP is not set
# CONFIG_X86_UP_IOAPIC is not set

#
# General setup
#
CONFIG_NET=y
# CONFIG_VISWS is not set
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_NAMES=y
# CONFIG_MCA is not set
CONFIG_HOTPLUG=y

#
# PCMCIA/CardBus support
#
# CONFIG_PCMCIA is not set
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
CONFIG_KCORE_ELF=y
# CONFIG_KCORE_AOUT is not set
# CONFIG_BINFMT_AOUT is not set
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=y
# CONFIG_PM is not set
# CONFIG_ACPI is not set
# CONFIG_APM is not set

#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set

#
# Parallel port support
#
# CONFIG_PARPORT is not set

#
# Plug and Play configuration
#
CONFIG_PNP=y
CONFIG_ISAPNP=y

#
# Block devices
#
CONFIG_BLK_DEV_FD=y
# CONFIG_BLK_DEV_XD is not set

PATCH 2.4.0.10.4: keyboard cleanup try 2

2000-10-19 Thread Jeff Garzik

Updated per Andrea's suggestions...
-- 
Jeff Garzik| The difference between laziness and
Building 1024  | prioritization is the end result.
MandrakeSoft   |

diff -urN vanilla/linux-2.4.0-test10-pre4/drivers/char/pc_keyb.c 
linux_2_3/drivers/char/pc_keyb.c
--- vanilla/linux-2.4.0-test10-pre4/drivers/char/pc_keyb.c  Wed Oct 18 19:03:57 
2000
+++ linux_2_3/drivers/char/pc_keyb.cWed Oct 18 20:20:14 2000
@@ -65,7 +65,7 @@
 static void __aux_write_ack(int val);
 #endif
 
-spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED;
 static unsigned char handle_kbd_event(void);
 
 /* used only by send_data - set by keyboard_interrupt */
@@ -448,7 +448,7 @@
unsigned char status = kbd_read_status();
unsigned int work = 1;
 
-   while (status & KBD_STAT_OBF) {
+   while ((--work > 0) && (status & KBD_STAT_OBF)) {
unsigned char scancode;
 
scancode = kbd_read_input();
@@ -467,13 +467,10 @@
}
 
status = kbd_read_status();
-   
-   if (!--work) {
-   printk(KERN_ERR "pc_keyb: controller jammed (0x%02X).\n",
-   status);
-   break;
-   }
}
+   
+   if (!work)
+   printk(KERN_ERR "pc_keyb: controller jammed (0x%02X).\n", status);
 
return status;
 }
@@ -481,14 +478,13 @@
 
 static void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-   unsigned long flags;
-
 #ifdef CONFIG_VT
kbd_pt_regs = regs;
 #endif
-   spin_lock_irqsave(_controller_lock, flags);
+
+   spin_lock_irq(_controller_lock);
handle_kbd_event();
-   spin_unlock_irqrestore(_controller_lock, flags);
+   spin_unlock_irq(_controller_lock);
 }
 
 /*
diff -urN vanilla/linux-2.4.0-test10-pre4/drivers/char/q40_keyb.c 
linux_2_3/drivers/char/q40_keyb.c
--- vanilla/linux-2.4.0-test10-pre4/drivers/char/q40_keyb.c Wed Sep  8 14:51:22 
1999
+++ linux_2_3/drivers/char/q40_keyb.c   Wed Oct 18 20:20:14 2000
@@ -94,7 +94,7 @@
 };
 
 
-spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED;
 
 
 /*
@@ -340,11 +340,10 @@
 
 static void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-   unsigned long flags;
unsigned char status;
 
disable_keyboard();
-   spin_lock_irqsave(_controller_lock, flags);
+   spin_lock(_controller_lock);
kbd_pt_regs = regs;
 
status = IRQ_KEYB_MASK & master_inb(INTERRUPT_REG);
@@ -386,7 +385,7 @@
  keyup=1;
  }
 exit:
-   spin_unlock_irqrestore(_controller_lock, flags);
+   spin_unlock(_controller_lock);
master_outb(-1,KEYBOARD_UNLOCK_REG); /* keyb ints reenabled herewith */
enable_keyboard();
 }



[BUG] 2.4.0-test10-pre4: kernel BUG at vmscan.c:102!

2000-10-19 Thread Matt Yourst

The following bug was just logged for 2.4.0-test10-pre4.

The machine was recompiling glibc (off a ReiserFS 3.6.18 filesystem)
and X was just running a screensaver at the time this happened. X was
locked up and I couldn't switch to a console, so I killed it with
Alt+SysRq. I was then able to get a task list with Alt+SysRq and cc1
was in the D state (along with kswapd in the Z state.) At this point I
synced and rebooted.

Oct 19 17:52:26 argentium kernel: kernel BUG at vmscan.c:102! 
Oct 19 17:52:26 argentium kernel: invalid operand:  
Oct 19 17:52:26 argentium kernel: CPU:0 
Oct 19 17:52:26 argentium kernel: EIP:   
0010:[try_to_swap_out+250/848] 
Oct 19 17:52:26 argentium kernel: EFLAGS: 00010282 
Oct 19 17:52:26 argentium kernel: eax: 001c   ebx: 0100   ecx:
c12ea000   edx:  
Oct 19 17:52:26 argentium kernel: esi: c11c6858   edi: 0001   ebp:
06af2045   esp: c12ebee4 
Oct 19 17:52:26 argentium kernel: ds: 0018   es: 0018   ss: 0018 
Oct 19 17:52:26 argentium kernel: Process kswapd (pid: 2,
stackpage=c12eb000) 
Oct 19 17:52:26 argentium kernel: Stack: c01f42c5 c01f4484 0066
0809 0808e000 c6af0234 0808a000 0809  
Oct 19 17:52:26 argentium kernel:c012bc03 c1314c60 c6a4b4a0
0808d000 c6af0234 0004 0808a000 c6a4b4a0  
Oct 19 17:52:26 argentium kernel:c1314c60  0848a000
c6af3080 0809 0809 c6af3080 c012be10  
Oct 19 17:52:26 argentium kernel: Call Trace: [tvecs+6653/33176]
[tvecs+7100/33176] [swap_out_vma+323/480] [swap_out+368/496]
[refill_inactive+272/544] [do_try_to_free_pages+153/192]
[kswapd+183/432]  
Oct 19 17:52:26 argentium kernel:[kernel_thread+36/48]  
Oct 19 17:52:26 argentium kernel: Code: 0f 0b 83 c4 0c 90 f7 c5 02 00
00 00 74 18 6a 68 68 84 44 1f  
Oct 19 17:56:07 argentium kernel: SysRq: Emergency Sync 
Oct 19 17:56:08 argentium kernel: Syncing device 03:06 ... OK 
Oct 19 17:56:08 argentium kernel: Syncing device 03:07 ... OK 
Oct 19 17:56:08 argentium kernel: Syncing device 03:01 ... OK 
Oct 19 17:56:08 argentium kernel: Done. 
Oct 19 17:56:11 argentium kernel: SysRq: Show State 
Oct 19 17:56:11 argentium kernel:  
Oct 19 17:56:11 argentium kernel:   task PCstack   pid
father child younger older 
Oct 19 17:56:11 argentium kernel: init  S C1229F2C  3076
1  0   740  (NOTLB) 
Oct 19 17:56:11 argentium kernel:sig: 0 
 : X 
Oct 19 17:56:11 argentium kernel: kswapdZ C021ED40  5940
2  1(L-TLB)   3 
Oct 19 17:56:11 argentium kernel:sig: 0 
 : X 
Oct 19 17:56:11 argentium kernel: kreclaimd  S 0286  6648
3  1(L-TLB)   4 2 
Oct 19 17:56:11 argentium kernel:sig: 0 
 : X 
Oct 19 17:56:11 argentium kernel: kflushd   S   5796
4  1(L-TLB)   5 3 
Oct 19 17:56:11 argentium kernel:sig: 0 
 : X 
Oct 19 17:56:11 argentium kernel: kupdate   S C12E5FC4  6052
5  1(L-TLB)   6 4 
Oct 19 17:56:11 argentium kernel:sig: 0 
fff9 : X 
Oct 19 17:56:11 argentium kernel: kreiserfsd  S C132DFC0  5820
6  1(L-TLB)  15 5 
Oct 19 17:56:11 argentium kernel:sig: 0 
 : X 
...

FYI, mm/vmscan.c:
if (PageSwapCache(page)) {
entry.val = page->index;
swap_duplicate(entry);
if (pte_dirty(pte))
>   BUG();
if (pte_write(pte))
BUG();
set_pte(page_table, swp_entry_to_pte(entry));
drop_pte:
UnlockPage(page);
mm->rss--;

-
 Matt T. YourstMassachusetts Institute of Technology
 [EMAIL PROTECTED] 617.225.7690
 513 French House - 476 Memorial Drive - Cambridge, MA 02136
-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [ADMIN] some list related topics ..

2000-10-19 Thread Matti Aarnio

On Thu, Oct 19, 2000 at 03:08:12PM -0700, Philippe Troin wrote:
> 8< snip >8
> 
> > For the subset  1  above, I am preparing to begin to run regularly
> > (weekly very least, daily possibly) scanner which tries interactive
> > testing of recipients address at all of user's domain's MX servers,
> > and if any of the MX systems for user's domain gives a bad
> > response for subscriber's address, that user gets the log report
> > and some pointers on what to do.
> 
> It also sends a report for perfectly working systems... Just got two
> of theses... Is this a normal feature of your checking script ?

There are now two things running.
- Post individual messages to *all* subscribers
  (to find misbehaving autoresponder(s))
- Do that with MX verifier -- turning on a flag
  forcing also successes to be reported to the people.

The uninteded double-reports are due to me having the script
running in two instances for a moment.  I thought I SIGTERMed
the first one immediately when it showed a nuisance detail in
online monitoring feature, but alas, things were not so.

In the future the MX verifier will report only cases with
problems to the users who are likely to encounter them.

> Phil.

/Matti Aarnio
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



RE: TRACED] Re: "Tux" is the wrong logo for Linux

2000-10-19 Thread Lincoln Dale

At 02:09 PM 19/10/2000 -0400, Mark Haney wrote:
> > Feel free to send complaints to [EMAIL PROTECTED] and get his account
> > yanked for abuse of mailing lists.
>
>http://www.ilan.net/contact.htm for a nice list of addresses to send
>complaints to.

the original email came from 216.27.3.45.
a quick grep thru past archives of this mailing list is a relatively 
trivial way to find out who it is . . .

the person has been foolish enough to post to this list from that 
ip-address before.
i won't post details of that, but it is a relatively trivial exercise to go 
thru . . .

perhaps we can all get on with real work now . . . :-)

cheers,

lincoln.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa

2000-10-19 Thread Russell King

Petr Vandrovec writes:
> ... or from sys_exit() if you forget to unmap. Or from anywhere if
> swapping code decides to swap such page. I'm trying to hunt it down
> for more than month, but I have no idea what's wrong. In my case
> way to trigger bug is:

I actually think its as simple as:

1. shared map a file
2. close file
3. unlink file
4. unmap shared mapping

In my case, I was running newaliases, and there wasn't any other
processes using that mapping.
   _
  |_| - ---+---+-
  |   | Russell King[EMAIL PROTECTED]  --- ---
  | | | | http://www.arm.linux.org.uk/personal/aboutme.html   /  /  |
  | +-+-+ --- -+-
  /   |   THE developer of ARM Linux  |+| /|\
 /  | | | ---  |
+-+-+ -  /\\\  |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [ADMIN] some list related topics ..

2000-10-19 Thread Philippe Troin

Matti Aarnio <[EMAIL PROTECTED]> writes:

> We ([EMAIL PROTECTED] -> me & DaveM) got just reports that
> somebody is diverting incoming email to some sort of auto-responding
> ticket system.
> 
> The thing does not carry original message "Received:" headers in replies,
> and is reporting invalid URL.
> 
> 
> Independent of that, people with supposedly working addresses
> are sometimes bouncing:
> 
>   1) because their backup MXes don't like the domain they have
>  (configuration problem somewhere, you can choose in between
>   the DNS data writer, and the backup MX admin)

8< snip >8

> For the subset  1  above, I am preparing to begin to run regularly
> (weekly very least, daily possibly) scanner which tries interactive
> testing of recipients address at all of user's domain's MX servers,
> and if any of the MX systems for user's domain gives a bad
> response for subscriber's address, that user gets the log report
> and some pointers on what to do.

It also sends a report for perfectly working systems... Just got two
of theses... Is this a normal feature of your checking script ?

(Report available upon request)

Phil.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [ADMIN] some list related topics ..

2000-10-19 Thread Jeff V. Merkey



Matti Aarnio wrote:
> 
> On Thu, Oct 19, 2000 at 03:08:46PM -0600, Jeff V. Merkey wrote:
> > Matt said someone was diverting email.  diverting or intercepting email
> > is a crime in the US.
> > Perhaps Matt was wrong?
> 
> Or using words which have different sets of meanings for you
> (lawyer mind?) vs. me (technical mind).
> 
> Checking my two different Webster Dictionaries, the mainline
> meanings for the word seem to match also with ".forward" in
> usual UNIX email sense.  (I really need to get also a good
> British English dictionary to verify PROPER forms of words
> and meanings ;) )
> 
> "intercept" - now that has definitely malicious meaning in it,
> but "divert" - not in my mind.

The key word is "with malicious intent" -- you understand I think.  It's
your call Matt, I think you understand very well. 

:-)

Jeff

> 
> I have noticed that I have to watch myself, or I will start
> using terms like "killed the culprit", when less extremely
> worded real meaning is "deleted the (likely) culprit's
> subscription".
> 
> > :-)
> >
> > Jeff
> 
> /Matti Aarnio
> 
> PS: Please Jeff, my name is *not* Matt, nor Matthew, although all share
> same origins some 3000 years back in Hebrew...   Understanding how
> that happened requires a review of European history for past 2000
> years, which is not channel topic.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> Please read the FAQ at http://www.tux.org/lkml/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [ADMIN] some list related topics ..

2000-10-19 Thread Matti Aarnio

On Thu, Oct 19, 2000 at 03:08:46PM -0600, Jeff V. Merkey wrote:
> Matt said someone was diverting email.  diverting or intercepting email
> is a crime in the US.  
> Perhaps Matt was wrong?  

Or using words which have different sets of meanings for you
(lawyer mind?) vs. me (technical mind).

Checking my two different Webster Dictionaries, the mainline
meanings for the word seem to match also with ".forward" in
usual UNIX email sense.  (I really need to get also a good
British English dictionary to verify PROPER forms of words
and meanings ;) )

"intercept" - now that has definitely malicious meaning in it,
but "divert" - not in my mind.


I have noticed that I have to watch myself, or I will start
using terms like "killed the culprit", when less extremely
worded real meaning is "deleted the (likely) culprit's
subscription".


> :-)
> 
> Jeff


/Matti Aarnio

PS: Please Jeff, my name is *not* Matt, nor Matthew, although all share
same origins some 3000 years back in Hebrew...   Understanding how
that happened requires a review of European history for past 2000
years, which is not channel topic.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa

2000-10-19 Thread Petr Vandrovec

On 19 Oct 00 at 22:16, Russell King wrote:

> I'm seeing an oops caused by a NULL pointer dereference in mm/filemap.c,
> filemap_write_page.  The NULL pointer in question is page->mapping.
> The box on which this is happening is using a root NFS filesystem (in
> fact all but one of its filesystems are NFS).

You do not have to use NFS - look for my postings with 
'page->mapping == NULL' in archive. Your code uses shared mmap, isn't
it? Probably shared by couple of processes.

> So the file that was mapped has been deleted...  Ok, 
> With the following in filemap_sync_pte:
> 
> this reveals:
> 
> --> page c017e118 mapping NULL - address 40264000
> --> vma->vm_file = c0c8b120
> --> /var/tmp/.nfs16130002 (deleted)
> 
> And the stack trace indicates that the kernel execution path came from
> sys_munmap.

... or from sys_exit() if you forget to unmap. Or from anywhere if
swapping code decides to swap such page. I'm trying to hunt it down
for more than month, but I have no idea what's wrong. In my case
way to trigger bug is:

(1) shared map some page
(2) unlink underlying file
(3) fork
(4)   from child dirty pages
(5)   from parent truncate file
(6) exit both tasks
(7) oops

Just in case you'll not find oops demo code in archive... Last tested 
under 2.4.0-test10-pre3. With -pre4 I cannot decide whether to comment 
out BUG() in vmscan, or not, so I did not test -pre4 yet... Maybe you
can simplify code even more. During tests (dual PIII/450, 256MB RAM)
system is completely dead for up to 40 secs, so do not panic. It is not
needed to hit reset button, just wait ;-) Any idea welcomed.
Best regards,
Petr Vandrovec
[EMAIL PROTECTED]

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

unsigned char zero;

#define MSIZE 0x0E00

void x4768(void) {
int fd;
pid_t pid;
int x4778_1[2];
int x4778_2[2];
int x4779_1[2];
int x4779_2[2];
int from4778;
int to4778;
int from4779;
int to4779;
char* mma[65536];
unsigned int mml[65536];
unsigned int mmi = 0;
unsigned int ln = 0;
unsigned int x;

#define MAL2(a,l) ftruncate(fd, ln+l); mml[mmi] = l; mma[mmi++] = mmap(a, l, 
PROT_READ|PROT_WRITE, MAP_SHARED, fd, ln); ln += l; mma[mmi-1][0] = 99;
#define MAL(l) MAL2(NULL,l)

fd = open("ram0", O_RDWR | O_CREAT, 0600);
unlink("ram0");
MAL(MSIZE);
pipe(x4778_1);
pipe(x4778_2);
pid = fork();
if (!pid) {
int from4768 = x4778_1[0];
int to4768 = x4778_2[1];
close(x4778_1[1]);
close(x4778_2[0]);
close(fd);
read(from4768, , 1);
for (x = 0; x < mml[mmi - 1]; x += 4096)
mma[mmi-1][x] = 98;
write(to4768, , 1);
read(from4768, , 1);
exit(0);

} else if (pid < 0) {
perror("fork failed");
exit(222);
}
to4778 = x4778_1[1];
from4778 = x4778_2[0];
close(x4778_1[0]);
close(x4778_2[1]);

/* so that read/write to this fails... */
from4779 = -1;
to4779 = -1;
{
write(to4778, , 1);
write(to4779, , 1);
read(from4778, , 1);
read(from4779, , 1);

write(to4778, , 1);
write(to4779, , 1);
sleep(5);
ftruncate(fd, 0);
}
close(fd);
while (mmi--) {
munmap(mma[mmi], mml[mmi]);
}
exit(0);
}

int main(int argc, char* argv[]) {
printf("Go\n");
mlockall(MCL_CURRENT);

x4768();
return 0;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: RFC: big ac97_codec audio update

2000-10-19 Thread Jeff Garzik

Rui Sousa wrote:
> How about keeping master volume to 0 while you mess up the other
> registers?

Not a bad idea.  0x8000, so it's muted as well as volume 0.

> And it's not a scaling problem? (wrong number of precision bits)

It might be scaling bug, but I'm pretty certain the number of precision
bits is now correct.

Jeff



-- 
Jeff Garzik| The difference between laziness and
Building 1024  | prioritization is the end result.
MandrakeSoft   |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Any dual AGP slot motherboards?

2000-10-19 Thread Dan Hollis

On Thu, 19 Oct 2000, Timur Tabi wrote:
> ** Reply to message from James Simmons <[EMAIL PROTECTED]> on Thu, 19 Oct 2000
> 18:34:51 -0700 (PDT)
> > Apple sells a computer with dual AGP slots.
> I've never heard this. Could you tell me exactly which model this is?

I think he's confusing dualhead cards with dual agp slots.

I dont think *anyone* makes dual agp slots.

-Dan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: RFC: big ac97_codec audio update

2000-10-19 Thread Rui Sousa

On Thu, 19 Oct 2000, Jeff Garzik wrote:

> Rui Sousa wrote:
> > On Thu, 19 Oct 2000, Jeff Garzik wrote:
> > > We need the dynamic bit resolution detection.
> 
> > Isn't this producing noise/pops? (since you maximize the volume).
> 
> During audio init I hear pops, but then again I heard pops during audio
> init before these changes too :)

How about keeping master volume to 0 while you mess up the other
registers?

> 
> 
> > > Judging from comments already received, it looks like we need to do
> > > logarithmic instead of linear scaling for the OSS mixer values (0 -
> > > 100).
> 
> > ? The scale (AC97 and OSS) is linear in dB units which is,I believe, how
> > we perceive sound.
> 
> With maestro, trident, and via at least, the volume has to be at 80% or
> so before any sound can be heard.

And it's not a scaling problem? (wrong number of precision bits)

Rui Sousa

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_page

2000-10-19 Thread Russell King

Hi,

I'm seeing an oops caused by a NULL pointer dereference in mm/filemap.c,
filemap_write_page.  The NULL pointer in question is page->mapping.
The box on which this is happening is using a root NFS filesystem (in
fact all but one of its filesystems are NFS).

So the file that was mapped has been deleted...  Ok, 
With the following in filemap_sync_pte:

if (page->index != pgoff) {
printk("weirdness: pgoff=%lu index=%lu address=%lu vm_start=%lu 
vm_pgoff=%lu\n",
pgoff, page->index, address, vma->vm_start, vma->vm_pgoff);
}
+   if (!page->mapping) {
+   printk("--> page %p mapping NULL - address %lx\n", page, address);
+   printk("--> vma->vm_file = %p\n", vma->vm_file);
+   if (vma->vm_file) {
+   char *s = d_path(vma->vm_file->f_dentry, 
+vma->vm_file->f_vfsmnt, buf, PAGE_SIZ$
+   printk("--> %s\n", s);
+   }
+   page_cache_free(page);
+   return 0;
+   }
lock_page(page);

this reveals:

--> page c017e118 mapping NULL - address 40264000
--> vma->vm_file = c0c8b120
--> /var/tmp/.nfs16130002 (deleted)

And the stack trace indicates that the kernel execution path came from
sys_munmap.

(and the box doesn't hang, so I can then get the following strace and
send you this mail... should've kept the old sendmail binary lying
around...):

open("/var/tmp/000703", O_RDWR|O_CREAT|O_EXCL, 0600) = 5
fcntl(5, F_SETFD, FD_CLOEXEC)   = 0
lseek(5, 0, SEEK_END)   = 0
lseek(5, 49152, SEEK_CUR)   = 49152
write(5, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
old_mmap(NULL, 53248, PROT_READ|PROT_WRITE, MAP_SHARED, 5, 0) = 0x40264000
fcntl(5, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}) = 0
fcntl(5, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=0, len=1}) = 0
close(5)= 0
unlink("/var/tmp/000703")   = 0
...
munmap(0x40264000, 53248)   = 0

So I'm guessing that the unlink is causing NFS to remove page->mapping
for a dirty mmap'd file, which then causes munmap to explode.

I'm not a VFS, MM nor NFS wizard, so it'll probably take me many hours
to figure out what's causing this.  Any chance someone else can take a
look?
   _
  |_| - ---+---+-
  |   | Russell King[EMAIL PROTECTED]  --- ---
  | | | | http://www.arm.linux.org.uk/personal/aboutme.html   /  /  |
  | +-+-+ --- -+-
  /   |   THE developer of ARM Linux  |+| /|\
 /  | | | ---  |
+-+-+ -  /\\\  |

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [c.bailiff@E-SECURE.COM.AU: Re: IIS %c1%1c remote command execution]

2000-10-19 Thread Andries Brouwer

On Thu, Oct 19, 2000 at 01:15:06PM -0400, Michael H. Warfield wrote:

>   This is being forwarded from BugTraq where there is an ongoing
> discussion over a security hole in IIS based on it's unicode decoder.
> This particular individual is stating that several unicode decoders,
> including the one in the Linux unicode_console driver, have failed to
> adhere to certain security warnings in some RFCs.  This IMPLIES that
> there is a potential security problem in all of them.
> 
>   Anyone familiar with this who can comment on the problem in the
> Linux unicode_console driver?

There is no problem.

More in detail:

UTF8 is a multi-byte variable length encoding.
Unicode is a 16-bit (and ISO-10646 a 31-bit) encoding of the same symbols.
It is not unusual to want to convert UTF8 to Unicode or vice versa.
There is a very simple straightforward algorithm, and it has the
property that several UTF8 strings will map to the same Unicode symbol.
It is like using 8-bit ASCII-possibly-with-parity code and converting it
to ASCII by removing the high order bit.

Such a many-to-one map can be a security risk.
If you want to test a string to make sure that it does not
contain a newline symbol or semicolon or so, and do that
by testing the string before it is converted, then you
may overlook codes that turn into the looked-for thing
after conversion.

Of course this is a triviality, and nobody will make this mistake
when the conversion does significant things to the input.
But when the input leaves ASCII unchanged (as is true both
in my masking example and in UTF8->Unicode), then people might
forget that non-ASCII may turn into ASCII.

What does this mean for the kernel?
If your mother builds a device and inserts it into the keyboard cable,
where the device must make sure that you do not type swearwords,
but she forgot about Unicode, then you can put the console keyboard
into Unicode mode and type bad text that passes through your mothers
device unnoticed.

Not many Linux users have such devices in their keyboard cable,
and utilities reading from the keyboard must therefore be prepared
for arbitrary input. It is not really meaningful to make the
kernel UTF8 to Unicode parser beep if you do not type the shortest
representation of a symbol. (On the other hand, one might argue
that in order to protect lazy programmers who copy the kernel
conversion code, the kernel conversion code had better be strict.)

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: RFC: big ac97_codec audio update

2000-10-19 Thread Jeff Garzik

Rui Sousa wrote:
> On Thu, 19 Oct 2000, Jeff Garzik wrote:
> > We need the dynamic bit resolution detection.

> Isn't this producing noise/pops? (since you maximize the volume).

During audio init I hear pops, but then again I heard pops during audio
init before these changes too :)


> > Judging from comments already received, it looks like we need to do
> > logarithmic instead of linear scaling for the OSS mixer values (0 -
> > 100).

> ? The scale (AC97 and OSS) is linear in dB units which is,I believe, how
> we perceive sound.

With maestro, trident, and via at least, the volume has to be at 80% or
so before any sound can be heard.


> Could you include this macro (it gives you perfect accuracy and
> prevents mistakes):
> 
> /* scales the range a:b to min:max rounding to the nearest integer */
> #define scale_range(val, a, b, min, max) \
> val) - a) * ((max) - (min)) + (min) * (b - a)) *
> 1000 + (b - a) * 500) / (1000 * (b - a))

> I will provide a patch if you agree.

Please do...


> Everything else looks ok but I still need to test it.

Thanks!

Jeff


-- 
Jeff Garzik| The difference between laziness and
Building 1024  | prioritization is the end result.
MandrakeSoft   |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [ADMIN] some list related topics ..

2000-10-19 Thread Jeff V. Merkey


It's up to you guys what you want to do.  I was just giving you a bigger
club to use, if you
needed it.  Playing games with LKML is not cool since about a dozen
companies who ship Linux
(including now us) depend on it as an "essential facility" of our
businesses to get bug reports 
and track the progress of Linux.  People playing BS games like the ones
you reported are not cool, and should not be tolerated.

:-)

Jeff

Matti Aarnio wrote:
> 
> On Thu, Oct 19, 2000 at 02:40:36PM -0600, Jeff V. Merkey wrote:
> > Matt,
> >
> > A legal perspective.
> >
> > It is a Felony Federal) in the United States to divert or re-route
> > emails on the internet,
> ...
> > I would suggest calling the FBI office in your area and file a formal
> > complaint.  You can be assured they will put anyone doing this in jail
> > (and walk in and seize all their computer  equipment).
> >
> > Jeff
> 
> Neat, HOWEVER -- there is no FBI office in Finland I could use...
> ... and at first I need to find the real culprit address anyway.
> 
> /Matti Aarnio  <[EMAIL PROTECTED]> - Helsinki, Finland
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [ADMIN] some list related topics ..

2000-10-19 Thread Matti Aarnio

On Thu, Oct 19, 2000 at 02:40:36PM -0600, Jeff V. Merkey wrote:
> Matt,
> 
> A legal perspective.
> 
> It is a Felony Federal) in the United States to divert or re-route
> emails on the internet, 
...
> I would suggest calling the FBI office in your area and file a formal
> complaint.  You can be assured they will put anyone doing this in jail
> (and walk in and seize all their computer  equipment).
> 
> Jeff 

Neat, HOWEVER -- there is no FBI office in Finland I could use...
... and at first I need to find the real culprit address anyway.

/Matti Aarnio  <[EMAIL PROTECTED]> - Helsinki, Finland
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: mapping user space buffer to kernel address space

2000-10-19 Thread Jeff Garzik

Linus Torvalds wrote:
> and quite frankly we should just change the damn "nopage()" arguments to
> be
> 
> struct page * (*nopage)(struct vm_area_struct * area, unsigned long pgoff, 
>int write_access);
> 
> because the nopage() routine really shouldn't care about "address" at all
> (the VM layer cares, but "nopage()" should just return the proper page at
> the proper offset into the mapping).

fine with me, it makes my code even shorter.  ;-)  This new mmap
solution is really elegant.  Excluding all the debug code and assertions
I stick in there, the guts of via audio mmap support went from ~50 lines
to ~10.


> > The first draft of code had only
> >
> >   vma->vm_ops = _mm_ops;
> >   vma->vm_private_data = card;
> >
> > and userspace apps segfaulted.  I then added the two objectionable
> > lines, and things started working:
> >
> >   vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */
> >   vma->vm_file = file;
> >
> > Have not yet checked any combinations in between...
> 
> Ahh, I think I see why. You should do a "get_page()" on the page before
> you return it from your nopage() - otherwise your page counts will be
> completely wrong.
> 
> Actually, as far as I can tell your page counts ended up being wrong
> anyway, but probably only at the end of the munmap() rather than at
> runtime.

Thanks, fixed.

I stole the last two lines from drivers/char/drm/vm.c, which might need
to be fixed up also..  He uses the vm_flags above and nevers calls
get_page, at the very least.

Jeff



-- 
Jeff Garzik| The difference between laziness and
Building 1024  | prioritization is the end result.
MandrakeSoft   |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [ADMIN] some list related topics ..

2000-10-19 Thread Jeff V. Merkey


Matt said someone was diverting email.  diverting or intercepting email
is a crime in the US.  
Perhaps Matt was wrong?  

:-)

Jeff

"H. Peter Anvin" wrote:
> 
> Followup to:  <[EMAIL PROTECTED]>
> By author:"Jeff V. Merkey" <[EMAIL PROTECTED]>
> In newsgroup: linux.dev.kernel
> >
> > If someone committs a crime in the US, and you don't report it, you have
> > also just committed another one by failing to report it (like if you
> > witness a murder, and turn and walk away).  Some of us (not you) are
> > designated as "officers of the court" and have a legal obligtion to do
> > so.  I am not the damaged party, so I should not, but interfereing with
> > email routing is a serious crime in the US, BTW.
> >
> 
> This is downright silly.  There is no "interfering with email routing"
> going on... just someone who has set up their email .forward to a
> broken address.
> 
> -hpa
> --
> <[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private!
> "Unix gives you enough rope to shoot yourself in the foot."
> http://www.zytor.com/~hpa/puzzle.txt
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> Please read the FAQ at http://www.tux.org/lkml/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [ADMIN] some list related topics ..

2000-10-19 Thread H. Peter Anvin

Followup to:  <[EMAIL PROTECTED]>
By author:"Jeff V. Merkey" <[EMAIL PROTECTED]>
In newsgroup: linux.dev.kernel
> 
> If someone committs a crime in the US, and you don't report it, you have
> also just committed another one by failing to report it (like if you
> witness a murder, and turn and walk away).  Some of us (not you) are
> designated as "officers of the court" and have a legal obligtion to do
> so.  I am not the damaged party, so I should not, but interfereing with
> email routing is a serious crime in the US, BTW.  
> 

This is downright silly.  There is no "interfering with email routing"
going on... just someone who has set up their email .forward to a
broken address.

-hpa
-- 
<[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [ADMIN] some list related topics ..

2000-10-19 Thread David S. Miller

   Date:Thu, 19 Oct 2000 14:40:36 -0600
   From: "Jeff V. Merkey" <[EMAIL PROTECTED]>

   A legal perspective.

We have no interest in sending the FBI to go knock down someones
doors, just removing the offending address and fixing the problem,
thats all.

I used to live in New Jersey, where "run out and sue your brother and
neighbour just because you can" was considered quite cool.  I don't
see things that way any more, in fact I think it's kind of lame.

But thanks for your legal perspective anyways. :-)

Later,
David S. Miller
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: linux kernel threads

2000-10-19 Thread Jeff V. Merkey


Here's some sample code on how to do this.  You use a macro called
"kernel_thread" and in the thread you start, you have to do soe munging
of current->

Jeff


int nwfs_asynch_io_process(void *id)
{
register int i = (int)id;

current->session = 1;
current->pgrp = 1;

sprintf(current->comm, "nwfs-async%d", (int)i);
asynch_io_task[i] = current;

asynch_io_active[i]++;
asynch_threads++;
while (!exit_asynch_io[i])
{
   if (!asynch_io_pending(i))
  down(sem_table[i]);

   if (exit_asynch_io[i])
  break;

#if (DO_ASYNCH_IO)
   if (asynch_signal[i])
   {
  if (!asynch_active[i])
  {
 asynch_active[i] = TRUE;
 process_asynch_io(i);
 asynch_active[i] = 0;
  }
  asynch_signal[i] = 0;
   }
#endif

}
asynch_threads--;
asynch_io_active[i]--;
return 0;

}

void LRUTimer(void)
{
flush_timer.data = 0;
flush_timer.expires = jiffies + HZ; // second delay
flush_timer.function = (void (*)(ULONG))LRUTimer;
add_timer(_timer);

#if (PROFILE_AIO)
seconds++;
#endif

if (lru_task != current)
{
   if (!lru_signal)
   {
  if (!lru_active)
  {
 lru_signal = TRUE;
 NWFSFlush();
  }
   }
}

#if (DEBUG_LRU_AIO)
if (delay_counter++ > 60)
{
   delay_counter = 0;
   displayNWFSState();
}
#endif

return;
}

struct file_system_type nwfs_type =
{
nwfs_read_super, "nwfs", 0, NULL
};

struct super_operations nwfs_sops =
{
nwfs_read_inode,// read inode
NULL,   // notify change
nwfs_write_inode,   // write inode
nwfs_put_inode, // put inode
nwfs_put_super, // put superblock
NULL,   // write superblock
nwfs_statfs,// stat filesystem
nwfs_remount,   // remount filesystem
};

int init_module(void)
{
register int status;
#if (DO_ASYNCH_IO)
register int i;
#endif
extern int nwfs_register_symbols(void);

NWFSPrint("NetWare File System NWFS v%d.%02d.%02d Copyright(c) 2000
TRG, Inc.\n",
  (int)MAJOR_VERSION, (int)MINOR_VERSION, (int)BUILD_VERSION);

if ((status = register_filesystem(_type)) == 0)
{
   NWFSPrint("nwfs:  initialized successfully\n");
   nwfs_register_symbols();
}

if (create_driver())
   NWFSPrint("nwfs:  error initializing user interface\n");

InitNWFS();

remirror_active = 0;
flush_active = 0;

exit_remirror = 0;
exit_flush = 0;

NWFSPrint("starting REMIRROR process ...\n");
kernel_thread(nwfs_mirror, NULL, 0);

NWFSPrint("starting LRU process ...\n");
kernel_thread(nwfs_flush, NULL, 0);

#if (DO_ASYNCH_IO)
NWFSPrint("starting ASYNCH_CALLBACK process ...\n");
kernel_thread(nwfs_callback, NULL, 0);

NWFSPrint("starting ASYNCH_IO processes [ ");
for (i=0; i < 8; i++)
{
   kernel_thread(nwfs_asynch_io_process, (void *)i, 0);
   NWFSPrint("%d ", (int)i);
}
NWFSPrint("]\n");
#endif

NWFSPrint("starting LRU Timer ...\n");
init_timer(_timer);
flush_timer.data = 0;
flush_timer.expires = jiffies + HZ; // second delay
flush_timer.function = (void (*)(ULONG))LRUTimer;
add_timer(_timer);

NWFSVolumeScan();
ReportVolumes();

return status;
}


Sourav Ghosh wrote:
> 
> Hello,
> 
> Can anyone tell me how kernel threads (threads in the kernel space)
> works in linux?
> In other words, how can I schedule them like normal user-level threads?
> 
> It seems to me that are NOT schedulable like user-level
> threads/processes in general since they are not
> pre-emptible at all.
> Is it right?
> 
> Thanks,
> --
> Sourav
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> Please read the FAQ at http://www.tux.org/lkml/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



real_root_dev

2000-10-19 Thread Geert Uytterhoeven


`real_root_dev' must be `int', not `kdev_t'.

The reason for this is that we still have (in ):

typedef unsigned short kdev_t;

while kernel/sysctl.c has the following line:

{KERN_REALROOTDEV, "real-root-dev", _root_dev, sizeof(int), 0644, NULL, 
_dointvec},

This causes a nice endianness problem on big-endian machines. It can even
cause weird results on little-endian machines where the alignment rule for int
is a 2 byte-boundary.

We've had this patch in the m68k tree since ages (at least 2.0.x), so it's time
to share it to the world :-) I think it was originally by Andreas Schwab.

--- linux-2.4.0-test10-pre3/init/main.c Sat Sep 23 17:31:22 2000
+++ geert-real_root_dev-2.4.0-test10-pre3/init/main.c   Thu Oct 19 21:39:07 2000
@@ -124,7 +124,7 @@
 int rows, cols;
 
 #ifdef CONFIG_BLK_DEV_INITRD
-kdev_t real_root_dev;
+int real_root_dev; /* MUST be int for sysctl! */
 #endif
 
 int root_mountflags = MS_RDONLY;
@@ -717,7 +717,7 @@
 
 #ifdef CONFIG_BLK_DEV_INITRD
root_mountflags = real_root_mountflags;
-   if (mount_initrd && ROOT_DEV != real_root_dev
+   if (mount_initrd && ROOT_DEV != (kdev_t)real_root_dev
&& MAJOR(ROOT_DEV) == RAMDISK_MAJOR && MINOR(ROOT_DEV) == 0) {
int error;
int i, pid;
@@ -725,9 +725,9 @@
pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
if (pid>0)
while (pid != wait());
-   if (MAJOR(real_root_dev) != RAMDISK_MAJOR
-|| MINOR(real_root_dev) != 0) {
-   error = change_root(real_root_dev,"/initrd");
+   if (MAJOR((kdev_t)real_root_dev) != RAMDISK_MAJOR
+|| MINOR((kdev_t)real_root_dev) != 0) {
+   error = change_root((kdev_t)real_root_dev,"/initrd");
if (error)
printk(KERN_ERR "Change root to /initrd: "
"error %d\n",error);
--- linux-2.4.0-test10-pre3/include/linux/devfs_fs_kernel.h Tue Jul 18 14:07:34 
2000
+++ geert-real_root_dev-2.4.0-test10-pre3/include/linux/devfs_fs_kernel.h   Thu 
+Oct 19 21:38:06 2000
@@ -46,7 +46,7 @@
 
 
 #ifdef CONFIG_BLK_DEV_INITRD
-#  define ROOT_DEVICE_NAME ((real_root_dev ==ROOT_DEV) ? root_device_name:NULL)
+#  define ROOT_DEVICE_NAME (((kdev_t)real_root_dev ==ROOT_DEV) ? 
+root_device_name:NULL)
 #else
 #  define ROOT_DEVICE_NAME root_device_name
 #endif
--- linux-2.4.0-test10-pre3/include/linux/fs.h  Sat Oct 14 19:03:33 2000
+++ geert-real_root_dev-2.4.0-test10-pre3/include/linux/fs.hThu Oct 19 21:38:21 
+2000
@@ -1228,7 +1228,7 @@
 extern void mount_root(void);
 
 #ifdef CONFIG_BLK_DEV_INITRD
-extern kdev_t real_root_dev;
+extern int real_root_dev;
 extern int change_root(kdev_t, const char *);
 #endif
 
--- linux-2.4.0-test10-pre3/drivers/block/rd.c  Tue Jul 18 14:08:53 2000
+++ geert-real_root_dev-2.4.0-test10-pre3/drivers/block/rd.cThu Oct 19 21:37:58 
+2000
@@ -704,7 +704,7 @@
 static void __init rd_load_disk(int n)
 {
 #ifdef CONFIG_BLK_DEV_INITRD
-   extern kdev_t real_root_dev;
+   extern int real_root_dev;
 #endif
 
if (rd_doload == 0)
@@ -712,7 +712,7 @@
 
if (MAJOR(ROOT_DEV) != FLOPPY_MAJOR
 #ifdef CONFIG_BLK_DEV_INITRD
-   && MAJOR(real_root_dev) != FLOPPY_MAJOR
+   && MAJOR((kdev_t)real_root_dev) != FLOPPY_MAJOR
 #endif
)
return;
@@ -724,8 +724,8 @@
 #ifdef CONFIG_MAC_FLOPPY
if(MAJOR(ROOT_DEV) == FLOPPY_MAJOR)
swim3_fd_eject(MINOR(ROOT_DEV));
-   else if(MAJOR(real_root_dev) == FLOPPY_MAJOR)
-   swim3_fd_eject(MINOR(real_root_dev));
+   else if(MAJOR((kdev_t)real_root_dev) == FLOPPY_MAJOR)
+   swim3_fd_eject(MINOR((kdev_t)real_root_dev));
 #endif
printk(KERN_NOTICE
   "VFS: Insert root floppy disk to be loaded into RAM disk and 
press ENTER\n");

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [EMAIL PROTECTED]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: use of add_interrupt_randomness in drivers missing in many drivers

2000-10-19 Thread tytso

   From: [EMAIL PROTECTED] (David Wagner)
   Date:18 Oct 2000 20:29:33 GMT

   Adding more bits to the pool should never hurt; the cryptographic
   mixing ensures this.  What _can_ hurt is adding predictable bits but
   (erroneously) bumping up the entropy counter.

Yes; and writing to /dev/random only mixes the contents into the pool;
it does *not* bump the entropy counter.  Hence, writing to /dev/random
is always safe; it can't hurt, and can help.  For this reason, it's safe
to have /dev/random to be world writeable; some folks have been overly
paranoid and making /dev/random be mode 444, or some such.

If you want to add random data to the pool and bump the estimate of the
entropy, you need to be root, and use a special ioctl which does this
atomically.  The intent is that a user-mode daemon would read data from
/dev/microphone, post-processes it a lot (filter out 60 Hz hum, compress
it, whatever), get an estimate of the entropy in the sample (which may
not be the same as its size), and then call the ioctl to push that data
into the entropy pool.

- Ted
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



linux kernel threads

2000-10-19 Thread Sourav Ghosh

Hello,

Can anyone tell me how kernel threads (threads in the kernel space)
works in linux?
In other words, how can I schedule them like normal user-level threads?

It seems to me that are NOT schedulable like user-level
threads/processes in general since they are not
pre-emptible at all.
Is it right?

Thanks,
--
Sourav

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



about time-slice

2000-10-19 Thread Zhixu Liu

Hi, All:

I have a question about the time-slice of linux, how do I know it, or how
can I test it?

Thanks for you help.

Zhixu



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [ADMIN] some list related topics ..

2000-10-19 Thread Jeff V. Merkey


Matt,

A legal perspective.

It is a Felony Federal) in the United States to divert or re-route
emails on the internet, 
esspecially across interstate lines.  It's also a Felony (Federal) to
misuse and email
address to disrupt interstate or international commerce.

I would suggest calling the FBI office in your area and file a formal
complaint.  You can be
assured they will put anyone doing this in jail (and walk in and seize
all their computer 
equipment).

Jeff 


Matti Aarnio wrote:
> 
> We ([EMAIL PROTECTED] -> me & DaveM) got just reports that
> somebody is diverting incoming email to some sort of auto-responding
> ticket system.
> 
> The thing does not carry original message "Received:" headers in replies,
> and is reporting invalid URL.
> 
> Independent of that, people with supposedly working addresses
> are sometimes bouncing:
> 
>   1) because their backup MXes don't like the domain they have
>  (configuration problem somewhere, you can choose in between
>   the DNS data writer, and the backup MX admin)
> 
>   2) that ISP's system is for some reason loosing track of
>  part of their user database.
> 
>  Couple days ago SGI.COM had apparently lost its external
>  system primary alias file for a few hours...  I have seen
>  similar blunders here and there,  cisco.com  had blunder
>  that some months ago too.  --  things vary, but usually
>  we refrain from deleting recipients if "a bit too many"
>  are bouncing from some big site...
> 
>   3) some ISP systems yield 500 series errors with text:
> "system is temporarily busy"
>  or something of that effect.  Now THAT is really offensive
>  stupidity by the ISP software folks...
> 
> For the subset  1  above, I am preparing to begin to run regularly
> (weekly very least, daily possibly) scanner which tries interactive
> testing of recipients address at all of user's domain's MX servers,
> and if any of the MX systems for user's domain gives a bad
> response for subscriber's address, that user gets the log report
> and some pointers on what to do.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> Please read the FAQ at http://www.tux.org/lkml/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: TCP: peer x.x.x.x:y/z shrinks window a:b:c...

2000-10-19 Thread Jordan Mendelson

[EMAIL PROTECTED] wrote:
> 
> Hello!
> 
> > I'll keep looking.
> 
> Is it easy to reproduce? If so, try to make tcpdump, which
> covers one of these messages.

It's extremely rare. We maintain persistent connections open for long
periods of time and even though a user who triggered it is online, it
only triggers the message a maximum of 26 times (typically ~4) and the
traffic volume we handle, it is not extremely practical for me to log
all traffic.

Of the IPs which triggered the response and were online at the time,
every single one of thm has either not had any ports open, been
firewalled or had nmap not be able to guess correctly with a single
exception of a machine which nmap said was "Windows NT4 / Win95 / Win98,
Windows NT 4 SP3, Windows NT 4.0 Server SP5 + 2047 Hotfixes." that had
port 1500/tcp (vlsi-lm) open.

However, during the scan, nmap reported that the report server was
sending RST from port 1500. One thing I did notice is that most of the
machines which I could ping that triggered this message were extremely
lagged (ping times 800+).

I'll keep trying though.


Jordan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Any dual AGP slot motherboards?

2000-10-19 Thread H. Peter Anvin

Followup to:  <[EMAIL PROTECTED]>
By author:Joel Jaeggli <[EMAIL PROTECTED]>
In newsgroup: linux.dev.kernel
>
> the AGP bus specification is for a single device (master)
> 
> you can review it at:
> 
> http://www.intel.com/technology/agp/agp_index.htm
> 

Technically, AGP is a "port", not a "bus", for this very reason.
However, there is nothing that says a chipset can't provide more than
one AGP port; it just means you can't connect more than one device to
each port.

-hpa
-- 
<[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: RFC: big ac97_codec audio update

2000-10-19 Thread Rui Sousa

On Thu, 19 Oct 2000, Jeff Garzik wrote:

> It's a big update, but I think it is necessary.
> We need the new codec-specific init functions.
> We need the new ac97-valid-reg checking.
> We need the dynamic bit resolution detection.

Isn't this producing noise/pops? (since you maximize the volume).

> 
> Full change description, and tested patch against 2.4.0-test10-pre4,
> follows.  This includes some interface changes that may be
> objectionable, but I consider it to be fixing up an interface before
> final 2.4.0 release...
> 
> Comments and feedback very much appreciated.  This code is tested on via
> audio.
> 
> Judging from comments already received, it looks like we need to do
> logarithmic instead of linear scaling for the OSS mixer values (0 -
> 100).

? The scale (AC97 and OSS) is linear in dB units which is,I believe, how
we perceive sound.

> This change affects a bunch of drivers, and needs lots of testing:
> maestro (when patched to use ac97_codec), trident, via, ymfpci, nm256
> (when patched), and others I am probably forgetting.

Could you include this macro (it gives you perfect accuracy and
prevents mistakes):

/* scales the range a:b to min:max rounding to the nearest integer */
#define scale_range(val, a, b, min, max) \
val) - a) * ((max) - (min)) + (min) * (b - a)) *
1000 + (b - a) * 500) / (1000 * (b - a))

and then calculate the volumes as:

left = scale_range(left, 1, 100, mh->scale, 0);

instead of

((100 - left) * scale) / 100);

I will provide a patch if you agree.


Everything else looks ok but I still need to test it.

Rui Sousa

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Any dual AGP slot motherboards?

2000-10-19 Thread Benjamin Herrenschmidt

>
>Apple sells a computer with dual AGP slots. I just was looking for a intel
>box like this. Since AGP is a port on the PCI bus it is possible to have
>more than one AGP port on a/each PCI bus but this requires the PCI chipset
>to support this. 

Well, I don't know of such a Mac. To my knowledge, the only Apple box to
have an AGP slot are the ones based on the "Core99" chipset, and they
provide one AGP slot. You won't be lucky with Apple HW anyway as there
are currently issues between the AGP controller and the Linux agpgart
driver preventing from using it. Those issues are tricky and I don't
think a solution will be available soon. (Apple chipset can make the AGP
aperture visible to the CPU AFAIK).

Ben.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



[ADMIN] some list related topics ..

2000-10-19 Thread Matti Aarnio

We ([EMAIL PROTECTED] -> me & DaveM) got just reports that
somebody is diverting incoming email to some sort of auto-responding
ticket system.

The thing does not carry original message "Received:" headers in replies,
and is reporting invalid URL.


Independent of that, people with supposedly working addresses
are sometimes bouncing:

  1) because their backup MXes don't like the domain they have
 (configuration problem somewhere, you can choose in between
  the DNS data writer, and the backup MX admin)

  2) that ISP's system is for some reason loosing track of
 part of their user database.

 Couple days ago SGI.COM had apparently lost its external
 system primary alias file for a few hours...  I have seen
 similar blunders here and there,  cisco.com  had blunder
 that some months ago too.  --  things vary, but usually
 we refrain from deleting recipients if "a bit too many"
 are bouncing from some big site...

  3) some ISP systems yield 500 series errors with text:
"system is temporarily busy"
 or something of that effect.  Now THAT is really offensive
 stupidity by the ISP software folks...


For the subset  1  above, I am preparing to begin to run regularly
(weekly very least, daily possibly) scanner which tries interactive
testing of recipients address at all of user's domain's MX servers,
and if any of the MX systems for user's domain gives a bad
response for subscriber's address, that user gets the log report
and some pointers on what to do.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: mapping user space buffer to kernel address space

2000-10-19 Thread Linus Torvalds



On Thu, 19 Oct 2000, Jeff Garzik wrote:
> 
> > > Since this code works in my local tests, my two concerns at this point
> > > are correct vma->vm_pgoff treatment, and correct vm_flags/vm_file usage.
> 
> Can I completely ignore vm_pgoff in nopage()?  Currently I just do the
> following, to get the page number relative to the start of the vma:
> 
>   pgoff = (address - vma->vm_start) >> PAGE_SHIFT;
> 
> where 'address' is the value passed to nopage().

Oh, no, you can't do that. It should be something like

pgoff = vma->vm_pgoff + (address - vma->vm_start) >> PAGE_SHIFT;

and quite frankly we should just change the damn "nopage()" arguments to
be

struct page * (*nopage)(struct vm_area_struct * area, unsigned long pgoff, int 
write_access);

because the nopage() routine really shouldn't care about "address" at all
(the VM layer cares, but "nopage()" should just return the proper page at
the proper offset into the mapping).

I didn't notice..

> 
> The first draft of code had only
> 
>   vma->vm_ops = _mm_ops;
>   vma->vm_private_data = card;
> 
> and userspace apps segfaulted.  I then added the two objectionable
> lines, and things started working:
> 
>   vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */
>   vma->vm_file = file;
> 
> Have not yet checked any combinations in between...

Ahh, I think I see why. You should do a "get_page()" on the page before
you return it from your nopage() - otherwise your page counts will be
completely wrong.

Actually, as far as I can tell your page counts ended up being wrong
anyway, but probably only at the end of the munmap() rather than at
runtime.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [PATCH] fs/nls/Config.in

2000-10-19 Thread Urban Widmark

On Thu, 19 Oct 2000, Tom Rini wrote:

> Hello all.  The attached patch changes the behavoir of fs/nls/Config.in from:
> CONFIG_SMB_FS != n to CONFIG_INET = y && CONFIG_SMB_FS != n.  This is neeed
> because if CONFIG_INET isn't set, CONFIG_SMB_FS isn't asked about and
> therefor isn't set at all, so CONFIG_NLS is set to y.  My only question about
> this patch is if it shouldn't have depended on CONFIG_SMB_NLS_DEFAULT to start
> with?  (Maintainer CC'ed).

It was supposed to be ok to not have a default nls value set but still be
able to activate nls if you want to. Giving it the old no-nls behaviour
until you say otherwise. Missing support from smbmount is the main reason
for having the default.


One solution might be to change the smbfs config to look more like the
ncpfs config and force a 'n' value if CONFIG_INET isn't 'y'. Patch for
this below, but the second patch you sent looks fine too. You didn't say
which kernel version you are using ...

You could also try the cml2 config tool. The cml2 config language is much
better at handling unset values and the current version has no problems
with this (n is the same as undefined, as I understand it).
http://www.tuxedo.org/~esr/kbuild
(if you test it, kernel-rules.cml may need a search of INTEGRATOR
 with ARCH_INTEGRATOR)

/Urban


--- linux-2.4.0-test10-pre4-orig/fs/Config.in   Thu Oct 19 21:36:16 2000
+++ linux-2.4.0-test10-pre4-smbfs/fs/Config.in  Thu Oct 19 21:44:42 2000
@@ -98,12 +98,17 @@
  define_bool CONFIG_LOCKD_V4 y
fi
 
-   dep_tristate 'SMB file system support (to mount Windows shares etc.)' 
CONFIG_SMB_FS $CONFIG_INET
-   if [ "$CONFIG_SMB_FS" != "n" ]; then
-  bool '   Use a default NLS' CONFIG_SMB_NLS_DEFAULT
-  if [ "$CONFIG_SMB_NLS_DEFAULT" = "y" ]; then
- string '  Default Remote NLS Option' CONFIG_SMB_NLS_REMOTE "cp437"
+   if [ "$CONFIG_INET" != "n" ]; then
+  tristate 'SMB file system support (to mount Windows shares etc.)' CONFIG_SMB_FS
+  if [ "$CONFIG_SMB_FS" != "n" ]; then
+ bool '   Use a default NLS' CONFIG_SMB_NLS_DEFAULT
+ if [ "$CONFIG_SMB_NLS_DEFAULT" = "y" ]; then
+string '  Default Remote NLS Option' CONFIG_SMB_NLS_REMOTE "cp437"
+ fi
   fi
+   else
+  # for fs/nls/Config.in
+  define_bool CONFIG_SMB_FS n
fi
if [ "$CONFIG_IPX" != "n" -o "$CONFIG_INET" != "n" ]; then
   tristate 'NCP file system support (to mount NetWare volumes)' CONFIG_NCP_FS

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



[PATCH] small mdacon fix.

2000-10-19 Thread James Simmons


Mdacon in test10-pre4 missed one restore_flag. Here is the patch that
removes it. 

--- mdacon.c.orig   Thu Oct 19 20:17:07 2000
+++ mdacon.cThu Oct 19 20:17:20 2000
@@ -129,7 +129,6 @@
outb_p(reg+1, mda_index_port); outb_p(val & 0xff, mda_value_port);
 
spin_unlock_irqrestore(_lock, flags);
-   restore_flags(flags);
 }
 
 static int test_mda_b(unsigned char val, unsigned char reg)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



oopses in test10-pre4 (was Re: [RFC] atomic pte updates and paechanges, take 3)

2000-10-19 Thread Linus Torvalds



Ben,
 you added these two BUG() conditions in your atomic pte patch:

> diff -ur v2.4.0-test10-pre2/mm/vmscan.c work-10-2/mm/vmscan.c
> --- v2.4.0-test10-pre2/mm/vmscan.cFri Oct 13 17:18:37 2000
> +++ work-10-2/mm/vmscan.c Fri Oct 13 17:19:47 2000
> @@ -99,6 +98,10 @@
>   if (PageSwapCache(page)) {
>   entry.val = page->index;
>   swap_duplicate(entry);
> + if (pte_dirty(pte))
> + BUG();
> + if (pte_write(pte))
> + BUG();
>   set_pte(page_table, swp_entry_to_pte(entry));
>  drop_pte:
>   UnlockPage(page);
> @@ -109,6 +112,13 @@

and people are getting them left and right when they start swapping.

As far as I can tell, the thing you test for is not actually a bug at all.
The pte may be dirty, but that's ok - the swap cache page is obviously
up-to-date, as it's actually physically the very same page.

I think you overlooked the fact that SHM mappings use the page cache, and
it's ok if such pages are dirty and writable - they will get written out
by the shm_swap() logic once there are no mappings active any more.

I like the test per se, because I think it's correct for the "normal"
case of a private page, but I really think those two BUG()'s are not bugs
at all in general, and we should just remove the two tests.

Comments? Anything I've overlooked?

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.2 generating odd TCP resets?

2000-10-19 Thread David S. Miller

   Date: Thu, 19 Oct 2000 12:42:58 -0700 (PDT)
   From: dean gaudet <[EMAIL PROTECTED]>

   i'm not saying this totally explains the problems you're seeing,
   but i think it's suspect.

This isn't it at all.  Only when _real data_ (not FIN etc.) sits in
receive queue does the RST get emitted on early shutdown.

Later,
David S. Miller
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: mapping user space buffer to kernel address space

2000-10-19 Thread Jeff Garzik

Linus Torvalds wrote:
> Looks reasonable - although your "max_size" checks are wrong at mmap time.
> You should check for something like

thanks


> > Since this code works in my local tests, my two concerns at this point
> > are correct vma->vm_pgoff treatment, and correct vm_flags/vm_file usage.

Can I completely ignore vm_pgoff in nopage()?  Currently I just do the
following, to get the page number relative to the start of the vma:

pgoff = (address - vma->vm_start) >> PAGE_SHIFT;

where 'address' is the value passed to nopage().


> You should drop the
> 
> vma->vm_file = file;
> 
> as the VM layer will have done that already.
> 
> Also, the VM_LOCKED | VM_SHM thing is wrong, because it will cause
> mis-calulcation of the mm->vm_locked fields, and it's also unnecessary.
> Sure, it will cause the VM layer to not swap, but the no-op "swapping"
> shouldn't much hurt anyway, as it's easy enough to re-populate the page
> again.
> 
> So either just drop it, or make sure that the locked page count doesn't
> get corrupted.

The first draft of code had only

vma->vm_ops = _mm_ops;
vma->vm_private_data = card;

and userspace apps segfaulted.  I then added the two objectionable
lines, and things started working:

vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */
vma->vm_file = file;

Have not yet checked any combinations in between...

Regards,

Jeff



-- 
Jeff Garzik| The difference between laziness and
Building 1024  | prioritization is the end result.
MandrakeSoft   |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



[PATCH] fs/nls/Config.in -- Take 2

2000-10-19 Thread Tom Rini

Hello again all.  I've taken what Petr suggested and put into a patch.  Now,
are there any suggestions this time around?  I'm still wondering if the whole
thing shouldn't be dependant on CONFIG_SMB_NLS_DEFAULT, but since I don't know
the smbfs code at all, I can't say.

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/


--- fs/nls/Config.in.orig   Thu Oct 19 12:54:09 2000
+++ fs/nls/Config.inThu Oct 19 12:54:32 2000
@@ -2,10 +2,17 @@
 # Native language support configuration
 #
 
+# smb wants NLS
+if [ "$CONFIG_SMB_FS" = "m" -o "$CONFIG_SMB_FS" = "y" ]; then
+  define_bool CONFIG_SMB_NLS y
+else
+  define_bool CONFIG_SMB_NLS n
+fi
+
 # msdos and Joliet want NLS
 if [ "$CONFIG_JOLIET" = "y" -o "$CONFIG_FAT_FS" != "n" \
-o "$CONFIG_NTFS_FS" != "n" -o "$CONFIG_NCPFS_NLS" = "y" \
-   -o "$CONFIG_SMB_FS" != "n" ]; then
+   -o "$CONFIG_SMB_NLS" = "y" ]; then
   define_bool CONFIG_NLS y
 else
   define_bool CONFIG_NLS n



Re: mapping user space buffer to kernel address space

2000-10-19 Thread Linus Torvalds



On Wed, 18 Oct 2000, Jeff Garzik wrote:
> 
> Well coolio.  Would somebody be up for sanity checking my audio mmap
> code (attached)?  It doesn't look too hard at all to get the audio
> drivers doing the correct thing.

Looks reasonable - although your "max_size" checks are wrong at mmap time.
You should check for something like

if (size > max_size)
goto out;
if (offset > max_size - size)
goto out;

instead of your current (offset >= max_size) check. As it stands, I think
you can mmap past the end by just having size and offset < max_size, but
the _sum_ being bigger..

> Since this code works in my local tests, my two concerns at this point
> are correct vma->vm_pgoff treatment, and correct vm_flags/vm_file usage.

You should drop the 

vma->vm_file = file;

as the VM layer will have done that already.

Also, the VM_LOCKED | VM_SHM thing is wrong, because it will cause
mis-calulcation of the mm->vm_locked fields, and it's also unnecessary.
Sure, it will cause the VM layer to not swap, but the no-op "swapping"
shouldn't much hurt anyway, as it's easy enough to re-populate the page
again.

So either just drop it, or make sure that the locked page count doesn't
get corrupted.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



oops with dd with test10-pre4

2000-10-19 Thread Todd M. Roy

I got this oops dding partitions. test10-pre3
works fine. 

below is a representative sample.

Thanks 

-- todd --

root@pcx4168:~# fdisk -l /dev/hda

Disk /dev/hda: 255 heads, 63 sectors, 1216 cylinders
Units = cylinders of 16065 * 512 bytes

   Device BootStart   EndBlocks   Id  System
/dev/hda1 164514048+  83  Linux native
/dev/hda265   121457852+   6  FAT16
/dev/hda4  1200  1216136552+  82  Linux swap
root@pcx4168:~# fdisk -l /dev/hdc

Disk /dev/hdc: 255 heads, 63 sectors, 3739 cylinders
Units = cylinders of 16065 * 512 bytes

   Device BootStart   EndBlocks   Id  System
/dev/hdc1 1   128   1028128+  83  Linux native
/dev/hdc2   *   129   1844498206  FAT16
/dev/hdc3   185  3720  28402920   8e  Linux LVM
/dev/hdc4  3721  3739152617+  83  Linux native

root@pcx4168:~# dd if=/dev/hdc2 of=/dev/hda2 bs=32k

invalid operand: 
CPU:0
EIP:0010:[]
EFLAGS: 00010282
eax: 001c   ebx: 0200   ecx: c12ea000   edx: 
esi: c11f6448   edi: 0001   ebp: 0762e045   esp: c12ebecc
ds: 0018   es: 0018   ss: 0018
Process kswapd (pid: 2, stackpage=c12eb000)
Stack: c020eb65 c020ed24 0066 400fa000 40102000 c75bc3e4 400f7000 
   c01262c3 c13e3620 c75cf4a0 400f9000 c75bc3e4 0004 400f7000 c75cf4a0
   c13e3620 0004 404f7000 c75be400 40102000 40102000 c75be400 c012637d
Call Trace: [] [] [] [] [] 
[] []
   [] [] []
Code: 0f 0b 83 c4 0c 90 f7 c5 02 00 00 00 74 18 6a 68 68 24 ed 20
kernel BUG at vmscan.c:102!
invalid operand: 
CPU:0
EIP:0010:[]
EFLAGS: 00010286
eax: 001c   ebx: 0700   ecx: c025c004   edx: 0021
esi: c11f65e0   edi: 0001   ebp: 07634045   esp: c57abb4c
ds: 0018   es: 0018   ss: 0018
Process dd (pid: 2372, stackpage=c57ab000)
Stack: c020eb65 c020ed24 0066 b000 c000 c75bbff8 bfff9000 0401
   c01262c3 c13e3620 c75cf560 bfffe000 c75bbff8 0003 bfff9000 c75cf560
   c13e3620 0003 c03f9000 c75bebfc c000 c000 c75bebfc c012637d
Call Trace: [] [] [] [] [] 
[] []
   [] [] [] [] [] [] 
[] []
   [] [] [] [] []
Code: 0f 0b 83 c4 0c 90 f7 c5 02 00 00 00 74 18 6a 68 68 24 ed 20
Segmentation fault
root@pcx4168:~#

cpuinfo:root [pcx4168] /proc
$ cat cpuinfo
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 5
model name  : Pentium II (Deschutes)
stepping: 2
cpu MHz : 448.000878
cache size  : 512 KB
fdiv_bug: no
hlt_bug : no
sep_bug : no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 2
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 
mmx fxsr
bogomips: 894.57



  .~.  Todd Roy, Senior Database Administrator  .~.
  /V\ Holstein Association, U.S.A. Inc. /V\ 
 // \\   [EMAIL PROTECTED] // \\  
/(   )\ 1-802-254-4551x4230   /(   )\
 ^^-^^ ^^-^^
**
This footnote confirms that this email message has been swept by 
MIMEsweeper for the presence of computer viruses.
**
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.2 generating odd TCP resets?

2000-10-19 Thread dean gaudet

On Wed, 18 Oct 2000, Brian Craft wrote:

> In the code below, I removed the shutdown() and added the block
> after do_scan() to eliminate the RST. The read() never finds any data.
> If there's no data pending, why does read() have any affect?

EOF is considered pending data... and has to be read.

this first snippet you posted would clear the EOF:

> b.c.
> 
> 
> fcntl (data_fd, F_SETFL, 1);/* set non-blocking */
> /*shutdown (data_fd, 0); */
> do_scan (w, h, data_fd);
> {   
> char buff[10];
> int i, c;
> printf("looking for extra data\n");
> while ((c = read(data_fd, buff, 10)) >= 0) {
> if (c > 0) {
> for (i=0; i printf("%x ", buff[i]); 
> }   
> printf("\n");
> }   
> }   
> printf("no more data\n");
> }   
> close (data_fd);


but in this next message with the "st" program, the read() doesn't clear
the EOF...

On Wed, 18 Oct 2000, Brian Craft wrote:

> while (count < LEN) {
> n = read(fd, buff, 100);
> if (n < 0) {
> printf("error on read\n");
> break;
> }
> count += n;
> }

you need one more read() to clear the EOF.



i'm not saying this totally explains the problems you're seeing, but i
think it's suspect.

-dean


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



RFC: big ac97_codec audio update

2000-10-19 Thread Jeff Garzik

It's a big update, but I think it is necessary.
We need the new codec-specific init functions.
We need the new ac97-valid-reg checking.
We need the dynamic bit resolution detection.

Full change description, and tested patch against 2.4.0-test10-pre4,
follows.  This includes some interface changes that may be
objectionable, but I consider it to be fixing up an interface before
final 2.4.0 release...

Comments and feedback very much appreciated.  This code is tested on via
audio.

Judging from comments already received, it looks like we need to do
logarithmic instead of linear scaling for the OSS mixer values (0 -
100).

This change affects a bunch of drivers, and needs lots of testing:
maestro (when patched to use ac97_codec), trident, via, ymfpci, nm256
(when patched), and others I am probably forgetting.

(Linus, this is CC'd as an FYI, not to be applied...)

Jeff



-- 
Jeff Garzik| The difference between laziness and
Building 1024  | prioritization is the end result.
MandrakeSoft   |


Improvements for the kernel AC97 codec support


++ AC97 codec vendor/device info table

* Add some new codec ids from ALSA
* Merge wolfson_init and tritech_init from ALSA
* Numerically sort by codec id

++ New codec read/write interface

* Imported check for valid AC97 registers from ALSA
(hopefully solves problems w/ AK codecs)
* Add functions ac97_codec_{read,write}, which first check for
a valid register, and then proceed with the register read/write.
* Use ac97_codec_{read,write} throughout the code.
* Export ac97_codec_{read,write} to the world.
* Note - The old interface continues to work just fine,
you just don't have valid-reg checking.

++ Mixer channel initialization

* Auto-detect channel existence, and bit resolution.  w00t!
* New method of using codec->supported_mixers: fill it in for a
custom mask, or set to zero to autodetect all responding mixer
channels.
* Using the register bit info table in the AC97 specification,
populate new ac97_hw[] fields 'offset', 'stereo', 'mute', and
'bits'.
* Remove mixer_defaults[], no longer needed.
* ac97_def_mix_val is now used instead of mixer_defaults[] to set
a global default mixer value.  If you want to set per-channel
mixer defaults, change ac97_hw[x].def_mix_val from zero to
the desired number.

++ Mixer channel read / write

* Use bit resolution detected in mixer init step to always
properly scale mixer channels, regardless of register size.
* Use 'offset', 'stereo' data from ac97_hw[] for ease of ac97
register reads.
* Use 'mute' data from ac97_hw[] for proper muting control
* Bug fix: preserve, not trample, the Mic loudness bit
* Export ac97_read_mixer to the world.  ac97_write_mixer was
exported, so why not this too.
* Because ac97_write_mixer was already exported,
and ac97_read_mixer now is, delete ac97_codec::{read,write}_mixer.
(breaks trident build I think, but easy fix)

++ AC97 modem stuff gone

* It seemed like a half-hearted attempt.  The -only- modem
related code that existed was a check for audio/modem codec
(which was output with printk), and an unused modem_ioctl
member of struct ac97_codec.  Gone.

++ Miscellaneous

* Provide URLs for AC97 specification.

++ Code cleanup

* Remove unnecessary function prototypes.
* Use ARRAY_SIZE macro from kernel.h, not non-standard
arraysize
* Const-ify ac97_rm2oss[], ac97_oss_rm[]
* Const-ify ac97_codec::name.
* Use 'u32' type for those members that we bitmask.
* Move mixer_state into a new ac97_mixer_entry structure
* Fix up debug code to be correct for the above changes,
add some debug code for the new resolution autodetect stuff.
* Add comments to some members of struct ac97_codec.






Index: include/linux/ac97_codec.h
===
RCS file: /g/cvslan/linux_2_3/include/linux/Attic/ac97_codec.h,v
retrieving revision 1.1.1.8
retrieving revision 1.1.1.8.16.2
diff -u -r1.1.1.8 -r1.1.1.8.16.2
--- include/linux/ac97_codec.h  2000/10/02 08:25:59 1.1.1.8
+++ include/linux/ac97_codec.h  2000/10/19 04:20:12 1.1.1.8.16.2
@@ -135,14 +135,20 @@
 
 #define supported_mixer(CODEC,FOO) ((CODEC)->supported_mixers & (1

Re: failure to blank CDRWs (2.2.18pre15 smp ide-scsi hp7100i)

2000-10-19 Thread Jens Axboe

On Mon, Oct 16 2000, Andre Hedrick wrote:
> > I if cdrecord bypassed the sg driver and spoke to the
> > cdrom driver directly. I know the CDROM_SEND_PACKET
> > ioctl() is in place for lk 2.4 but from which version
> > has it been functional in the lk 2.2 series?
> 
> But the write command is not included in any source tree yet, and it works.

No but you could do WRITE_XX through the CDROM_SEND_PACKET
stuff, and I have done just that before.

> This will be fun when it is released.
> Imagine direct read/write access to DVD regardless of filesystems.
> It should also do CD-RW's, but not tested.

Beware, cd-rw is quite different and not remotely as simple to support
as DVD-RAM.

jens
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: failure to blank CDRWs (2.2.18pre15 smp ide-scsi hp7100i)

2000-10-19 Thread Jens Axboe

On Mon, Oct 16 2000, Mark Cooke wrote:
> > Yes but there is a way to do this directly now, the question is can the
> > user-space apps change to go both ways.
> 
> Hi Andre,
> 
> Is there any tool / test code that you know of to 'do this directly' -
> I'm wanting to try to avoid ade-scsi translation, and show the drive's
> still working okay for blanking.  One less variable in the soup to
> worry about then.

Yes, I have a tool in the UDF cvs source that you can use to
blank CD's for testing that bypasses ide-scsi. It can also do silly
packet type burns, just for testing purposes. So get the UDF cvs source
and compile the cdrwtool program.

jens
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: failure to blank CDRWs (2.2.18pre15 smp ide-scsi hp7100i)

2000-10-19 Thread Jens Axboe

On Mon, Oct 16 2000, Douglas Gilbert wrote:
> As far as I know, cdrecord interfaces to Linux either
> via the sg or pg devices. No-one would be happier than
> I if cdrecord bypassed the sg driver and spoke to the
> cdrom driver directly. I know the CDROM_SEND_PACKET
> ioctl() is in place for lk 2.4 but from which version
> has it been functional in the lk 2.2 series?

Since 2.2.16 it has been functional in the 2.2 kernels
as well.

> Jens, do you know of some example code that shows the
> CDROM_SEND_PACKET ioctl being exercised for non-trivial
> work? Something that could be sent onto Joerg Schilling.

Sure, I have some code. The most interesting is probably
the cdrwtool just mentioned in this thread. I've been
thinking about doing a cdrecord "transport" using the
CDROM_SEND_PACKET stuff just for the fun of it, if it
worked well enough that would eliminate the need for ide-scsi
on ATAPI burners completely.

jens
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



RE: TRACED] Re: "Tux" is the wrong logo for Linux

2000-10-19 Thread Mark Haney

Are you mocking me? :)
You know, I don't even know why we are even qualifying the idiot's comments
by talking about it.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard B.
Johnson
Sent: Thursday, October 19, 2000 2:53 PM
To: Mark Haney
Cc: Dan Hollis; Alex Buell; [EMAIL PROTECTED]
Subject: RE: TRACED] Re: "Tux" is the wrong logo for Linux


On Thu, 19 Oct 2000, Mark Haney wrote:

> Richard Johnson wrote:
> >Cary, NC. can't be very large. There are, probably, three persons in
> >the whole county than have computers. Two haven't been booted since
> >the day the were received by the kids because they've been busy
> >studying for the M-CAP test.
>
> Not true.  Cary is quite large and is the fastest growing city in NC as of
> 1999 figures.  It is right next to Raleigh and houses a lot of tech
offices.
> Lucent, Cable & Wireless, HP.  You would be amazed at the tech nology
> centers there.  Matter of fact, Research Triangle Park is just down the
> road.
> Not all of NC, or the South for that matter, is a hotbed of ignorance.
>
>

Oops, of course, how careless of me. I stand corrected. It's a great
technology center. Just like Duluth, Missoula, and Redmond. ^;)

Cheers,
Dick Johnson

Penguin : Linux version 2.2.17 on an i686 machine (801.18 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



RE: TRACED] Re: "Tux" is the wrong logo for Linux

2000-10-19 Thread Richard B. Johnson

On Thu, 19 Oct 2000, Mark Haney wrote:

> Richard Johnson wrote:
> >Cary, NC. can't be very large. There are, probably, three persons in
> >the whole county than have computers. Two haven't been booted since
> >the day the were received by the kids because they've been busy
> >studying for the M-CAP test.
> 
> Not true.  Cary is quite large and is the fastest growing city in NC as of
> 1999 figures.  It is right next to Raleigh and houses a lot of tech offices.
> Lucent, Cable & Wireless, HP.  You would be amazed at the tech nology
> centers there.  Matter of fact, Research Triangle Park is just down the
> road.
> Not all of NC, or the South for that matter, is a hotbed of ignorance.
> 
> 

Oops, of course, how careless of me. I stand corrected. It's a great
technology center. Just like Duluth, Missoula, and Redmond. ^;)

Cheers,
Dick Johnson

Penguin : Linux version 2.2.17 on an i686 machine (801.18 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [PATCH] fs/nls/Config.in

2000-10-19 Thread Tom Rini

On Thu, Oct 19, 2000 at 08:29:47PM +, Petr Vandrovec wrote:

> It is not correct. At first, duplicated define_bool breaks xconfig (AFAIK),
> and worse, first test is ignored at all by your code. Maybe something
> like (untested)
> 
> if [ "$CONFIG_SMB_FS" = "m" -o "$CONFIG_SMB_FS" = "y" ]; then
>   define_bool CONFIG_SMB_NLS y
> else
>   define_bool CONFIG_SMB_NLS n
> fi
> 
> if [ "$CONFIG_JOLIET" = "y" -o "$CONFIG_FAT_FS" != "n" \
>   -o "$CONFIG_NTFS_FS" != "n" -o "$CONFIG_NCPFS_NLS" = "y" \
>   -o "$CONFIG_SMB_NLS" = "y"; then
> define_bool CONFIG_NLS y
> else
> define_bool CONFIG_NLS n
> fi
> 
> could work (I did not checked whether CONFIG_FAT_FS & CONFIG_NTFS_FS
> are always defined).

This works as well, and FAT and NTFS are always defined.

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.2 generating odd TCP resets?

2000-10-19 Thread kuznet

Hello!

> Well, there were quite a few TCP bugs fixed after 2.2.14.  

Seems, it is that bug, which you have seen talking from
(sorry, I cannot pronounce this host name publically 8)) to amber.
ACK, following FIN was considered as illegal data.
We have fixed it both in 2.2 and 2.3.

Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [PATCH] cpu detection fixes for test10-pre4

2000-10-19 Thread H. Peter Anvin

Followup to:  <[EMAIL PROTECTED]>
By author:Mikael Pettersson <[EMAIL PROTECTED]>
In newsgroup: linux.dev.kernel
> 
> * include/asm-i386/elf.h:
>   - make Pentium IV and other post-P6 processors use the "i686"
> family name (same fix as the system_utsname.machine init fix
> which went into include/asm-i386/bugs.h in test10-pre4)
> 

We should never have used anything but "i386" as the utsname... sigh.

-hpa
-- 
<[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [BUG REPORT] Conflict between Tulip driver w/ LinkSys 100LNE and EEPro

2000-10-19 Thread Ian Stirling

> The problem: I can't have the Tulip and EEPro drivers loaded at the same
> time.  If I have the Tulip driver loaded, and I load the EEPro driver, the
> self check fails with 0x and complains that I don't have the card in
> a bus master slot.  If I have the EEPro driver loaded and the ether tested
> as working, and I insmod the tulip driver, this happens: 
> .
> Oct 18 10:13:33 zephyr kernel: eepro100: wait_for_cmd_done timeout!
> Oct 18 10:13:33 zephyr kernel: eepro100: wait_for_cmd_done timeout!
> Oct 18 10:14:02 zephyr last message repeated 27 times
> Oct 18 10:14:02 zephyr last message repeated 27 times
> Oct 18 10:14:04 zephyr kernel: eepro100: wait_for_cmd_done timeout!

I don't have exact details, but a similar thing happened to me.

Oct 16 16:46:54 mauve kernel: eth0: Intel Corporation 82557 [Ethernet Pro 100], 
00:A0:C9:10:63:9C, IRQ 9.
Oct 16 16:46:54 mauve kernel:   Board assembly 645477-004, Physical connectors 
present: RJ45 BNC AUI
Oct 16 16:46:54 mauve kernel:   Primary interface chip 80c24 PHY #0.
Oct 16 16:46:54 mauve kernel:   General self-test: passed.
Oct 16 16:46:54 mauve kernel:   Serial sub-system self-test: passed.
Oct 16 16:46:54 mauve kernel:   Internal registers self-test: passed.
Oct 16 16:46:54 mauve kernel:   ROM checksum self-test: passed (0x49caa8d6).
Oct 16 16:46:54 mauve kernel:   Receiver lock-up workaround activated.
Oct 16 16:46:54 mauve kernel: eth1: Intel Corporation 82557 [Ethernet Pro 100] (#2), 
00:A0:C9:10:82:37, IRQ 11.


Oct 16 16:49:10 mauve kernel: Linux Tulip driver version 0.9.9 (August 11, 2000)
Oct 16 16:49:10 mauve kernel: eth2: Digital DS21140 Tulip rev 34 at 0xf000, 
00:40:05:30:BF:8F, IRQ 10.
Oct 16 16:49:10 mauve kernel: eth2:  EEPROM default media type Autosense.
Oct 16 16:49:10 mauve kernel: eth2:  Index #0 - Media MII (#11) described by a 21140 
MII PHY (1) block.
Oct 16 16:49:10 mauve kernel: eth2:  MII transceiver #8 config 3100 status 7849 
advertising 01e1.

The Tulip card wouldn't respond, or send pings, and IIRC, came up with
3 errors per attempt to send a packet.

Both eepro100's worked fine.
It's a netgear FA310TX

If it'd be handy, I could do it again, and check exact results if needed.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Any dual AGP slot motherboards?

2000-10-19 Thread Timur Tabi

** Reply to message from James Simmons <[EMAIL PROTECTED]> on Thu, 19 Oct 2000
18:34:51 -0700 (PDT)


> Apple sells a computer with dual AGP slots.

I've never heard this. Could you tell me exactly which model this is?



-- 
Timur Tabi - [EMAIL PROTECTED]
Interactive Silicon - http://www.interactivesi.com

When replying to a mailing-list message, please direct the reply to the mailing list 
only.  Don't send another copy to me.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



RE: TRACED] Re: "Tux" is the wrong logo for Linux

2000-10-19 Thread Mark Haney

Richard Johnson wrote:
>Cary, NC. can't be very large. There are, probably, three persons in
>the whole county than have computers. Two haven't been booted since
>the day the were received by the kids because they've been busy
>studying for the M-CAP test.

Not true.  Cary is quite large and is the fastest growing city in NC as of
1999 figures.  It is right next to Raleigh and houses a lot of tech offices.
Lucent, Cable & Wireless, HP.  You would be amazed at the tech nology
centers there.  Matter of fact, Research Triangle Park is just down the
road.
Not all of NC, or the South for that matter, is a hotbed of ignorance.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard B.
Johnson
Sent: Thursday, October 19, 2000 2:32 PM
To: Dan Hollis
Cc: Alex Buell; [EMAIL PROTECTED]
Subject: Re: TRACED] Re: "Tux" is the wrong logo for Linux


On Thu, 19 Oct 2000, Dan Hollis wrote:
[Snipped...]

>
> The machine's physical location is in Cary, NC. Anyone live near there
> willing to make a personal visit to the location to identify the
> individual responsible?
>
> -Dan

"You get more respect with a kind word and a gun than a kind word".
- Al Capone.

Cary, NC. can't be very large. There are, probably, three persons in
the whole county than have computers. Two haven't been booted since
the day the were received by the kids because they've been busy
studying for the M-CAP test.

Cheers,
Dick Johnson

Penguin : Linux version 2.2.17 on an i686 machine (801.18 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: process header declaration?

2000-10-19 Thread Erik Mouw

On Thu, Oct 19, 2000 at 12:30:51PM -0500, Andrew C. Dingman wrote:
> I'm working on a project for my senior seminar for which I (and my
> profs) think I need to modify the process descriptor
> struct. Unfortunately, I don't seem to be good enough with 'grep' to
> figure out where the type is declared. Could someone give me a pointer
> to the right file in the 2.4.0-testX source code, or a good expression
> to grep for, please? I am subscribed to the list, but a cc wouldn't
> hurt, either. Thanks in advance for any help you feel inclined to
> offer.

find include/ -name "*.h" -exec grep '^struct task_struct' {} /dev/null \;

vi+ctags or emacs+etags are also good combinations to find identifiers
in the kernel source.

Or use the cross referencing tool at lxr.linux.no:

  http://lxr.linux.no/ident


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: [EMAIL PROTECTED]
WWW: http://www-ict.its.tudelft.nl/~erik/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: TRACED] Re: "Tux" is the wrong logo for Linux

2000-10-19 Thread Donald Sharp

On Thu, Oct 19, 2000 at 02:32:26PM -0400, Richard B. Johnson wrote:
> On Thu, 19 Oct 2000, Dan Hollis wrote:
> [Snipped...]
> 
> > 
> > The machine's physical location is in Cary, NC. Anyone live near there
> > willing to make a personal visit to the location to identify the
> > individual responsible?
> > 
> > -Dan
> 
> "You get more respect with a kind word and a gun than a kind word".
>   - Al Capone.
> 
> Cary, NC. can't be very large. There are, probably, three persons in
> the whole county than have computers. Two haven't been booted since
> the day the were received by the kids because they've been busy
> studying for the M-CAP test.

;)  Actually cary, nc is in one of the largest population centers 
of NC( although that's not really saying too much ).  It's located
sw of Raleigh and S of RTP.  If there were only 2-3 computers in the
county I'd have them all( and I really doubt that's true )

donald
> 
> Cheers,
> Dick Johnson
> 
> Penguin : Linux version 2.2.17 on an i686 machine (801.18 BogoMips).
> 
> "Memory is like gasoline. You use it up when you are running. Of
> course you get it all back when you reboot..."; Actual explanation
> obtained from the Micro$oft help desk.
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> Please read the FAQ at http://www.tux.org/lkml/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



[PATCH] cpu detection fixes for test10-pre4

2000-10-19 Thread Mikael Pettersson

This patch should fix the Pentium IV and other CPU detection
glitches which remain in test10-pre4.

The necessary fixes are:
* arch/i386/kernel/setup.c:
  - (Pentium IV) don't goto name_decoded, return instead; otherwise
x86_model_id which was grabbed from the extended cpuid levels
will be overwritten by the final sprintf
  - print cpu family as integer not char in /proc/cpuinfo (since
Pentium IV's family code 15 won't fit in a char)
* include/asm-i386/elf.h:
  - make Pentium IV and other post-P6 processors use the "i686"
family name (same fix as the system_utsname.machine init fix
which went into include/asm-i386/bugs.h in test10-pre4)

The following two fixes are desirable but not strictly necessary:
* arch/i386/kernel/microcode.c:
  - accept _only_ Intel P6, not P6-or-later
* include/asm-i386/bugs.h:
  - the check for K6 B-step chips is missing a family==5 test


/Mikael


--- linux-2.4.0-test10-pre4/arch/i386/kernel/microcode.c.~1~Sat Sep  9 12:49:37 
2000
+++ linux-2.4.0-test10-pre4/arch/i386/kernel/microcode.cThu Oct 19 13:19:31 
+2000
@@ -177,7 +177,7 @@
 
req->err = 1; /* assume the worst */
 
-   if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 < 6){
+   if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 != 6){
printk(KERN_ERR "microcode: CPU%d not an Intel P6\n", cpu_num);
return;
}
--- linux-2.4.0-test10-pre4/arch/i386/kernel/setup.c.~1~Thu Oct 19 13:06:18 
2000
+++ linux-2.4.0-test10-pre4/arch/i386/kernel/setup.cThu Oct 19 13:21:16 2000
@@ -1549,7 +1549,7 @@
/* Pentium IV. */
if (c->x86 == 15) {
get_model_name(c);
-   goto name_decoded;
+   return;
}
 
/* Names for the Pentium II/Celeron processors 
@@ -1688,12 +1688,12 @@
 #endif
p += sprintf(p,"processor\t: %d\n"
"vendor_id\t: %s\n"
-   "cpu family\t: %c\n"
+   "cpu family\t: %d\n"
"model\t\t: %d\n"
"model name\t: %s\n",
n,
c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown",
-   c->x86 + '0',
+   c->x86,
c->x86_model,
c->x86_model_id[0] ? c->x86_model_id : "unknown");
 
--- linux-2.4.0-test10-pre4/include/asm-i386/bugs.h.~1~ Thu Oct 19 13:06:25 2000
+++ linux-2.4.0-test10-pre4/include/asm-i386/bugs.h Thu Oct 19 13:19:31 2000
@@ -166,6 +166,7 @@
 static void __init check_amd_k6(void)
 {
if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
+   boot_cpu_data.x86 == 5 &&
boot_cpu_data.x86_model == 6 &&
boot_cpu_data.x86_mask == 1)
{
--- linux-2.4.0-test10-pre4/include/asm-i386/elf.h.~1~  Fri Jul 14 18:22:10 2000
+++ linux-2.4.0-test10-pre4/include/asm-i386/elf.h  Thu Oct 19 13:19:31 2000
@@ -93,7 +93,7 @@
For the moment, we have only optimizations for the Intel generations,
but that could change... */
 
-#define ELF_PLATFORM  ("i386\0i486\0i586\0i686"+((boot_cpu_data.x86-3)*5))
+#define ELF_PLATFORM  
+("i386\0i486\0i586\0i686"+(((boot_cpu_data.x86>6?6:boot_cpu_data.x86)-3)*5))
 
 #ifdef __KERNEL__
 #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Any dual AGP slot motherboards?

2000-10-19 Thread James Simmons


> There is no reason there cannot be multiple AGP buses. After all there are
> motherboards with 2,3,4 (or more!) PCI buses.

Apple sells a computer with dual AGP slots. I just was looking for a intel
box like this. Since AGP is a port on the PCI bus it is possible to have
more than one AGP port on a/each PCI bus but this requires the PCI chipset
to support this. 


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: TRACED] Re: "Tux" is the wrong logo for Linux

2000-10-19 Thread Richard B. Johnson

On Thu, 19 Oct 2000, Dan Hollis wrote:
[Snipped...]

> 
> The machine's physical location is in Cary, NC. Anyone live near there
> willing to make a personal visit to the location to identify the
> individual responsible?
> 
> -Dan

"You get more respect with a kind word and a gun than a kind word".
- Al Capone.

Cary, NC. can't be very large. There are, probably, three persons in
the whole county than have computers. Two haven't been booted since
the day the were received by the kids because they've been busy
studying for the M-CAP test.

Cheers,
Dick Johnson

Penguin : Linux version 2.2.17 on an i686 machine (801.18 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [PATCH] fs/nls/Config.in

2000-10-19 Thread Petr Vandrovec

On 19 Oct 00 at 11:00, Tom Rini wrote:
> --- fs/nls/Config.in.orig   Thu Oct 19 09:11:48 2000
> +++ fs/nls/Config.inThu Oct 19 09:49:53 2000
> @@ -4,8 +4,13 @@
>  
>  # msdos and Joliet want NLS
>  if [ "$CONFIG_JOLIET" = "y" -o "$CONFIG_FAT_FS" != "n" \
> -   -o "$CONFIG_NTFS_FS" != "n" -o "$CONFIG_NCPFS_NLS" = "y" \
> -   -o "$CONFIG_SMB_FS" != "n" ]; then
> +   -o "$CONFIG_NTFS_FS" != "n" -o "$CONFIG_NCPFS_NLS" = "y" ]; then
> +  define_bool CONFIG_NLS y
> +else
> +  define_bool CONFIG_NLS n
> +fi
> +
> +if [ "$CONFIG_INET" = "y" -a "$CONFIG_SMB_FS" != "n" ]; then
>define_bool CONFIG_NLS y
>  else
>define_bool CONFIG_NLS n

It is not correct. At first, duplicated define_bool breaks xconfig (AFAIK),
and worse, first test is ignored at all by your code. Maybe something
like (untested)

if [ "$CONFIG_SMB_FS" = "m" -o "$CONFIG_SMB_FS" = "y" ]; then
  define_bool CONFIG_SMB_NLS y
else
  define_bool CONFIG_SMB_NLS n
fi

if [ "$CONFIG_JOLIET" = "y" -o "$CONFIG_FAT_FS" != "n" \
  -o "$CONFIG_NTFS_FS" != "n" -o "$CONFIG_NCPFS_NLS" = "y" \
  -o "$CONFIG_SMB_NLS" = "y"; then
define_bool CONFIG_NLS y
else
define_bool CONFIG_NLS n
fi

could work (I did not checked whether CONFIG_FAT_FS & CONFIG_NTFS_FS
are always defined).
Best regards,
Petr Vandrovec
[EMAIL PROTECTED]

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: "Tux" is the wrong logo for Linux

2000-10-19 Thread Wayne . Brown



I have a simple solution for your problem.  Just call the police and have them
arrest whoever is holding a gun to your head and forcing you to use Linux and
this mailing list.  (That *is* the only reason you're here, right?)  Then you
can spend your time writing a wonderful OS of your own to take its place.  Let
us know when you're done, say in 20 years or so...


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



RE: TRACED] Re: "Tux" is the wrong logo for Linux

2000-10-19 Thread Mark Haney

Man, I wish I was close enough.  I am only about 4 hours from there, but I
woulnd't waste my time.  If he doesn't like it he can stick with Windows and
all of it's wonderful on time development and bug free environment.  ;)


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Dan Hollis
Sent: Thursday, October 19, 2000 2:05 PM
To: Alex Buell
Cc: [EMAIL PROTECTED]
Subject: Re: TRACED] Re: "Tux" is the wrong logo for Linux


On Thu, 19 Oct 2000, Alex Buell wrote:
> Feel free to send complaints to [EMAIL PROTECTED] and get his account
> yanked for abuse of mailing lists.

http://www.ilan.net/contact.htm for a nice list of addresses to send
complaints to.

The machine's physical location is in Cary, NC. Anyone live near there
willing to make a personal visit to the location to identify the
individual responsible?

-Dan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



RE: bind() allowed to non-local addresses

2000-10-19 Thread David Schwartz


> Due ot this and other reasons I'm restoring the 2.2.x behavior by
> default, but adding a sysctl so that systems using dynamic addressing
> may elect to get the different bind() behavior.
>
> Later,
> David S. Miller
> [EMAIL PROTECTED]

If a system uses dynamic addressing, binding to an IP that wasn't currently
available would be useless, since the odds are that this address would never
ever be available locally. In fact, if a machine had dynamic addressing, any
code that bound to a specific local IP would never be able to be connected
to once that IP was lost.

It is only machines that have static IPs that might not currently be usable
that would benefit from being able to bind to an address that wasn't
currently local. In this case, the IP may return to the machine in the
future.

DS

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: bind() allowed to non-local addresses

2000-10-19 Thread Andi Kleen

On Thu, Oct 19, 2000 at 10:45:02AM -0700, David S. Miller wrote:
> To this I agree, but I cannot change the fact that this assumption
> does exist in applications, so this is why I reverted the change.

Would you accept a patch for an setsockopt to enable it again ? 


-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: process header declaration?

2000-10-19 Thread Timur Tabi

** Reply to message from "Andrew C. Dingman"
<[EMAIL PROTECTED]> on Thu, 19 Oct 2000 12:30:51 -0500 (EST)


> I'm working on a project for my senior seminar for which I (and my
> profs) think I need to modify the process descriptor
> struct. Unfortunately, I don't seem to be good enough with 'grep' to
> figure out where the type is declared.

Spend the money to get a real editor, like Visual SlickEdit for Linux.  It
makes analyzing the Linux kernel ten times easier.  In this case, a single
keystroke would have told you where that structure (or any field in any
structure) is defined.



-- 
Timur Tabi - [EMAIL PROTECTED]
Interactive Silicon - http://www.interactivesi.com

When replying to a mailing-list message, please direct the reply to the mailing list 
only.  Don't send another copy to me.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Linux 2.2.18pre17

2000-10-19 Thread Marcelo Tosatti


On Thu, 19 Oct 2000, Alan Cox wrote:

> This is just to give folks something to sync against. Test it by all means
> however.
> 
> Must fix stuff left to do for 2.2.18final
> - Merge the S/390 stuff and make S/390 build again
> - Fix the megaraid (revert if need be)
> - Fix the ps/2 misdetect bug that has appeared
> - NFSv3 hang report
> - Get to the bottom of the VM mystery if possible
> 
> 2.2.18pre17
> o Move a few escaped m68k headers into the right  (me)
>   directory
> o Backport 2.4 AF_UNIX garbage collect speedups   (Dave Miller)
> o TCP fixes for NFS   (Saadia Khan)
> o Fix USB audio hangs (David Woodhouse)
> o Sparc64 dcache and exec fixes   (Dave Miller)
> o Fix typing crap in divert.h (Jeff Garzik)
> o Use pkt_type in diverter, add maintainer info   (Dave Miller)
> o Fix obscure NAT problem in FIB code (Dave Miller)
> o Fix sk->allocation in TCP sendmsg   (Marcelo Tossati)

This TCP fix was done by davem.

Any reason why the nbd fix was not included? 

Thanks

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: TRACED] Re: "Tux" is the wrong logo for Linux

2000-10-19 Thread Dan Hollis

On Thu, 19 Oct 2000, Alex Buell wrote:
> Feel free to send complaints to [EMAIL PROTECTED] and get his account
> yanked for abuse of mailing lists. 

http://www.ilan.net/contact.htm for a nice list of addresses to send
complaints to.

The machine's physical location is in Cary, NC. Anyone live near there
willing to make a personal visit to the location to identify the
individual responsible?

-Dan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Any dual AGP slot motherboards?

2000-10-19 Thread Dan Hollis

On Thu, 19 Oct 2000, Joel Jaeggli wrote:
> the AGP bus specification is for a single device (master)
> you can review it at:
> http://www.intel.com/technology/agp/agp_index.htm

There is no reason there cannot be multiple AGP buses. After all there are
motherboards with 2,3,4 (or more!) PCI buses.

-Dan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [PATCH] fs/nls/Config.in

2000-10-19 Thread Tom Rini

On Thu, Oct 19, 2000 at 07:55:42PM +0200, Sven Krohlas wrote:
> Hello,
> 
> > Hello all.  The attached patch changes the behavoir of fs/nls/Config.in from:
> 
> There's nothing attached...?

D'oh.  Look now. :)

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/


--- fs/nls/Config.in.orig   Thu Oct 19 09:11:48 2000
+++ fs/nls/Config.inThu Oct 19 09:49:53 2000
@@ -4,8 +4,13 @@
 
 # msdos and Joliet want NLS
 if [ "$CONFIG_JOLIET" = "y" -o "$CONFIG_FAT_FS" != "n" \
-   -o "$CONFIG_NTFS_FS" != "n" -o "$CONFIG_NCPFS_NLS" = "y" \
-   -o "$CONFIG_SMB_FS" != "n" ]; then
+   -o "$CONFIG_NTFS_FS" != "n" -o "$CONFIG_NCPFS_NLS" = "y" ]; then
+  define_bool CONFIG_NLS y
+else
+  define_bool CONFIG_NLS n
+fi
+
+if [ "$CONFIG_INET" = "y" -a "$CONFIG_SMB_FS" != "n" ]; then
   define_bool CONFIG_NLS y
 else
   define_bool CONFIG_NLS n



Re: bind() allowed to non-local addresses

2000-10-19 Thread David S. Miller

   Date:Thu, 19 Oct 2000 11:35:12 -0600
   From: Matt Peterson <[EMAIL PROTECTED]>

   Don't you find it a little compelling that the nearly identical JVM
   code passes the Java Compatibility test suite on Linux 2.2,
   Solaris, HPUX, SCO, and even Windows?

He is arguing that returning an error for a non-local address being
sent to bind() is an implementation dependency and should not be
something JRE absolutely requires.  It is a dark corner of the BSD
socket API and not written in stone anywhere, therefore it is bad
to create a dependency upon it.

To this I agree, but I cannot change the fact that this assumption
does exist in applications, so this is why I reverted the change.

Later,
David S. Miller
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: process header declaration?

2000-10-19 Thread Richard B. Johnson

On Thu, 19 Oct 2000, Andrew C. Dingman wrote:

> I'm working on a project for my senior seminar for which I (and my
> profs) think I need to modify the process descriptor
> struct. Unfortunately, I don't seem to be good enough with 'grep' to
> figure out where the type is declared. Could someone give me a pointer
> to the right file in the 2.4.0-testX source code, or a good expression
> to grep for, please? I am subscribed to the list, but a cc wouldn't
> hurt, either. Thanks in advance for any help you feel inclined to
> offer.

The file /usr/include/linux/sched.h contains the structure task_struct.
A pointer, called current, gets initialized to point to one of these
for every task on the system.


Cheers,
Dick Johnson

Penguin : Linux version 2.2.17 on an i686 machine (801.18 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: bind() allowed to non-local addresses

2000-10-19 Thread Andi Kleen

On Thu, Oct 19, 2000 at 11:35:12AM -0600, Matt Peterson wrote:
> Again, there is not a bug in the JVM's handling of
> java.net.DatagramSocket().  I offered the JVM as an example only because
> it is one application that I know of expects the standardized behavior
> of bind().  The bind() behavior in Linux 2.4 is not an issue because it

As Alan noted (and I just verified) Single Unix is vague enough that I 
think the Linux behaviour is compliant. The point is that the Sun test
is broken on any machines with dynamic IP (=most machines on the internet
today), because it could have any address available locally.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: bind() allowed to non-local addresses

2000-10-19 Thread Matt Peterson

Andi Kleen wrote:
> 
> > The JRE compliance tests have a test which makes sure that for a
> > non-local addresses, bind() returns an error code, specifically
> > -EADDRNOTAVAIL.
> 
> Sounds like a bug that should be reported to Sun.
> 

Hello?  Send a bug to Sun?   I don't see any logic here.  I have traced
through the Sun code all the way to the bind() call and through to the
code in the kernel where the check for local interfaces is ignored.  The
JVM code path is VERY simple and ends up in a straightforward call to
bind().  The same problem is easily reproduced in C code.  There is NOT
a bug in the JVM code that handles java.net.DatagramSocket.  Don't you
find it a little compelling that the nearly identical JVM code passes
the Java Compatibility test suite on Linux 2.2, Solaris, HPUX, SCO, and
even Windows?  

I might even go as far as to argue that there is not a problem with the
JCK test suite either.  The BSD Socket interface is documented.  It may
be a little shady in some areas (this being one of them) but at least
the Sun test suite is expecting the documented (look at any man page or
sockets reference) and long standing behavior of bind().  Any argument
for changing the way bind() works needs to be able to stand up to the
challenge of developers who are expecting bind() to behave the way it
has for many years on many different platforms.  

Again, there is not a bug in the JVM's handling of
java.net.DatagramSocket().  I offered the JVM as an example only because
it is one application that I know of expects the standardized behavior
of bind().  The bind() behavior in Linux 2.4 is not an issue because it
affects Java only -- it is an issue because it also affects other
applications and developers that are likewise expecting the traditional
bind() behavior.

-- 
Matthew Peterson
Sr. Software Engineer
Caldera Systems, Inc
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: "Tux" is the wrong logo for Linux

2000-10-19 Thread Kevin Buhr

KMF AV <[EMAIL PROTECTED]> writes:
> 
> ... obviously the Linux logo should be the
> international symbol for the fucking retard.

Actually, this was considered.  However, in those dark days, the ISO
had not yet standardized the international symbol for the fucking
retard.  A symbol for "dimwit crossing" was in wide-spread use, and it
had been incorporated into an ANSI draft standard, but there were
certain legal issues---Microsoft claimed it infringed on their "flying
windows" trademark.

Instead, the penguin, the stupidest and nastiest of all flightless
birds (ostrich?  BZZZT-thanks-for-playing!) was felt to best symbolize
the glorious mosaic that is the Linux development community.

But, thanks for your input!

Kevin <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



process header declaration?

2000-10-19 Thread Andrew C. Dingman

I'm working on a project for my senior seminar for which I (and my
profs) think I need to modify the process descriptor
struct. Unfortunately, I don't seem to be good enough with 'grep' to
figure out where the type is declared. Could someone give me a pointer
to the right file in the 2.4.0-testX source code, or a good expression
to grep for, please? I am subscribed to the list, but a cc wouldn't
hurt, either. Thanks in advance for any help you feel inclined to
offer.

Andrew C. Dingman
dingman at cs dot earlham dot edu

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: TCP: peer x.x.x.x:y/z shrinks window a:b:c...

2000-10-19 Thread kuznet

Hello!

> I'll keep looking.

Is it easy to reproduce? If so, try to make tcpdump, which
covers one of these messages.

Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



[c.bailiff@E-SECURE.COM.AU: Re: IIS %c1%1c remote command execution]

2000-10-19 Thread Michael H. Warfield

This is being forwarded from BugTraq where there is an ongoing
discussion over a security hole in IIS based on it's unicode decoder.
This particular individual is stating that several unicode decoders,
including the one in the Linux unicode_console driver, have failed to
adhere to certain security warnings in some RFCs.  This IMPLIES that
there is a potential security problem in all of them.

Anyone familiar with this who can comment on the problem in the
Linux unicode_console driver?

Mike
-- 
 Michael H. Warfield|  (770) 985-6132   |  [EMAIL PROTECTED]
  (The Mad Wizard)  |  (678) 463-0932   |  http://www.wittsend.com/mhw/
  NIC whois:  MHW9  |  An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471|  possible worlds.  A pessimist is sure of it!
--
Michael H. Warfield,| Voice: (678)443-6000  (678)443-6123
Senior Researcher - X-Force | Fax:   (678)443-6477
Internet Security Systems, Inc. | E-Mail:  [EMAIL PROTECTED]  [EMAIL PROTECTED]
6600 Peachtree Dunwoody RD NE   | http://www.iss.net/
300 Embassy Row, Suite 500  | http://www.wittsend.com/mhw/
Atlanta, GA 30328   | PGP Key: 0xDF1DD471

- Forwarded message from Cris Bailiff <[EMAIL PROTECTED]> -

Approved-By: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
X-Mailer: Mozilla 4.73 [en] (X11; I; Linux 2.2.15-4mdk i686)
X-Accept-Language: en
Date: Thu, 19 Oct 2000 21:07:57 +1100
Reply-To: Cris Bailiff <[EMAIL PROTECTED]>
From: Cris Bailiff <[EMAIL PROTECTED]>
Subject:  Re: IIS %c1%1c remote command execution
To: [EMAIL PROTECTED]

> Florian Weimer <[EMAIL PROTECTED]> writes:
>
> This is one of the vulnerabilities Bruce Schneier warned of in one of
> the past CRYPTO-GRAM isssues.  The problem isn't the wrong time of
> path checking alone, but as well a poorly implemented UTF-8 decoder.
> RFC 2279 explicitly says that overlong sequences such as 0xC0 0xAF are
> invalid.

As someone often involved in reviewing and improving other peoples web code, I
have been citing the unicode security example from RFC2279 as one good reason why
web programmers must enforce 'anything not explicitly is allowed is denied'
almost since it was written. In commercial situations I have argued myself blue
in the face that the equivalent of (perl speak) s!../!!g is not good enough to
clean up filename form input parameters or other pathnames (in perl, ASP, PHP
etc.). I always end up being proved right, but it takes a lot of effort. Should
prove a bit easier from now on :-(

>
> It's a pity that a lot of UTF-8 decoders in free software fail such
> tests as well, either by design or careless implementation.

The warning in RFC 2279 hasn't been heeded by a single unicode decoder that I
have ever tested, commercial or free, including the Solaris 2.6 system libraries,
the Linux unicode_console driver, Netscape commuicator  and now, obviously, IIS.
Its unclear to me whether the IIS/NT unicode decoding is performed by a system
wide library or if its custom to IIS - either way, it can potentially affect
almost any unicode aware NT application.

I have resisted upgrading various cgi and mod_perl based systems to perl5.6
because it has inbuilt (default?) unicode support, and I've no idea which
applications or perl libraries might be affected. The problem is even harder than
it looks - which sub-system, out of the http server, the perl (or ASP or PHP...)
runtime, the standard C libraries and the kernel/OS can I expect to be performing
the conversion? Which one will get it right? I think Bruce wildly understated the
problem, and I've no idea how to put the brakes on the crash dive into a
character encoding standard which seems to have no defined canonical encoding and
no obvious way of performing deterministic comparisons.

I suppose as a security professional I should be happy, looking forward to a
booming business...

Cris Bailiff
[EMAIL PROTECTED]

- End forwarded message -
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



  1   2   3   4   >