Linux-Development-Sys Digest #196, Volume #8      Fri, 6 Oct 00 14:13:15 EDT

Contents:
  Re: riva tnt2 specification files (Anes Lihovac)
  Re: Compilation of glibc 2.1.3 stops with undefined reference (Nix)
  Re: patch file (Nix)
  Re: are threads imcompatible with modules ? (Philipp Lohmann)
  Re: Safe mail ([EMAIL PROTECTED])
  Re: newbie questions on kernel level programming and iospace ([EMAIL PROTECTED])
  Re: ioremap not in namespce...? (Arne Driescher)
  Re: newbie questions on kernel level programming and iospace 
("[EMAIL PROTECTED]")
  Please help, question about programming in C to access COM1/COM2 in my FreeBSD. 
("Roger Deng")
  Re: Safe mail ([EMAIL PROTECTED])
  Re: Safe mail ([EMAIL PROTECTED])
  Re: Text-based user interface development (Larry Blanchard)
  upgrade kernel (Bo - Sun)
  depmod not work in Kernel 2.4.0-test9 (Chirok Han)

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

Date: Fri, 06 Oct 2000 13:25:50 +0200
From: Anes Lihovac <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.x
Subject: Re: riva tnt2 specification files

David wrote:
> 
> Hi, I am triying to write a fast driver for 3D acelerated HW. Where can
> I download specification of RIVA TNT 2.
> 
> Thanks,
> DTM

Probably on the Nvidia Site. www.nvidia.com ! But I don't think that
they would
release something like that !

emm ...

What's wrong the the newest drivers from the Nvivia Site for X 4.0.1.
They are AFAIK the state of the art under Linux.

Regards
Ans

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

From: Nix <$}xinix{[email protected]>
Subject: Re: Compilation of glibc 2.1.3 stops with undefined reference
Date: 06 Oct 2000 08:02:47 +0100

[EMAIL PROTECTED] writes:

> Hello !
> 
> I get the following error when compiling glibc 2.1.3:
> 
> ...
> make[1]: Entering directory /usr/users/sh/in/glibc-2.1.3/db2'
> gcc -nostdlib -nostartfiles -o makedb
> -Wl,-dynamic-linker=/lib/ld-linux.so.2   ../csu/crt1.o ../csu/crti.o cc

Is that thing at the end of the line `\ngcc'?

> --print-file-name=crtbegin.o makedb.o libdb.so.3
> -Wl,-rpath-link=..:../math:../elf:../nss:../nis:.:../rt:../resolv:../linuxthreads
> ../libc.so.6 ../libc_nonshared.a -lgcc cc --print-file-name=crtend.o
> ../csu/crtn.o
> ../libc.so.6: undefined reference to _divdi3'
> ../libc.so.6: undefined reference to _umoddi3'
> ../libc.so.6: undefined reference to _udivdi3'
> ../libc.so.6: undefined reference to _moddi3'
> collect2: ld returned 1 exit status
> ...
> 
> How do I fix this ?

Your GCC or binutils installation is snarled up; these symbols are in
libgcc and have been for absolutely ages.

If there is a libgcc.a in /lib or /usr/lib, delete it; gcc must pick it
up from its system directory (/usr/lib/gcc-lib/{arch}/{version}/libgcc.a)
and not from anywhere else.

What does `gcc -v' return on your system?

-- 
`Ergotism is what you get if you overuse the word "therefore". Egotism
 on the other hand is a form of "I" strain.' --- Paul Martin

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

From: Nix <$}xinix{[email protected]>
Subject: Re: patch file
Date: 06 Oct 2000 08:10:10 +0100

Rick Miller <[EMAIL PROTECTED]> writes:

> The handiest kind of "diff" is a context diff (the "-u" command line option)

That is a unified diff. `-c' is a context diff.

Some people find one easier to read, some people prefer the other :)

-- 
`Ergotism is what you get if you overuse the word "therefore". Egotism
 on the other hand is a form of "I" strain.' --- Paul Martin

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

From: Philipp Lohmann <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: are threads imcompatible with modules ?
Date: Fri, 06 Oct 2000 13:01:05 GMT

Hi,

you are modifying the X queue from two threads simultaneously and thereb=
y=20
mess it up. You have to protect the X queue either by calling=20
XInitThreads before calling anything else in Xlib (and before creating=20
the first thread) or by using your own mutex to protect any X call.

Regards, pl

>>>>>>>>>>>>>>>>>> Urspr=FCngliche Nachricht <<<<<<<<<<<<<<<<<<

Am 06.10.00, 02:07:19, schrieb David <[EMAIL PROTECTED]> zum Thema ar=
e=20
threads imcompatible with modules ?:


> I have 2 files, that I can compile together or separated. The second
> file creates a thread (to dispatch X-Windows Events), and the first fi=
le
> call it (for example a function like CreateWindow).

> The problem is:
> If I compile together it works fine.
> If I load second file from first file (dl-opening, so shared library i=
s
> created), I receive XIO: Error ....

> Any Idea?
> thanks,
> DTM

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

From: [EMAIL PROTECTED]
Subject: Re: Safe mail
Date: Fri, 06 Oct 2000 14:01:29 GMT

On Thu, 05 Oct 2000 20:04:36 GMT, [EMAIL PROTECTED] wrote:

>Hello, I am new to Linux software development and I have two questions.
>First, what is the best newsgroup for those wishing to read about Linux
>software development? Obviously, this is for system development, but is
>the only relevant group I could find using Deja.

Linux software development is pretty close to being the same as BSD
software development and UNIX software development.  I would have to
say their is no one group which is better to read than any other,
there are many worth reading.  Now, for the posting of questions there
is usually one group which is better for any given topic.  Of late, I
have found that posting to approriate mailing lists is better than
posting to netnews.

>Second, what is the safest [and best] way to send an email from within a
>program to a user? I am hoping to find a way that is not overly
>complicated but doesn't keep me up at night because of security issues.

Huh?  Most of the problems I've seen with email are on the receiving
end, not the sending end.  In shell scripts you can send a message by
piping the body into sendmail (or its replacement).  The destination
person is specified on the sendmail command side.  If you are writing
perl, there is a module which can be used to send generic SMTP mail.
It works very nicely.

Gord


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

From: [EMAIL PROTECTED]
Subject: Re: newbie questions on kernel level programming and iospace
Date: Fri, 06 Oct 2000 14:33:25 GMT

In article <[EMAIL PROTECTED]>,
  Mark McDougall <[EMAIL PROTECTED]> wrote:
> Josh Willey wrote:
>
> > I posted this message earlier and, as I've come to expect, recieved
no
> > responses. Could anyone tell me if I'm doing something wrong? Have I
> > failed to abide by proper netiquette? Was the length of the message
just
> > way too long? Am I missing something so obvious that no one will
bother
> > to answer?
>
> Maybe because it reads like a school assignment?!?
>
> --
> |     Mark McDougall    |
> |        Engineer       |
> | Virtual Logic Pty Ltd |
> | http://www.vl.com.au  |
>

How would you prefer to see the questions phrased or organized?
The questions I have posted are not for a school assignment. They
are questions that I feel I need answers to in order to become
comfortable with what is really going on with any kernel level
code I write. If there is a more appropriate way to phrase the
questions, I would be very willing to learn and use it.

At any rate, I do appreciate your response (or more accurately, the fact
that you did).


Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: Arne Driescher <[EMAIL PROTECTED]>
Subject: Re: ioremap not in namespce...?
Date: Fri, 06 Oct 2000 16:42:08 +0200

> 
> I HAVE gotten this to load, though, by inserting my own #define ioremap ... 
>__ioremap statement.
> I'm pretty sure I shouldn't have to do this, but I still don't understand...

How do you compile your module? Have you defined MODULE and perhaps
__KERNEL__?
Fi not, compare your Makefile with an other example (included below).

-Arne

 
#
# Makefile for the me2600 driver
#
CC = gcc
LD = ld
WARN = -Wall -Winline -Wno-format

DEFINES = -DMODULE -DDEBUG
COPT = -O -m486 -I/usr/src/linux/include

# Use the following for a less verbose and faster module
# DEFINES = -DMODULE
# COPT = -O2 -m486 -fomit-frame-pointer

CFLAGS = $(COPT) $(WARN) $(DEFINES)
LINKFLAGS = -r

# Files
SRCS = me2600_main.c me2600_firmware.c
OBJ  = me2600_main.o me2600_firmware.o
HEADERS = me2600.h
MODULE = me2600.o

# Main target

all: $(MODULE) tags

# Generic Rules

%.o: %.c
        $(CC) -c $(CFLAGS) $<

# Driver

$(MODULE): $(OBJ)
        $(LD) $(LINKFLAGS) -o $(MODULE) $(OBJ)

#depend

$(OBJ): $(SRCS) $(HEADERS)

# tags

tags: $(SRCS) $(HEADERS)
        etags -dT $^

# Misc

.PHONY: clean
clean:
        rm -f *.o *~ ~* *.bck core tags

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

From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Subject: Re: newbie questions on kernel level programming and iospace
Date: Fri, 06 Oct 2000 17:48:29 +0200

Hi

I found the book linux device drivers helps,

As for question one.
Don't be confused by the legacy function in uaccess.h.
setfs(KERNEL_DS) allows no limit to access of memory.
Check the comments in asm/uaccess.h.

There is also a struct to set the accessible regions of memory.

Also check out some docs at linuxhq.com (linux kernel programming)

I'm sorry I can't help much more.

Richard.


Josh Willey wrote:

> Hi,
>
> I posted this message earlier and, as I've come to expect, recieved no
> responses. Could anyone tell me if I'm doing something wrong? Have I
> failed to abide by proper netiquette? Was the length of the message just
> way too long? Am I missing something so obvious that no one will bother
> to answer?
>
> If any of the above reasons are why no one answered, PLEASE just tell
> me and I will try to correct the problem.
>
> JW
>
> The message I posted earlier follows:
>
> Hi,
>
> I apologize in advance for the length of this posting.
>
> I'm trying to learn systems/kernel/linux programming and I'm writing to
> get confirmation and correction of my understanding of various
> driver/system programming concepts. I've listed some assertions below,
> and I'm hoping that some knowledgable readers can tell me if they are
> correct or incorrect, and if incorrect, why. Any help and pointers will
> be GREATLY appreciated as I've spent a fairly large amount of time
> trying to figure this stuff out. If you don't have answers to all the
> questions, please don't hesitate to comment on the others. Feel free to
> be as detailed and brutal as possible (steep learning curve I guess) :)
>
> 1)The address space of a machine, as seen by the Linux kernel, can be
> divided into three logical sections:
>     a) "normal/real" memory,
>     b) I/O address section (a.k.a. I/O ports),
>     c) I/O memory section
>
> 2)The address space of a machine is the range of addresses that can
> be   specified using all address buses on that machine.
>
> 3)A machine may have a number of address "subspaces", depending on
> how many busses are used to connect the CPU with main memory and
> peripherals. Each bus used for one of these connections defines one
> subspace. If one bus is used to establish all necessary conections,
> then the three logical sections described in 1) are said to share the
> same address space.
>
> 4)In the case of an x86 processor, the three logical sections
> described   in 1) all share the same space. On a non-x86 architecture,
> these   sections may not share the same space.
>     -- Does the above imply that there is only one bus
> interconnecting         the CPU, main memory, and set of peripherals on
> the x86?
>
> 5) It is atypical compared to other architectures that the I/O memory
> section and the other sections share the same address space on the
> x86 architecture.
>
> 6)On a non-x86 architecture that uses a different bus to refer to
> main memory than it does to refer to the I/O devices, the logical   I/O
> port section and "normal/real" section do not share the same   address
> space.
>
>   6a) In the situation specified by 6), the CPU and device
> controllers       use different addresses to refer to the same physical
> memory       address.
>
> 7)inb/outb operations are used to access the I/O port section in Linux
>
> 8)On an x86 machine, the inb/outb operations translate to I/O
> specific   assembly instructions (in/out) that do not use memory-mapped
> I/O to   accomplish communication with the specified device.
>
> 9)On an x86 machine, the arguments passed to inb/outb operations (I/O
> ports -- e.g. 0x03f6, 0x02f8) are used to identify device/register
> combinations by passing them onto an address bus.
>
> 10)On an x86 machine, the existence of an I/O port identified by
> 0x03f6   does NOT preclude the existence of any other entity (main
> memory)   identified by address 0x03f6.
>
>   ??? I'm really not sure of this one, but I've presented reasons
> that       it seems to be able to go either way.
>
>   10a)The reason it DOES NOT is that the CPU "understands" that
> the       I/O port 0x03f6 is a part of the I/O port section. It is able
> to       understand this because the port is accessed only through
> certain       I/O assembly instructions.
>
>   10b)The reason it DOES preclude the existence of another entity
> identified by 0x03f6 is because all three sections sharing       the
> same "address space" means that each address can only be       used to
> identify one entity.
>
> 11)The readb/writeb routines are used access the I/O memory section
> described in 1).
>
> 12)Accessing the I/O memory section described in 1) is what is meant
> by the term "memory-mapped I/O".
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.


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

From: "Roger Deng" <[EMAIL PROTECTED]>
Subject: Please help, question about programming in C to access COM1/COM2 in my 
FreeBSD.
Date: Sat, 7 Oct 2000 00:13:02 +0800


Please help, question about programming in C to access COM1/COM2 in my
FreeBSD.

Dear Sir,

I am writting a program to read data from COM1/COM2 in my FreeBSD box .
Unfortunately, my program lost some characters during reading data from
COM1/COM2.

below is piece of my program. any suggestion is welcome:

=================================================================

        if ((comFp=open("/dev/cuaa0",O_RDWR))==-1)
        {
                printf("Error open COM Port!\n");
                exit(1);
        }
        else
        {
                printf("COM Port open success!\n");
        }//end if

        while(1)
        {
         if ((buf_end=read(comFp,buf,200))==-1)
         {
                 printf("%s",buf);
         }//end if
 }
===================================================================

Thanks again....

Roger
please reply to [EMAIL PROTECTED]




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

From: [EMAIL PROTECTED]
Subject: Re: Safe mail
Date: Fri, 06 Oct 2000 16:40:05 GMT

In article <8rk0d5$13u$[EMAIL PROTECTED]>,
  [EMAIL PROTECTED] (Philip Armstrong) wrote:
> In article <8rj0nd$vc1$[EMAIL PROTECTED]>,  <[EMAIL PROTECTED]> wrote:
> >In article <8risga$43f$[EMAIL PROTECTED]>,
> >For some reason Deja won't list that one. I even searched explicitly
for
> >"comp.os.linux.development.app". Odd.
>
> Find a real newsserver then :)

Yeah, I finally setup SLRN and am now using my provider's news server.
Dejanews is nice for a while, but only for a while. (Well, I am
responding to this thread via Dejanews, but it's the last one.)

> >> err. invoke the 'mail' program? No suid requirements in your code
at
> >> all...and you can blame the mailx code for any security holes :)
> >
> >Actually, I had considered that. However, this is a PAM module and so
I
> >was trying to see if there was another accepted route to travel on
this
> >one. Oh well.
>
> I doubt it. You could do to all the hassle of finding out the users
> mail spool file, appending to it etc etc. But that's a crawling mass
> of horrors which I know that *I'd* get wrong *somewhere*. I don't know
> of any other way to do it I'm afraid.

Okay, that's what I wanted to know.

> >Would you, or someone, mind posting or pointing me to an example of
> >exec()'ing /bin/mail with a message body. I just want to verify I am
not
> >exposing myself to too much risk.
>
> no code, but make sure you invoke the path explicitly. And don't pass
> any untrusted data that hasn't been checked first. (ie *any* data that
> your code reads that comes from a source outside your own code.)
>
> This is pretty standard stuff, but I've yet to see a good reference
> anywhere. Anyone got any pointers?
>
> >Again, I'm new to writing applications under Linux so thanks for the
> >help.
>
> Mostly Linux == Unix, so a good unix programming text will help. I've
> mentioned Stevens' 'Advanced Programming in the Unix Environment'
> elsewhere in this group. But that won't cover PAM (IIRC). Any good
> references anyone?

Actually, I haven't had any real problems writing the PAM module itself.
My only problem was finding a safe way to send mail from a priviledged
application. Since I'm new to UNIX programming I didn't want to do
anything silly.

> cheers,
>
> Phil

Thanks Phil. Very helpful.

---
Dustin Puryear
[EMAIL PROTECTED]


Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: [EMAIL PROTECTED]
Subject: Re: Safe mail
Date: Fri, 06 Oct 2000 16:41:49 GMT

In article <[EMAIL PROTECTED]>,
  [EMAIL PROTECTED] wrote:
> >Second, what is the safest [and best] way to send an email from
within a
> >program to a user? I am hoping to find a way that is not overly
> >complicated but doesn't keep me up at night because of security
issues.
>
> Huh?  Most of the problems I've seen with email are on the receiving
> end, not the sending end.  In shell scripts you can send a message by
> piping the body into sendmail (or its replacement).  The destination
> person is specified on the sendmail command side.  If you are writing
> perl, there is a module which can be used to send generic SMTP mail.
> It works very nicely.

Well, this is a PAM module so sh and perl aren't really options.

---
Dustin Puryear
[EMAIL PROTECTED]


Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: Larry Blanchard <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Text-based user interface development
Date: Fri, 06 Oct 2000 17:09:31 GMT

Neal Tucker wrote:
> 
> Lew Pitcher <[EMAIL PROTECTED]> wrote:
> >Davide Dozza <[EMAIL PROTECTED]> wrote:
> >
> >>I am developing applications written in C/C++
> >
> >There is no such language as C/C++. There are two seperate,
> >independant, and sometimes incompatable languages, one called C, and
> >the other called C++.
> 
> Thanks for enlightening us, Pedantry Man!  Hey, I think I heard someone
> say "centrifugal force" in another newsgroup...
> 
> -Neal Tucker

So you wouldn't object if I said Spanish and Portuguese were the same?

Or German and Yiddish?  Or American and English?

Yes, we have a living language that grows and changes.  But some of us
object when the growth gets cancerous :-).  Lew's comment was proper.

-- 
Larry Blanchard
"Anyone who wants to be elected shouldn't be" - Will Rogers

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

From: Bo - Sun <[EMAIL PROTECTED]>
Subject: upgrade kernel
Date: Fri, 6 Oct 2000 12:26:59 -0500

hi, there:

I am trying to upgrade the kernel from 2.2.14 to 2.3, and the following is
my procedure:

copy the source code to /usr/src;
using gunzip and tar;
make mrproper;
make menuconfig;
make dep;
make bzImage;

after these, I copy the generated "vmlinux" to /boot, and modify the
/etc/lilo.conf, but after I run lilo command, I was told that the
"vmlinux" is too large? 

Any suggestions for fix it?

thanks in advance,

Bo



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

From: Chirok Han <[EMAIL PROTECTED]>
Subject: depmod not work in Kernel 2.4.0-test9
Date: 6 Oct 2000 17:47:04 GMT

When I tried to install Kernel 2.4.0-test9, everything worked fine but
the installation of modules.  As I do 'make modules_install', I got
error that the flag -F in
/sbin/depmod -ae -F System.map Kernel-2.4.0-test9
is invalid.  So I tried 'depmod -a' after booting in the new kernel,
but it just made an empty file '/lib/modules/2.4.0-test9/modules.dep'
whose size is 0.  As I issue 'depmod -a', it finishes in no time and
the resulting file size is just 0.
Please help me.

CH
 

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


** 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