Linux-Development-Sys Digest #971, Volume #7 Fri, 23 Jun 00 15:13:22 EDT
Contents:
No current->timeout ([EMAIL PROTECTED])
device driver compilation ("pusillus")
Re: No current->timeout (Mathias Waack)
Looking for libmonty.so (Steve Muise)
HELP, getting and changing network info ("Robichaud, Jean-Philippe [BAN:6S33:EXCH]")
Re: OT: Re: CodeWarrior for Linux. Comments ? (Kent Sorensen)
Re: Why no defrag? (Paul Richards)
Re: help help about OS ("Alex DeLarge")
Re: Shared memory, XFree4 and GNOME
Re: function to get current year (Nix)
Re: OT: Re: CodeWarrior for Linux. Comments ? (Nix)
Re: 64bit division (Nix)
Re: help help about OS (Nix)
Re: running remote untrusted code (Brennan Cheung)
Re: running remote untrusted code (Brennan Cheung)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED]
Subject: No current->timeout
Date: Fri, 23 Jun 2000 13:59:39 GMT
I'm writing a device driver for a adc-dac card.
On reading from card i have to poll until the
data are ready.
I was using the following code inside a loop:
current->timeout=jiffies+daad_timeout;
current->state= TASK_INTERRUPTIBLE;
schedule();
current->timeout=0;
But in the kernelversions 2.2.5 and above the timeout
does not exist in the struct task_struct.
What can i use instead?
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: "pusillus" <[EMAIL PROTECTED]>
Subject: device driver compilation
Date: Fri, 23 Jun 2000 14:12:58 GMT
I'm tryng to compile a device driver example on Mandrake 7.0 but
the compiler return errors on include files and is strange because
are the same used in kernel compilation.
can someone help me?
max@stc2caoapc1c~/drivers> gcc -DMODULE -D__KERNEL__ -O -c foo.c
In file included from /usr/include/linux/sched.h:13,
from foo.c:24:
/usr/include/linux/times.h:5: parse error before `clock_t'
/usr/include/linux/times.h:5: warning: no semicolon at end of struct or
union
/usr/include/linux/times.h:6: warning: data definition has no type or
storage
class
/usr/include/linux/times.h:7: parse error before `tms_cutime'
/usr/include/linux/times.h:7: warning: data definition has no type or
storage
class
/usr/include/linux/times.h:8: parse error before `tms_cstime'
/usr/include/linux/times.h:8: warning: data definition has no type or
storage
class
In file included from /usr/include/linux/sched.h:14,
from foo.c:24:
/usr/include/linux/timex.h:159: field `time' has incomplete type
In file included from /usr/include/linux/signal.h:4,
from /usr/include/linux/sched.h:23,
from foo.c:24:
....
thank's
------------------------------
From: Mathias Waack <[EMAIL PROTECTED]>
Subject: Re: No current->timeout
Date: 23 Jun 2000 16:11:07 +0200
Hi stpinkert,
[EMAIL PROTECTED] writes:
> I'm writing a device driver for a adc-dac card. On reading from card
> i have to poll until the data are ready.
...
>
> But in the kernelversions 2.2.5 and above the timeout does not exist
> in the struct task_struct. What can i use instead?
Two ways: first you could poll forever:
while (no_data()) {
schedule();
}
read_data();
Or, if your device is slow or you don't need the highest
possible speed, you should insert your tasks into a wait queue
which periodically checks for data. Look at queue_task(),
and the predefined task queue tq_scheduler.
Mathias
------------------------------
Date: Fri, 23 Jun 2000 12:39:04 -0300
From: Steve Muise <[EMAIL PROTECTED]>
Subject: Looking for libmonty.so
Anyone heard of or know the whereabouts of libmonty.so?
------------------------------
From: "Robichaud, Jean-Philippe [BAN:6S33:EXCH]" <[EMAIL PROTECTED]>
Subject: HELP, getting and changing network info
Date: Fri, 23 Jun 2000 11:27:03 -0400
Hi ,
How can I access to network information using ioctl. For now, all my
try failed. Don't talk to me about ifconfig, I don't want to do a
system() call and grep to have the ip address, netmask and so, I need to
implement this functionnality (reading and hanging eth0, eth1, eth*...
configuration) from a C program. Anyone knows about this ?
Where can I find some example. I've have search the code of ifconfig
without success.
Please help !
thanks
--
Jean-Philippe Robichaud
[EMAIL PROTECTED]
(514) 818-7750
(ESN) 888-7750
St-Laurent, Quebec, Canada
------------------------------
From: Kent Sorensen <[EMAIL PROTECTED]>
Subject: Re: OT: Re: CodeWarrior for Linux. Comments ?
Date: Fri, 23 Jun 2000 11:00:50 -0500
David Minor wrote:
> That's for sure.
>
> CW is a great development environment, I used it for years on the Mac.
> But it has one fatal flaw under Linux. It doesn't use standard Make!
> Standard Make is what a mouse is to a Mac! Think of how successful CW
> would have been on a Mac if it only had a command line interface. Get
> with it guys! I can't even consider buying CW for my group without make
> support.
I'm not sure what you mean here. However I bought CW for Linux exactly
because I have better things to do than fiddle with make files. They were a
necessary evil in 1970, but now ?
I expect the project to deal with dependencies and link order and arcane
stuff like that. CW does an admirable job of this on Mac and Windows, and
still lets me handle link order issues manually if I really have to tweak
details.
Kent
------------------------------
From: [EMAIL PROTECTED] (Paul Richards)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Why no defrag?
Date: Fri, 23 Jun 2000 13:49:46 +0100
In article <[EMAIL PROTECTED]>,
Anthony wrote:
>In article <39239f25$0$[EMAIL PROTECTED]>, "Peet Grobler"
><[EMAIL PROTECTED]> wrote:
>> Hello.
>>
>> I've seen the question posted to this group many times now, is there a
>> defrag for linux? The conclusion is there is not. I'm sitting at my
>> desk, thinking, why not?
>
>Obviously you should check this out:
>
>/usr/doc/LDP/sag/index.html
>
>Reference section:
> TV
> Stephen Tweedie and Alexei Vovenko. Linux filesystem
> defragmenter. Available electronically from \
> ftp://sunsite.unc.edu/pub/Linux/system/Filesystems/defrag-0.6.t
> ar.gz.
>
>the more current ones are defrag-0.7x, hacked for easier compilation
>under glibc2.1x version.
>
I'm guessing that after a defrag that it'd be a good idea to rerun lilo
since your kernel may have moved?
--
Paul Richards (Pauldoo) - http://www.pauldoo.co.uk
.~.
/V\ L I N U X
// \\ >Phear the Penguin<
/( )\
^^-^^
------------------------------
From: "Alex DeLarge" <[EMAIL PROTECTED]>
Subject: Re: help help about OS
Date: Thu, 22 Jun 2000 23:38:18 +0100
You are joking... someone didn't go to their course. Ok then, here goes:
> help help about OS
> tomorrow we have a exam of operating system
> can anyone give brief defines the following
> if u can explain one or two of the following
> it's also enough for me
> many thank you
> but please please hurry
> thank you again
>
>
> VMS - Mythical operating system that many have heard of, but few claim to
use. VMS is used in Vax systems and is very old, but OpenVMS is the
opensource version of it and is supposed to be good.
> Amoeba
small single cellular lifeform that is effectively the link between plant
and animal life as it is really neither, but acts like both.
> Solaris
Sun Microsystems implementation of Unix famed for the /dev/audio security
exploit.
> JavaOS
OS written in Java
> Hurd
A group of cattle.
> Plan 9
Rather poor B-Movie directed by the late Ed Wood. Also an operating system
created by the excellent Bell labs. It is supposed to be very good, but it
hasn't really matured yet.
> Window NT
Windows NT is made by microsoft and best avoided at all costs. If you need
this explaining to you then you shouldn't be on an os course.
> QNX
Embedded Posix compliant operating system similar to the GNU/Linux operating
system.
> Rhapsody
Something to do with classical music I think.
> Linux
Os built by a bunch of hippies (Alan Cox is proof of that ;) and it's fastly
gaining on the server market. Most popular distributions of linux are
RedHat, Suse and Debian. Linux is the Kernel, and it's actually called
GNU/Linux.
> RAID
Redundant Array of Inexpensive Disks. A form of drive technology that
provides varying degrees of redundancy and fault tolerance.
> ANDF
ORNOT
> ADA
Programming Language
> The Unix 'Select' system call
The Unix equivalent of the Homeboyz 'booty' call ;)
> The Mach Microkernel
IIRC Mach is a Minix compatible Microkernel but I'm not certain
> The POSIX Standard
A standard for operating systems and their functions. I'd suggest you read
it, but you don't have the time.
> Pentium Memory Management
An oxymoron, like 'Windows Security' and 'Military Intelligence'
> OS Benchmarks
The marks that appear on your body when you go to sleep and wake up after
sleeping on a pile of RedHat CD's.
> The OSF DCE
No idea.
> The NOW Project
Successor to the THEN project
> NTFS
New Technology Fears Stupidity
> Livelock
Similar to Deadlock, Gridlock only in real time.
> Win32 Threads
Win32 Threads are used for 'Sewing Win32 Strands' to make patches. Patches
are sewn together with more threads and strands that eventually become
Winquilts, or 'Service Packs' once enough Patches are applied.
> Linux Scheduling
Look up Cron on altavista
> Programming with sockets
Using a complex system of wrenches, ratchets and spanners, you can tighten
up and loosen a socket board that plugs into a ps/2 port to provide a series
of instructions to controllers.
> The POSIX standard
Didn't we do this one before?
> Lod Balancinng
Lod Balancing is an off-shoot of Log Balancing, where one tries to stay
standing on top of a rotating log in water. Usually a sport practiced by
canadian lumberjacks. Also known as Log rolling.
Lets face it, you'll fail no matter how you look at it asking questions like
these, but at least putting some of these answers down will raise a smile
with the examiner. There's an amazing thing called revision, you should try
it some time. Sorry if this seems a bit of a sarcastic response, but I've
had to put up with idiots all day, so seeing this here just makes you
ammunition.
--
Alex DeLarge: remove the anti-spam stuff from my e-mail address before
replying
Check out http://www.bristol2600.org.uk for all your Bristol 2600 meet
needs.
First friday each month!
Guven Linux at 0.03
------------------------------
From: <[EMAIL PROTECTED]>
Subject: Re: Shared memory, XFree4 and GNOME
Date: Fri, 23 Jun 2000 16:30:06 GMT
Wow, sounds like you've been chasing this harder than I have. Thanks for
the extra info. I don't know why anybody else isn't noticing this problem.
It started when I changed to GNOME 1.2 as well. I haven't tried going back
though. There are so many components to worry about. I'll keep looking.
Curtis
Marc D. Williams wrote:
>
>
> On Thu, 15 Jun 2000 18:30:45 GMT, <[EMAIL PROTECTED]> wrote:
> >I'm running kernel 2.2.16, Xfree86 4.0 and GNOME 1.2. I've noticed that
X
> >and GNOME use a hell of a lot of shared memory segments. In fact, they
max
> >out at 128 which is the maximum allowed under my kernel. I then get
shmget:
> >failed messages everywhere. First of all, are these guys supposed to use
> >this many shared memory segments? Each GNOME process uses 5 or 6 of them
> >and X uses about 20 - 25. Second of all, how do I increase the maximum
> >without totally screwing up my kernel.
> >
> I wonder, I'm using kernel 2.0.38, XF86 3.3.3.1 and GNOME 1.0x and have
> the same problems.
> Everything was working fine with the GNOME 1.0x stuff. I then moved up
> to 1.2 and everything was jacked up. Most every part of GNOME would not
> start or run, got a lot of the shmget failures.
> Even older programs like ee would crash.
> Wasn't sure who the actual culprit was so I messed with it nightly
> for days. Frustrated I got rid of everything and went back to my
> old setup (GNOME 1.0x, gtk/glib 1.2.6) but wouldn't you know it, it's
> also hosed. Nothing works.
>
> Started narrowing it down to gdk but wasn't sure.
> Moving away from GNOME I compiled the latest XFce (3.4.0) and lo and
> behold the xfce panel also crashes, without a useful error message.
> Strace output showed an shmget error.
> Recompiled it without imlib support and it runs fine.
> Did an ldd on several of the programs that won't run and notice all
> of them use gdk_imlib.
>
> The problem is with gdk_imlib or gdk proper I suppose. Just not sure
> why I didn't have this problem before but get it now, seeing as how
> I'm using all the old stuff I was running before.
> On the other hand, though, xzgv works fine and it uses gdk_imlib.
> Only diff between it and the failing programs is it doesn't
> use gnome but then neither does xfce.
> I am so confused. :-/
>
> Checking the gnome bug and mailing lists I don't see a lot about
> this but I do remember the enlightenment list had a lot of
> posts about this shared memory problem.
>
> --
> >>ANIME SENSHI<<
>
> Marc D. Williams
> [EMAIL PROTECTED]
> http://www.oldskool.org/~tvdog/ -- DOS Internet & Tandy 1000
> http://www.geocities.com/SiliconValley/Platform/8269/ -- Win3.x Makeover
--
Posted via CNET Help.com
http://www.help.com/
------------------------------
From: Nix <$}xinix{[email protected]>
Subject: Re: function to get current year
Date: 22 Jun 2000 21:41:21 +0100
Erik Max Francis <[EMAIL PROTECTED]> writes:
> Use the Standard time routines as they exist. They will be valid until
> 2038, by which point all you'll need to do is recompile your
> Standard-compliant routines on an operating system that has an expanded
> time_t, and your time values will be valid up until the point at which
> that expanded time_t runs out.
Except for your file formats, filesystems, network protocols
&c. Anything that cares how big a time_t is will need fixing.
I'm sure we've had this discussion before. ;)
--
> ... knowing the alignment of Orcs in AD&D.
Doubleword.
--- David Jacoby and Greg Andrews in the Monastery
------------------------------
From: Nix <$}xinix{[email protected]>
Subject: Re: OT: Re: CodeWarrior for Linux. Comments ?
Date: 22 Jun 2000 21:54:59 +0100
David Minor <[EMAIL PROTECTED]> writes:
> But it has one fatal flaw under Linux. It doesn't use standard Make!
*boggle* *splutter* Please tell me this isn't true.
How to make a product useless, in one step. Ye gods. That wrecks
portability to the Unix development environment (such as it is) if
nothing else does.
> Standard Make is what a mouse is to a Mac! Think of how successful CW
CW must have some replacement. Does that replacement have the raw power
(and scriptability) of make? (I dobut it.)
If it wasn't for autoconf/automake/libtool and similar tools, things
would be much worse than they are --- and those tools *absolutely*
depend on Make, or something like it (strictly, autoconf doesn't,
although it likes make, but the others do.)
If CodeWarrior does not use makefiles, it cannot use automake or
libtool, and its utility for practical projects is *drastically*
reduced.
I thought CodeWarrior was essentially a GUI frontend to gcc? If so, we
can junk their make replacement and use makefiles anyway.
Of course, they may just use make. If so, well done. Otherwise, well,
ugh.
(If it's not a frontend to gcc, I wouldn't use it at all. I know through
bitter experience how useful it is having the source to your compiler,
and how bloody frustrating it is to *not* have that source.)
> would have been on a Mac if it only had a command line interface. Get
Like MPW did? ;)
--
> ... knowing the alignment of Orcs in AD&D.
Doubleword.
--- David Jacoby and Greg Andrews in the Monastery
------------------------------
From: Nix <$}xinix{[email protected]>
Subject: Re: 64bit division
Date: 22 Jun 2000 21:58:34 +0100
[EMAIL PROTECTED] (Aki M Laukkanen) writes:
> In article <[EMAIL PROTECTED]>, Daniel Krippner wrote:
> >I need to do a division of 64bit values in a module for x86 Linux. Is
> >there a function somewhere in the kernel that does this, or can anyone
> >give me a pointer to some assembly source?
>
> No, sorry there is not. I've myself added lib/math.c and div64() there.
> There was some discussion on lkml about this topic but I can not remember
> if explicitly called div64() would be a candidate for inclusion in the
> kernel.
__divdi3 would seem a better name, all things considered. GCC knows
about that name, after all.
--
> ... knowing the alignment of Orcs in AD&D.
Doubleword.
--- David Jacoby and Greg Andrews in the Monastery
------------------------------
From: Nix <$}xinix{[email protected]>
Subject: Re: help help about OS
Date: 23 Jun 2000 00:08:08 +0100
"fonz" <[EMAIL PROTECTED]> writes:
> help help about OS
> tomorrow we have a exam of operating system
You do realize that the probability is not negligible that the person
setting that exam reads this group, don't you?
--
> ... knowing the alignment of Orcs in AD&D.
Doubleword.
--- David Jacoby and Greg Andrews in the Monastery
------------------------------
From: Brennan Cheung <[EMAIL PROTECTED]>
Subject: Re: running remote untrusted code
Date: Fri, 23 Jun 2000 11:16:42 -0700
[EMAIL PROTECTED] wrote:
> Brennan Cheung <[EMAIL PROTECTED]> wrote:
> > Hi. I am working on a project that I need a client to be able to upload
> > code to my server and have it run securely. I want to limit all API
> [...]
> > Would people be able to write code under a different platform such as
> > Windows and have it run on my server. I was thinking that it shouldn't
> > be too hard because it should be pure binary code with the exception of
> > the library calls I will provide.
>
> Java already has support for both controlling access to the machine,
> networking, and cross-platform support built into the language. IMO,
> it's tailor made for your situation.
>
> You can also see more ardous examples in C by looking at Condor and
> Cosm. Neither is free, however, so you'd be in for ludicrous amounts
> of recoding.
>
> --
> Matt Gauthier <[EMAIL PROTECTED]>
Yes. I knew Java could do it, but I want the code to run native. An
interpreted language would be too slow. I am looking to run anywhere from
10,000 to 100,000 processes and so you can imagine that Java would be too
slow.
I'll check out those references you mentioned though.
Thanks,
Brennan
------------------------------
From: Brennan Cheung <[EMAIL PROTECTED]>
Subject: Re: running remote untrusted code
Date: Fri, 23 Jun 2000 11:26:35 -0700
Kari Pahula wrote:
> You can pass -nostdlib to the linker to disable any standard
> libraries, and use ptrace to any suspicious binaries to make sure they
> don't link any unwanted libraries. See ptrace's and gcc's man pages,
> gcc's info pages and strace's and gdb's sources
> (you asked for it! :-) ).
The idea is that the client will create the code and then upload it to me.
So I don't think that will work.
> This is really a sort of thing you could do on HURD, if it only were
> more mature... Otherwise, this reeks like something you could do with
> Java (altough IMHO it sucks).
I'll check out HURD. Someone also mention Condor and Cosm. So I'll look
those up. I knew about the Java thing but it is way to slow for what I am
wanting to do.
> >Would people be able to write code under a different platform such as
> >Windows and have it run on my server. I was thinking that it shouldn't
> >be too hard because it should be pure binary code with the exception of
> >the library calls I will provide.
>
> No. This is not simple, just have a look at WINE or DosEMU, you don't
> want to do anything like this unless you are really absolutely
> honest-to-your-deity desperate enough to do it.
What is the limitation here? Can you compile to ELF from Windows? If you
are not including any libraries then there is nothing platform specific
except for the processor right?
> >The basic idea of what I am trying to do for those of you who are
> >wondering why I want to do this is that I have a server and lots of
> >clients that will connect to the server. These clients are AI units
> >that interact in a virtual world (the server). I want anyone to be able
> >to do this but I want to be able to run untrusted code or in other words
> >restrict the client from executing any harmful code.
>
> I would myself really allow them to remain at the remote hosts, and
> allow them to communicate with TCP sockets.
>
> Binary-only executables are a Bad Thing on linux without good package
> management - we don't want to have any legacy binaries to clutter up.
> They'll also be an invitation for viruses.
That is not the design that I came up with. Each user will be having around
1000+ processes going at once. And I want to be able to have anywhere from
10 to 100 clients. Also I want to be able to terminate processes, and
control their CPU usage so I can't let the client run code on their machine.
How could virii be a problem if there is no file access or IPC? They will
not have any access to anything except the processor and my API.
Thanks,
Brennan
------------------------------
** 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
******************************