Linux-Development-Sys Digest #28, Volume #7       Sat, 7 Aug 99 03:14:23 EDT

Contents:
  Re: mmap with Kernel 2.2.5 (ellis)
  Re: Toshiba DVD-RAM and Linux ("Hartmut W. Malzahn")
  printk ??? ("Hung P. Tran")
  Re: Rewriting Linux ..... (Dave Hearn)
  Re: GCC byte alignment flag for structures (Ulrich Weigand)
  Re: GCC byte alignment flag for structures (Matthew Carl Schumaker)
  Re: does egcs 1.1.2 produce stable kernels? (Juergen Heinzl)
  Re: GCC byte alignment flag for structures (Matthew Carl Schumaker)
  memory mapping ([EMAIL PROTECTED])
  Re: 2.2.x(?) problem with SO_LINGER... (cirrus)
  Re: 2.2.x(?) problem with SO_LINGER... (cirrus)
  Re: Rewriting Linux ..... (Christopher Browne)
  Re: NTFS Status? (Randall Parker)
  Re: How many thread can I use with Linux (Kaz Kylheku)
  Re: I/O problem (Karl Heyes)
  Device driver programming and C++ ("Andrey Fisunenko")
  Re: RW ATAPI CDROM how to use (Aaron Ginn)
  Re: RW ATAPI CDROM how to use (Aaron Ginn)
  Re: no-lilo problem (Neil Koozer)

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

From: [EMAIL PROTECTED] (ellis)
Subject: Re: mmap with Kernel 2.2.5
Date: 6 Aug 1999 23:37:06 GMT

In article <[EMAIL PROTECTED]>,
Mark Zamonski  <[EMAIL PROTECTED]> wrote:

>I copied this block of code from the
>/usr/src/linux-2.2.5/drivers/char/mem.c driver, so I can't figure out
>why "pgprot_noncached' isn't defined.

Because it is defined as static in mem.c:

static inline unsigned long pgprot_noncached(unsigned long prot)

--
http://www.fnet.net/~ellis/photo/linux.html

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

From: "Hartmut W. Malzahn" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Re: Toshiba DVD-RAM and Linux
Date: Sat, 07 Aug 1999 01:26:25 +0200

Hi Steve!

Steve McIntyre wrote:
> >Using the strace-command i can see, that thwe Device-Hang occurs, when the
> >Kernel does an fsync.
> In our experiments at work the Toshiba DVD-RAM drive does not appear to be
> happy with 6-byte write commands. Changing them to 10-byte commands from
> our application seemed to fix the similar problems we saw.

I am currently trying to install just that Toshiba DVD-RAM in my Linux
server and am experiencing that same problem (hangs when written to). Is
there a kernel patch or any other means to make Linux use 10-byte write
commands as you mentioned?

Best regards,
Hartmut Malzahn

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

From: "Hung P. Tran" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: printk ???
Date: Sat, 07 Aug 1999 00:01:33 GMT

I am having trouble getting printk to work in my driver.
I tried:

printk(KERN_CRIT "start of init_module\n");

It's NOT working. I also get a warning when compiling my driver:

warning: implicit declaration of function printk_R1d7b4074

Any idea what happened ???

Thank you in advance,

hung




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

From: Dave Hearn <[EMAIL PROTECTED]>
Subject: Re: Rewriting Linux .....
Date: Fri, 06 Aug 1999 21:26:48 +0100


Whay if you wanted a OS kernel you could assess in security
terms to provide a platform, for example, upon which to build
trustworthy firewalls? I would have thought the assessment would
be harder in the monolithic case

Dave


M van Oosterhout wrote:
> 

> 
> Basically, WHY do you want a microkernel?
> 
> Microkernels are not intrinsically any better than monolithic kernels.
> Anything can be done in either.
> 
[snip...]
> 
> Martijn van Oosterhout
> Australia

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

From: [EMAIL PROTECTED] (Ulrich Weigand)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: GCC byte alignment flag for structures
Date: 7 Aug 1999 01:59:01 +0200

Matthew Carl Schumaker <[EMAIL PROTECTED]> writes:

>Well after much searching I finally found the flag -malign-double which seems
>to align everything to 8bytes if anyone has some more background info on
>this flag (I can't find any documentation on it) I would appreciate it

To quote the gcc info pages:

`-malign-double'
`-mno-align-double'
     Control whether GNU CC aligns `double', `long double', and `long
     long' variables on a two word boundary or a one word boundary.
     Aligning `double' variables on a two word boundary will produce
     code that runs somewhat faster on a `Pentium' at the expense of
     more memory.

     *Warning:* if you use the `-malign-double' switch, structures
     containing the above types will be aligned differently than the
     published application binary interface specifications for the 386.


(Note that a 'word' refers here to 4 bytes, not 2.)

If you have struct members of *other* types than floating-point,
you can also use the 'aligned' attribute to specify arbitrary
alignment, like this:

struct foo
{
  /* some members ... */
  int some_member __attribute__((aligned (8)));
  /* more members ... */
};

This would force the 'some_member' to be always aligned on a 8 bytes
boundary.

-- 
  Ulrich Weigand,
  IMMD 1, Universitaet Erlangen-Nuernberg,
  Martensstr. 3, D-91058 Erlangen, Phone: +49 9131 85-7688

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

From: Matthew Carl Schumaker <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: GCC byte alignment flag for structures
Date: Fri, 6 Aug 1999 18:14:05 -0400

Well after much searching I finally found the flag -malign-double which
seems
to align everything to 8bytes if anyone has some more background info on
this flag (I can't find any documentation on it) I would appreciate it

thanks
matt

Matthew Carl Schumaker
UPAC Lights Administrative Chairperson
[EMAIL PROTECTED]
veni, vedi, velcro
I came, I saw, I stuck around

> 
> > On Fri, 6 Aug 1999, Matthew Carl Schumaker wrote:
> > > I'm haveing abit of a problem passing a data structure from a Linux
> > > machine to an NT machine, it turns out that the NT machine compiles the
> > > structure using 8 byte alignment while the Linux is using (2/4 ?) I've
> > > found a couple flags for gcc but they don't seem to change the structure
> > > size, Anybody know of the flag for this for gcc?  
> > 
> > Change the NT machine to use 32 bit alignment instead. 
> > 
> > 
> > -- 
> > tth
> > 
> > 
> > 
> 
> 
> 


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

From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: does egcs 1.1.2 produce stable kernels?
Date: Sat, 07 Aug 1999 00:59:46 GMT

In article <[EMAIL PROTECTED]>, Klamer Schutte wrote:
>Erik de Castro Lopo wrote:
>> 
>> Arnoud de Geus wrote:
>> >
>> > Hello
>> >
>> > Does the egcs 1.1.2 compiler produce stable
>> > kernels? Just recently, there were problems
>> > using egcs for kernel build.
>> 
>> Only use EGCS for 2.2.0 and later kernels. The problems
>> with using EGCS were specific to earlier kernels.
>
>Is this also true for newer egcs (like gcc 2.95?) I found the wordings
>in the announcement (and the FAQ) quite scary -- esp. the aliasing part.
>I must say, it was more scary then understandeble because:
>- I do not have exact understanding of the ANSI C standard
>- I do not have exact knowledge of Linux kernel internals
>and the wording made these thing seemingly necessary.
>
>Any inputs from experts is appreciated. I now use kernel 2.2.9

Yes, looks like the latest XFree release requires that too. Let
me say it this way ... gcc-2.95 is still hot and crispy ... never
trust a compiler that is still hot and crispy 8)

I've got gcc-2.7.2.3 installed just for the kernel, nothing else,
better safe than sorry. That it runs does not mean all is fine and
until there is a sort of an offical okay I will leave it at that for
now. Statements of the "it works for me" kind are pretty worthless
as 5 minutes later the same one might be busy digging for the
backup tape.

Take care,
Juergen

-- 
\ Real name     : J�rgen Heinzl                 \       no flames      /
 \ EMail Private : [EMAIL PROTECTED] \ send money instead /

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

From: Matthew Carl Schumaker <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: GCC byte alignment flag for structures
Date: Fri, 6 Aug 1999 17:36:09 -0400

I wish I could except that we have about a dozen apps using this structure
distributed to about 600 clients (this problem is server side obviously)

recompiling all the apps and distributing them is an absolute last resort 

Matthew Carl Schumaker
UPAC Lights Administrative Chairperson
[EMAIL PROTECTED]
veni, vedi, velcro
I came, I saw, I stuck around

On Fri, 6 Aug 1999, Torbjorn Tallroth wrote:

> On Fri, 6 Aug 1999, Matthew Carl Schumaker wrote:
> > I'm haveing abit of a problem passing a data structure from a Linux
> > machine to an NT machine, it turns out that the NT machine compiles the
> > structure using 8 byte alignment while the Linux is using (2/4 ?) I've
> > found a couple flags for gcc but they don't seem to change the structure
> > size, Anybody know of the flag for this for gcc?  
> 
> Change the NT machine to use 32 bit alignment instead. 
> 
> 
> -- 
> tth
> 
> 
> 


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

From: [EMAIL PROTECTED]
Subject: memory mapping
Date: Fri, 06 Aug 1999 21:54:34 GMT

Dear all:
I'm new to the memory mapping issue, hence the question:
I'm writing kernel modules and would like to have a kernel memory block (e.g. 
start at physical address 0x07D00000) be mapped to user space. Can I just use 
remap_page_range(). If so, I wonder more details, if not, then how?
Look fordward to your reply

Thanks in advance
Daniel

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

From: cirrus <[EMAIL PROTECTED]>
Subject: Re: 2.2.x(?) problem with SO_LINGER...
Date: 7 Aug 1999 01:34:53 GMT


when l_onoff is nonzero and l_linger is zero, the action upon the closing
of the socket is to send a RST and _abort_ the connection instead of the usual
4 way FIN/ACK. I said this before and my first post is correct.
SO_LINGER option does alter the behavior upon a close() like you say, and also 
as I say in most implementations (including 2.0.x linux).

here is some quoted text by  Richard Stevens in Unix Network Programming:
   "If l_onoff is nonzero and l_linger is 0, TCP aborts the connection when 
    is is closed. (pp. 1019 - 1020 of TCPv2). That is, TCP discards any data
    still remaining in the socket send buffer and sends an RST to the peer, 
    not the normal four-packet connection termination sequence. ... This 
    avoids TCP's TIME_WAIT state ... Some implementations, notably Solaris
    2.x where x <= 5, do not implement this feature of the SO_LINGER option"

 
  Linux kernel 2.0.x _did_ implement this feature, and so I expect it to be 
 supported in 2.2.x. If it is no longer supported for some reason, as far as I
 can tell it is not documented.
-James

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

From: cirrus <[EMAIL PROTECTED]>
Subject: Re: 2.2.x(?) problem with SO_LINGER...
Date: 7 Aug 1999 01:36:46 GMT

yes, it is supposed to do this. It was implemented in 2.0.x kernels.
-James

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

From: [EMAIL PROTECTED] (Christopher Browne)
Subject: Re: Rewriting Linux .....
Reply-To: [EMAIL PROTECTED]
Date: Sat, 07 Aug 1999 02:40:01 GMT

On Fri, 6 Aug 1999 02:06:05 +0200, Torbjorn Tallroth
<[EMAIL PROTECTED]> wrote: 
>On Fri, 6 Aug 1999, Indigo news wrote:
>> I was just wondering if anyone here was interested in trying to port linux
>> from a monolithic kernel to a micro kernel. This sounds like a really big
>> thing, but hopefully, with a bit of work, it should be possible to allow the
>> execution of programs that were designed for the monolithic approach.
>
>I've been thinking about it for one reason: To save some recompilations.
>But thinking is one thing and doing is another...

On the gripping hand, rewriting and redebugging Linux so as to run as
a multiserver atop a microkernel results in there being a whole lot
MORE recompilations.

If you really want to use a multiserver microkernel system, it would
be a much wiser idea to look at Hurd, which has that as its express
purpose.
-- 
"If you were plowing a field, which would you rather use?  Two strong oxen
 or 1024 chickens?"
-- Seymour Cray
[EMAIL PROTECTED] <http://www.ntlug.org/~cbbrowne/oshurd.html>

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

From: [EMAIL PROTECTED] (Randall Parker)
Subject: Re: NTFS Status?
Date: Fri, 6 Aug 1999 20:20:48 -0700

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
says...
> As long the ntfs driver is the one delivered with the kernel source and the
> kernel version is 2.2.x, it should work with just mounting the volume. Here
> it recognizes both ntfs4 and ntfs5, compressed and uncompressed partitions.

Igor,

Do you do writes to the NTFS partitions from Linux?

I am wondering how stable NTFS is on Linux for writing. Is it stable 
enough to, say, put a database on an NTFS partition and do lots of 
updates on it?

Which file systems on Linux (aside from ext2) are considered to be stable 
enough for doing lots of writes in real production work?

Also, does Linux still have the 2 Gig file size limit when accessing 
files on an NTFS partition?

> I have ntfs partitions in /etc/fstab and they are being mounted all the
> time. On ntfs4 partitions, everything works so far (except raid). On ntfs5
> partitions, encrypted filesystem does not work, for obvious reasons. Linux
> ntfs driver has shown not to have any problem with other nice things like
> preparsing points or native compound storage, while nt4 has a problem with
> these.... but now I started to blah blah too much again.
> 
> Short: update to the 2.2.x kernel, if you havent done so allready, and
> everything will work. You need not do anything special to support compressed
> ntfs partitions, the ntfs driver will handle this well, automagically and
> totally transparent to you.

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Crossposted-To: comp.os.linux.development,comp.os.linux.development.apps
Subject: Re: How many thread can I use with Linux
Date: Sat, 07 Aug 1999 05:08:58 GMT

On Sat, 7 Aug 1999 08:37:49 +0900, Junedong Kim <[EMAIL PROTECTED]> wrote:
>Hello, I wonder how many thread could run on kernel 2.2 simultaneously
>In my Linux box, with kernel 2.0x,
>
>I saw /usr/include/loca_lim.h,
>it said max num od thread in a process 64 and
>max implementation 1024,
>
>I think it so hard! did I refer right info?
>if so, How can I increase the max num of implemented thread
>pleaz, tell me real fact about that.

You should be looking to find out how to minimize your application's use of
threads, rather than how to increase the system limits.  If you need to create
as many, or more threads, as a regular Linux kernel setup allows you, you are
doing something wrong.  Maybe you don't have a lot of experience designing
threaded applications, so you think that every object (or client, or cell in a
matrix, or what have you) needs its own thread. It seems that every programmer
who learns about threads wants to do things this way. A few threads are better
than just one, so a huge number of threads must awesome!

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

From: Karl Heyes <[EMAIL PROTECTED]>
Subject: Re: I/O problem
Date: Fri, 06 Aug 1999 10:44:54 +0100



"J. Escalante" wrote:

> I am running LINUX slackware 4 at home, my problem is that I don't get
> any output on the screen, cout << "Name" << endl; does not output
> anything and neither does prontf("Name");
> If you know what the problem could be I would appreciate an email at
> [EMAIL PROTECTED]

try printf ("Name\n") or use fflush afterwards.  cout will be an issue of
buffering as well.

karl.


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

From: "Andrey Fisunenko" <[EMAIL PROTECTED]>
Subject: Device driver programming and C++
Date: Sat, 7 Aug 1999 08:34:34 +0300

Hi all!

I try to write device driver that support several ISA-adapters and the same
high-level protocol.
All of that HW stuff have to perform a same operations.
In WinNT I've solve this problem by using the base class with virtual
functions that are implement that operations.

The attempt to apply this approach in Linux loadable module leads to errors
when loading it.
The message that "__rtti_user and __rtti_si " not found appears.

g++ RTTI cannt be disabled by command line keys (may be I am wrong, at least
I cant find in man) like it can be made in BC++, VC++, Watcom C++.

The questions are "Can the Linux kernel mode loadable modules execute code
that uses classes with virtual functions?"
or "How can I disable RTTI?"

PS.
My questions is beyond of discussion of C++ usage in kernel mode drivers
:-).

Andrey.





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

From: Aaron Ginn <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: RW ATAPI CDROM how to use
Date: 06 Aug 1999 16:18:24 -0700

Keith Wright <[EMAIL PROTECTED]> writes:

> Robin Becker <[EMAIL PROTECTED]> writes:
> 
> > I'm running a home brew linux based on 2.0.36. I can read my memorex
> > crw22 atapi cdrom, but don't know how(or tools) to use it for writing
> > cds.
> 
> ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/
> 
> I am not sure this supports your CD drive, it is meant for SCSI CDs,
> but includes some kludge that makes ATAPI look like SCSI for some
> purposes.  If it doesn't work you may be SOL, because it's all
> there is as far as I know.  Also look for the CD-Writing-HOWTO.
> 
> You must build this from source, even if you have RedHat already.
> RH does not include a package for it.  Do they use MicroSoft


FYI, you can rpms for cdrecord (and just about anything else) at the
following URL

        http://rufus.w3.org/linux/RPM

Aaron

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

From: Aaron Ginn <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: RW ATAPI CDROM how to use
Date: 06 Aug 1999 16:23:48 -0700

Robin Becker <[EMAIL PROTECTED]> writes:

> In article <[EMAIL PROTECTED]>, Keith Wright
> <[EMAIL PROTECTED]> writes
> >Robin Becker <[EMAIL PROTECTED]> writes:
> >
> >> I'm running a home brew linux based on 2.0.36. I can read my memorex
> >> crw22 atapi cdrom, but don't know how(or tools) to use it for writing
> >> cds.
> >
> >ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/
> >
> I have kludged the kernel to use scsi emulation. Seems a bit weird to do
> it that way, but can read both cdroms as sr0, sr1. cdrecord seems to be
> working on the RW, but Now I've to check all of the loopback mkisofs
> nonsense to see if I can actually burn a disc.

It's not really nonsense to check your iso image.  This insures that the
image was properly created as an ISO9660 filesystem before you burn it.
Windows doesn't provide a mechanism for you to do this; all you can do
is hope the image was created properly and then burn it.  You don't _have_
to check the image.  After you've burned a few CDs successfully, it's
probably safe to assume that mkisofs is doing its job properly.

Aaron

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

From: Neil Koozer <[EMAIL PROTECTED]>
Subject: Re: no-lilo problem
Date: Fri, 06 Aug 1999 22:40:40 +0000

Konrad Mierendorff wrote:

> Joe Pfeiffer wrote:
> > You have to have LILO.  A bit more precisely, you have to have a boot
> > loader -- something sitting in the boot sector that tells the machine
> > how to load the OS.  The normal boot loader for Linux is LILO.
>
> I'm wondering if it's possible to "dd" the kernel-image, like it is
> possible on floppy disks.
>
> - Konrad Mierendorff

Yes.  this is how you make a "simple" boot disk.  The first 512 bytes of
the kernel image contains a floppy boot loader.  All you have to do is:

dd if=/vmlinuz of=/dev/fd0                      #using your correct path &
filename

also you can do:

cp /vmlinuz /dev/fd0

Neil.



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


** FOR YOUR REFERENCE **

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

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.development.system) via:

    Internet: [EMAIL PROTECTED]

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

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

Reply via email to