Linux-Development-Sys Digest #908, Volume #7 Fri, 26 May 00 09:13:13 EDT
Contents:
Re: Need ideas for university funded project for linux (David T. Blake)
Re: Walking through Linux file system (Josef Moellers)
semaphores with linux (chtafun)
Re: Need ideas for university funded project for linux ("Peter T. Breuer")
Re: semaphores with linux (Franck Guillaud)
Re: porting NT device drivers to linux (Jonathan de Boyne Pollard)
realloc for kernel (Olaf Petzold)
Re: 970Cxi - HP refuses to help customer (Ronald Cole)
Re: 2.2 -> 2.3.99pre9 kernel API changes (Aki M Laukkanen)
2.4.0-test1 is this normal? (Mike Dowling)
how to send messages ("Houppertz Xavier")
Re: Writing driver for AMCC 5933 based PCI card (Robert Kaiser)
Re: virt_to_phys vs pgd/pmd/pte_offset calls (Robert Kaiser)
Re: how to send messages (Lew Pitcher)
Re: Need ideas for university funded project for linux (David T. Blake)
Re: how to send messages (Alan Donovan)
Re: Kernel module-user process comms (Alan Donovan)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (David T. Blake)
Crossposted-To:
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.advocacy
Subject: Re: Need ideas for university funded project for linux
Date: 24 May 2000 21:48:30 GMT
Reply-To: [EMAIL PROTECTED]
George Russell <[EMAIL PROTECTED]> wrote:
> On 23 May 2000 13:07:01 GMT, David T. Blake <[EMAIL PROTECTED]> wrote:
> >> The right is non-exlusive. That means everyone can get that right. I
> >> think TrollTech is just trying to prevent forking of the Qt library
> >> here.
I did not write this. Please set your attributions properly.
> Forking is allowed. Distribution via patches from pristine
> source - just like what dpkg and rpm source files can do for you.
> Is that too fucking hard?
You specifically MUST distribute Trolltech's version of QT along
with whatever patches you distribute with them. That hardly allows
forking. You may not think of using patch as much of an
impediment to acceptance, but it is sufficient to prevent 99.9%
of end users from EVER using a fully functional port. It prevents
forking, plain and simple.
Note followups.
--
Dave Blake
[EMAIL PROTECTED]
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: Walking through Linux file system
Date: Fri, 26 May 2000 08:20:36 +0200
"H. Peter Anvin" wrote:
> =
> Followup to: <8gjk6o$n0i$[EMAIL PROTECTED]>
> By author: Serge NOEL <[EMAIL PROTECTED]>
> In newsgroup: comp.os.linux.development.system
> >
> > Hi, I would walk in the tree of a linux filesystem, under =B5$Oft, i =
use t
> > he FindFile for walking. But with Linux, I do'nt know how to do that,=
I'
> > ve seen the getdents() but the dent entrie does'nt say if you see a d=
ire
> > ctory or a file. Perhaps is-it the wrong way ? Could someone help me =
to
> > do that.
> >
> > I would :
> > Begin in a tree. Scan the entries and determine if the answer if a =
fil
> > e, a link, a directory, ...
> >
> =
> RTFM(opendir, readdir, closedir, stat)
You may also want to consider ftw().
-- =
Josef M=F6llers
Fujitsu Siemens Computers
SHV Server DS 1
------------------------------
From: chtafun <[EMAIL PROTECTED]>
Subject: semaphores with linux
Date: Fri, 26 May 2000 07:27:30 +0100
How to use semaphores in C with linux ?
Is there web site about this ?
thanks
------------------------------
From: "Peter T. Breuer" <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.setup,comp.os.linux.advocacy
Subject: Re: Need ideas for university funded project for linux
Date: 25 May 2000 19:41:07 GMT
In comp.os.linux.misc Jim Richardson <[EMAIL PROTECTED]> wrote:
: On 25 May 2000 04:54:09 GMT,
: Peter T. Breuer, in the persona of <[EMAIL PROTECTED]>,
: brought forth the following words...:
:>In comp.os.linux.misc Jim Richardson <[EMAIL PROTECTED]> wrote:
:>: Sure, you can replicate the functionality in RPM or Deb easily enough, but
:>: not with just the ./configure;make;make install mentioned. (At least not
:>: without the connivence of the writer of the ./configure script.) RPM allready
:>
:>setenv INSTALL "pkginstall install -c"
: Having logged it, what tool do you use to check before removing/upgrading
: something?
less and grep.
: (this is slackware you are discussing, right? )
Yep. You can also do a dry run with removepkg or installpkg and the right
flag. I don't bother since I'm hardly likely to remove libc. I do have to
keep remembering not to remove tk/tcl 4.0/7.1 4.1/7.2 etc. etc though!
I.e. there is a nonzero probability that I will upgrade+remove an old
package which will leave some other old utility high and dry, leaning
on nothing. But it's very unlikely, as I "know what I'm doing". I
wouldn't do a remove without looking hard for binaries that used its
dynamic libraries. Meta-compilers have got me on occasion though.
Peter
------------------------------
From: Franck Guillaud <[EMAIL PROTECTED]>
Subject: Re: semaphores with linux
Date: Fri, 26 May 2000 09:02:40 +0200
Hello,
chtafun wrote:
>
> How to use semaphores in C with linux ?
> Is there web site about this ?
> thanks
info pages from libc, pthreads section.
Franck.
------------------------------
From: Jonathan de Boyne Pollard <[EMAIL PROTECTED]>
Crossposted-To: comp.os.ms-windows.programmer.nt.kernel-mode
Subject: Re: porting NT device drivers to linux
Date: Fri, 26 May 2000 07:38:46 +0100
MS> And how is the `chicken and egg' problem solved within NT ?
MS>
MS> Such as:
MS>
MS> - I need the SCSI driver aic7xxx to access the filesystem, and
MS> the aic7xxx needs to access the file system to get the DLL ?
NT solves this by having an operating system loader that is smart and several
"start classes" of device drivers. NTLDR does quite a lot of work before the
NT kernel proper gains control. Part of this work is reading from file the
device drivers that are in the "Boot" start class, which is done soon after
the kernel and HAL are themselves read from the files NTOSKRNL.EXE and
HAL.DLL. NTLDR uses the machine's firmware services to access the disc and
read any files that it needs to access. (There is a slight complication to
this with respect to SCSI host adapters that do not have firmware, which I
shall not go into here.)
NTLDR informs the kernel when invoking it where in memory it has loaded the
drivers in the "boot" start class, and the kernel initialises them "in
place". Device drivers in the other start classes are loaded from files by
the NT kernel itself after it is up and running using the normal file I/O
mechanisms.
The device drivers in the "Boot" start class are usually the minimal number of
drivers that are necessary to allow access to files (and hence other drivers
to be loaded) when the kernel is started. Usually the set comprises just the
filesystem drivers for FAT or NTFS and either the specific physical disc
device driver for the boot disc device or the generic SCSI disc "class" driver
and the specific driver(s) for the SCSI bus host adapter to which the boot
disc device is attached. Any DLLs needed by any of those, such as
SCSIPORT.SYS if the SCSI bus' host adapter driver happens to be implemented as
a port/miniport pair, would have to be in the "Boot" start class too.
------------------------------
From: Olaf Petzold <[EMAIL PROTECTED]>
Subject: realloc for kernel
Date: Thu, 25 May 2000 20:32:07 +0200
Hallo,
exist a complement for realloc inside the kernel ? I've looked
inside vmalloc.h but I found only vmalloc() and vfree(), which
are equivalent to malloc() and free(). If this doesn't exist how can
I emulate this ? May way would be to allocate a chunk of memory
with the new size, on sucess swap the pointer to the new location
and free the old one. This has the disadvantage that for a time
two vmalloced region exist.
Thanks for help Olaf
------------------------------
From: Ronald Cole <[EMAIL PROTECTED]>
Subject: Re: 970Cxi - HP refuses to help customer
Date: 26 May 2000 00:57:24 -0700
Nicolas Eymerich <[EMAIL PROTECTED]> writes:
> > I thought that 2-sided printed on the 970Cxi was simulated by the
>
> Wrong.
>
> 970Cxi is a true 2side printer; there is a mechanical device (optional
> but included in printer pakage) that can flip the paper.
Duh... You're right, of course. My brain thought it saw "870", which
is what I have.
--
Forte International, P.O. Box 1412, Ridgecrest, CA 93556-1412
Ronald Cole <[EMAIL PROTECTED]> Phone: (760) 499-9142
President, CEO Fax: (760) 499-9152
My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084 4A88 8851 E6C8 69E3 B00B
------------------------------
From: [EMAIL PROTECTED] (Aki M Laukkanen)
Subject: Re: 2.2 -> 2.3.99pre9 kernel API changes
Date: 26 May 2000 07:54:31 GMT
In article <8gk98e$k51$[EMAIL PROTECTED]>, Timothy J. Lee wrote:
>Comparing the document to 2.3.99pre9 netdevice.h, it looks like
>yet more incompatible changes were made (e.g. LINK_STATE_* are
>different, and are now __LINK_STATE_* to indicate that they are
>supposed to be private). Is there any documentation on the more
>recent changes (and when they changed)?
Are you sure that any of those changes were visible to the driver?
Link state management is supposed to be done with netif_wake_queue(),
netif_stop_queue() on the driver level. Anyway you'd be best to search
the netdev mailing list archives at SGI for the relevant discussion.
--
D.
------------------------------
From: [EMAIL PROTECTED] (Mike Dowling)
Subject: 2.4.0-test1 is this normal?
Date: 26 May 2000 08:50:19 GMT
I'm still seeing lots of warnings like
/usr/src/linux/include/linux/modules/sb_common.ver:5: warning:
`__ver_sb_dsp_unload' redefined
/usr/src/linux/include/linux/modules/sb_card.ver:5: warning: this is the
location of the previous definition
when compiling the kernel. They are only warnings, but given that this
is now a test version for 2.4.0, I am beginning to suspect that some
patch did not go through correctly on my machine.
Cheers,
Mike
--
My email address [EMAIL PROTECTED] above is a valid email address.
It is, in fact, a sendmail alias; the digit 'N' is incremented regularly.
Spammed aliases will be deleted. Currently, mike[26,27]
are valid. If email to mikeN bounces, try mikeN+1.
------------------------------
From: "Houppertz Xavier" <[EMAIL PROTECTED]>
Subject: how to send messages
Date: Fri, 26 May 2000 10:51:54 +0200
Hello,
I would like to do a kind of NET SEND under RedHat.
On my NT server, I use 'NET SEND SERVER1 blablabla'
What is the exact syntax under linux ???
Thanks.
Xavier.
------------------------------
From: [EMAIL PROTECTED] (Robert Kaiser)
Subject: Re: Writing driver for AMCC 5933 based PCI card
Date: 26 May 2000 08:43:30 GMT
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Julian Back) writes:
> I'm DMAing to and from kernel buffers allocated with get_free_page(GFP_KERNEL).
> I've tried adding the GFP_DMA flag but it makes no difference and my
> understanding is that this is only necessary for ISA DMA.
>
> The number of transfers before crashing can vary a lot. Sometimes it has done
> 3 million transfers before crashing other times it crashes almost immediately.
Something I usually do to test is to put the system under high load
while doing DMA (e.g. start a number of kernel compiles in background
until the system begins to swap). If, under these circumstances, it
still takes up to 3 million transfers until failure, then I'd venture
to say that you are dealing with a hardware glitch.
About two years ago, I wrote a DMAing driver for a frame grabber
board that used the AMCC matchmaker chip. It worked flawlessly with
recent (at that time) PC mainboards, but I did observe occasional
glitches when using the same software/hardware on older mainboards
(e.g. 486 DX100 with PCI) or with some Motorola PPC boards. I suspect
that it had something to do with the PCI bios revision level.
Good luck!
Rob
================================================================
Robert Kaiser email: rkaiser AT sysgo DOT de
SYSGO RTS GmbH
Klein-Winternheim / Germany
------------------------------
From: [EMAIL PROTECTED] (Robert Kaiser)
Subject: Re: virt_to_phys vs pgd/pmd/pte_offset calls
Date: 26 May 2000 08:52:52 GMT
In article <8gk3u0$rl2$[EMAIL PROTECTED]>,
Timur Tabi <[EMAIL PROTECTED]> writes:
> The pgd/pmd/pte stuff is used, AFAIK, to obtain a physical address of a
> USER SPACE virtual address, like this:
>
> pgd = pgd_offset(current->mm, address);
> pmd = pmd_offset(pgd, address);
> pte = pte_offset(pmd, address);
> printk("page: %08lx\n", pte_page(*pte));
>
> (please stop me if I say something wrong)
Looks OK to me :-)
> In short, to obtain the physical address of a user-space virtual
> address, use pgd/pmd/pte_offset. To obtain the physical address of a
> kernel-space virtual address, use virt_to_phys.
>
> Is that correct?
Yes. One thing to keep in mind though: the virtual->physical
mapping that you can determine with the above algorithm may change
at any time, for instance, as a result of swapping. So, unless you
do something about it (e.g. disable interrupts or -better- lock the
pages in memory), the physical address corresponding to a user space
virtual address may change at any time without warning.
Rob
================================================================
Robert Kaiser email: rkaiser AT sysgo DOT de
SYSGO RTS GmbH
Klein-Winternheim / Germany
------------------------------
From: [EMAIL PROTECTED] (Lew Pitcher)
Subject: Re: how to send messages
Reply-To: [EMAIL PROTECTED]
Date: Fri, 26 May 2000 12:13:05 GMT
On Fri, 26 May 2000 10:51:54 +0200, "Houppertz Xavier"
<[EMAIL PROTECTED]> wrote:
>Hello,
>
>I would like to do a kind of NET SEND under RedHat.
>On my NT server, I use 'NET SEND SERVER1 blablabla'
>What is the exact syntax under linux ???
man smbclient
look for the -M option
Lew Pitcher
System Consultant
Toronto Dominion Financial Group
([EMAIL PROTECTED])
(Opinions expressed are my own, not my employer's.)
------------------------------
From: [EMAIL PROTECTED] (David T. Blake)
Crossposted-To:
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.setup,comp.os.linux.advocacy
Subject: Re: Need ideas for university funded project for linux
Date: 25 May 2000 06:39:34 GMT
Reply-To: [EMAIL PROTECTED]
David Steuber <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] (David T. Blake) writes:
> ' I was not arguing I should create a library. I was not arguing
> ' against QTs right to use whatever license they like. I was
> ' arguing that people should think twice before referring to QT
> ' licensing as substantially free or "open source". The right to
> ' fork is absent, the right not to have your contributions included
> ' in proprietary works (such as QT Pro) is gone, and QT gets a copy
> ' of EVERYTHING that even links to their code, even if it is not
> ' publicly available.
>
> I see what you are saying now, I think. Mind you, you loose any such
> rights if you use GPL code as well, so there is also the same
> consideration with that license.
GPL is only one of the FSF licenses for libraries. There is no
provision for ANYONE to include your code in proprietary works as
there is in QT (a one way provision, mind you). As long as your
work can be considered independent of the GPL'd work, you can use
ANY license you like for yur work. To quote the GPL
"If identifiable sections of that work are not derived from the
Program, and can be reasonably considered independent and
separate works in themselves, then this License, and its terms,
do not apply to those sections when you distribute them as
separate works."
But that is besides the point.
The GPL preserves certain freedoms. If software is licensed under
it, you have the right to use it. You have the right to change it.
You have the right to fork it. All you have to do is provide the
same freedoms to recipients of derivative works. Nullum gratiutum
prandium, but you can get close.
The QPL assures that Trolltech has more freedom that you. It
assures Trolltech of ALWAYS being the maintainer of the primary
version of QT and ANYTHING that could be considered a derivative.
It represents a lawyers best attempt to get Bruce Perens and Eric
Raymond to say it is AOK. It certainly fails provision 2 of the
open source definition - that derivative may be licensed under
the same terms as the original. Providing for patched derivatives
is only VERY slightly better than allowing no derivatives at all.
It prevents forking. It assures QT of a constant revenue stream.
Their business plan is rolling freely contributed patches into
their proprietary product (QT pro) and allowing people like
StarOffice to buy lots of licenses for it. There is your free
lunch. Stomp on free software authors' freedoms to make a living.
> As for code that is not publicly available, ie an internal app,
> Qt and the rest of the world will never know about it. However,
> this is a bit of a grey area in my mind. If Troll found out about
> the code and asked for it, what then? Deny everything?
This is justifying plausible deniability. Grade school stuff. If
you can't live with QT knowing what you are doing with their
library, you probably shouldn't be doing it. At best you get away
with it, at worst it comes back to bite you in the ass. They want
you to PAY for everything proprietary or even private you do with
their library. That is their issue. Justifying it to the public
is a much larger issue.
> Maybe the Harmony project will settle this last concern. That
> all depends if Harmony is LGPL or GPL.
LGPL. Anyone may link without fear. But the motivation for the
project may be somewhat less with "open source" advocates
rolling over and playing dead on the issue.
http://www.yggdrasil.com/~harmony/
It shouldn't be open source if the same freedoms you give freely
are not given to derivative authors. Period. That one statement
could greatly simplify
http://www.opensource.org/osd.html
--
Dave Blake
[EMAIL PROTECTED]
------------------------------
From: Alan Donovan <[EMAIL PROTECTED]>
Subject: Re: how to send messages
Date: Fri, 26 May 2000 13:30:29 +0100
Houppertz Xavier wrote:
> I would like to do a kind of NET SEND under RedHat.
> On my NT server, I use 'NET SEND SERVER1 blablabla'
> What is the exact syntax under linux ???
For the local machine, see write(1), wall(1), mesg(1), tty(1), w(1).
AFAIK there's no general distributed way of doing it (although it would
be a pretty straightforward TCP daemon to write).
HTH
alan
--
========================================================================
Alan Donovan [EMAIL PROTECTED] http://www.imerge.co.uk
Imerge Ltd. +44 1223 875265
------------------------------
From: Alan Donovan <[EMAIL PROTECTED]>
Subject: Re: Kernel module-user process comms
Date: Fri, 26 May 2000 13:39:42 +0100
Dave Donaghy wrote:
> I'm trying to do some comms between a kernel module and a user process.
> Sync would be nice (!), async will do.
What kind of comms? You have read/write methods on the device, these
comprising the means of transferring the device's principal data; you
have ioctls, for `metadata': basically these are get/set methods on the
state of the device and other actions, e.g. eject CD, etc. Also you can
create /proc files, which tend to be used for more elaborate diagnostics
as a "window" onto the complete state of the driver.
Not sure if this is what you are getting at, but you mention sync/async:
if you need a kernel "callback" into a usermode process, the canonical
way of doing this seems to be dedicating a process/thread to blocking on
an ioctl (using wawhich unblocks when you want to make the callback).
HTH
alan
--
========================================================================
Alan Donovan [EMAIL PROTECTED] http://www.imerge.co.uk
Imerge Ltd. +44 1223 875265
------------------------------
** 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
******************************