Linux-Development-Sys Digest #914, Volume #7     Mon, 29 May 00 03:13:13 EDT

Contents:
  how to compile for libc5 on a glibc2.1 system? ([EMAIL PROTECTED])
  Re: how to compile for libc5 on a glibc2.1 system? (Markus Kossmann)
  jpg with the GDK ("wafwaf")
  Re: Need ideas for university funded project for linux (Leslie Mikesell)
  Re: Need ideas for university funded project for linux (Jan Knutar)
  comparing passwords (Philip)
  Re: where is __libc_open() defined in glibc 2.1 ? (David Wragg)
  linux/arch/i386/boot/compressed/misc.c ("jacinth")
  Poor performance of IPC on SMP machine ! (Boczi)
  Re: comparing passwords (Jerry Peters)
  Re: ps does not show all processes ("Tim R.")
  Re: ps does not show all processes (Robert Redelmeier)
  ptrace troubles *again* (Tim Muir)
  Re: where is __libc_open() defined in glibc 2.1 ? ([EMAIL PROTECTED])
  Beginner Question. ("Steven M. Duhaime")
  oops messages and wait queue declaration (Arnaud Westenberg)
  top command suck ("XuYifeng")

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

From: [EMAIL PROTECTED]
Subject: how to compile for libc5 on a glibc2.1 system?
Date: 26 May 2000 07:02:32 GMT

Is it possible to compile programms for libc5 on a system running glibc?
All of our desktops are running glibc2.1.2 now, but we need to compile
with libc5 for use with an embedded system. For now we use a laptop
running libc5 for compiling but we would perfer to upgrade the laptop
to glibc, too. Is it possible to switch at compile time ?

Any hints welcome.

Thanx,

 -Andreas

-- 
Andreas Liebe/Darmstadt University of Technology/+49 6151 16-3150/3050(FAX)

Versuche nicht, anders zu sein. Sei einfach gut. Gut zu sein ist anders genug.
(Arthur Freed)

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

From: Markus Kossmann <[EMAIL PROTECTED]>
Subject: Re: how to compile for libc5 on a glibc2.1 system?
Date: Sun, 28 May 2000 17:48:19 +0200

[EMAIL PROTECTED] wrote:
> 
> Is it possible to compile programms for libc5 on a system running glibc?
> All of our desktops are running glibc2.1.2 now, but we need to compile
> with libc5 for use with an embedded system. For now we use a laptop
> running libc5 for compiling but we would perfer to upgrade the laptop
> to glibc, too. Is it possible to switch at compile time ?
> 
> Any hints welcome.
Read the glibc-Howto  (
http://www.imaxx.net/%7Ethrytis/glibc/Glibc2-HOWTO-6.html#ss6.3 )
--
Markus Kossmann                                    
[EMAIL PROTECTED]

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

From: "wafwaf" <[EMAIL PROTECTED]>
Subject: jpg with the GDK
Date: Sun, 28 May 2000 16:42:53 GMT

How can I display a jpg with th GDK?!?




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

From: [EMAIL PROTECTED] (Leslie Mikesell)
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: 28 May 2000 12:18:17 -0500

In article <[EMAIL PROTECTED]>,
Horst von Brand <[EMAIL PROTECTED]> wrote:

>>Imagine where we would be if every vendor including
>>tcp/ip had re-written it from scratch because the bsd version
>>could not have been used.  Microsoft and Linux both went this
>>route even though it wasn't required, and the world has gone
>>through several years of pain as a result shaking out bugs
>>that we really didn't need in the first place.
>
>As I remember it, the BSD TCP/IP code was being threatened by the AT&T
>lawsuit at the time. When that cleared up, Linux' TCP/IP was good enough,
>and to hack the BSD code into Linux would have meant greater pain.

Or the Not-Invented-Here syndrome had kicked in...  You'll note
at least 2 near-complete rewrites of the Linux code since the
time the BSD code was clearly usable.

  Les Mikesell
    [EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] (Jan Knutar)
Crossposted-To: 
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: Need ideas for university funded project for linux
Date: Sun, 28 May 2000 10:07:36 GMT

On Sat, 27 May 2000 03:44:53 GMT, [EMAIL PROTECTED] (Christopher
Browne) wrote:

>Centuries ago, Nostradamus foresaw a time when Jan Knutar would say:
>>On Tue, 23 May 2000 10:21:52 -0400, Someone <[EMAIL PROTECTED]> wrote:
>>
>>>use it for?  Why don't any of the free ISPs support Linux?  That would be
>>
>>Could anyone please define 'free ISP' ??
>
>These are Internet Service Providers that provide service at no charge
>to the users.

In that case, there are free ISP's that you can use Linux with.





-- 
JK <[EMAIL PROTECTED]>
Any attempt to stretch fuel is guaranteed to increase headwind.

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

From: Philip <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: comparing passwords
Date: Sun, 28 May 2000 17:57:01 GMT


How can I compare the root password with a password which a user
entered.
I want to make a tool like su .. please do not reply with "why do you
want to make a tool that already exist" .. I don't ! :) ok?

pw->pw_passwd conains 'x' .. and thats not my root password :)

(gcc)


-- 
Philip van Hoof aka freax        _/_/_/                                 
irc: freax @ undernet.org       _/_/  _/ _/_/   _/_/_/    _/_/   _/   _/
http://users.pandora.be/skatan _/_/     _/ _/  _/       _/  _/   _/  _/ 
mailto:[EMAIL PROTECTED]     _/_/_/_/   _/  _/ _/_/    _/_/_/_/   _/_/   
Hey, it will happen. They'll _/_/     _/     _/      _/    _/  _/  _/   
go where the money is(Linus)_/_/     _/      _/_/_/ _/    _/ _/     _/

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

From: David Wragg <[EMAIL PROTECTED]>
Subject: Re: where is __libc_open() defined in glibc 2.1 ?
Date: 28 May 2000 13:36:04 +0000

[EMAIL PROTECTED] writes:
> But when I search for '__libc_open' in all files called open.c in the
> glibc tree, I do not see it:

glibc generates syscall wrappers automatically, except for some
complicated cases, based on specifications listed in syscalls.list
files. E.g. for open, sysdeps/unix/syscalls.list has the line:

open            -       open            3       __libc_open     __open open

__libc_open is the symbol to use for the wrapper, and __open and open
are weak aliases to add for that symbol (sysdeps/unix/make-syscalls.sh
inteprets these lists). Thus programs and shared libraries can
override open and __open, but __libc_open always refers to the real
sycall.

IIRC, the lists used for Linux are sysdeps/unix/syscalls.list,
sysdeps/unix/sysv/syscalls.list, and
sysdeps/unix/sysv/linux/syscalls.list


David Wragg

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

From: "jacinth" <[EMAIL PROTECTED]>
Subject: linux/arch/i386/boot/compressed/misc.c
Date: Mon, 29 May 2000 03:02:59 +0800

hello everyone:
    I can't understand what are these lines living for??

#define STACK_SIZE (4096)

long user_stack [STACK_SIZE];

struct {//what is it??
 long * a;
 short b;
} stack_start = { & user_stack [STACK_SIZE] , __KERNEL_DS };



in this code, none uses stack_start....

thanks



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

From: [EMAIL PROTECTED] (Boczi)
Subject: Poor performance of IPC on SMP machine !
Date: 28 May 2000 16:14:03 GMT
Reply-To: [EMAIL PROTECTED]


I'm writiting my thesis, and one part concerns IPC performance on Linux.

I wrote some tests. Classic ping-pong using pipes, message queues and my
brand new QNX like message passing. 

I ran my tests on 2.2.14 kernel with SMP support and the machine was dual
Pentium 166 MMX with 64 MB of memory. No other processes. 

I measured time using gettimeofday at the begining and the end of ping-pong.
To ensure, that the measurement are worth anything, processes exchangeg data
10000 times. 

The first test I ran with two processors on board. 
Then I turned off the machine, removed one processor and ran the tests again. 

And then I was shocked. Results on one-processor machine were ~60% BETTER !!

And here are some results. 

1. Average time of passing one (of 10000) messages of 1000 bytes: 


       |  1 CPU   |  2 CPU
=======+==========+===========
MSG    | 46.7 us  | 111.7 us
PIPE   | 34.0 us  |  65.2 us
QNX    | 29.9 us  |  70.8 us

Where:
- MSG is message passing with msgsnd/msgrcv
- PIPE is read/write through pipe
- QNX is my own Send/Receive/Reply method

2. The same, but passing 4000 bytes

       |  1 CPU   |  2 CPU
=======+==========+===========
MSG    | 100.4 us | 258.8 us
PIPE   | 132.6 us | 256.4 us
QNX    |  44.1 us | 162.5 us
       

Of course I made much more tests with diffrent paramteres (message size,
number of communications), but all of them looked similar. 
When I saw the results, I though, I mistaken the reults, and I repeated the
tests. The same results. 

Anybody got ani idea, what is wrong? 

WHY DUAL CPU COMPUTER IS 2 TIMES SLOWER THAN SINGLE CPU ?????


Best regards 

Boczi
-- 
Andrzej Boczek  (boczi<at>pol.pl)


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

From: Jerry Peters <[EMAIL PROTECTED]>
Subject: Re: comparing passwords
Date: Sun, 28 May 2000 21:03:36 GMT

Philip <[EMAIL PROTECTED]> wrote:

> How can I compare the root password with a password which a user
> entered.
> I want to make a tool like su .. please do not reply with "why do you
> want to make a tool that already exist" .. I don't ! :) ok?

> pw->pw_passwd conains 'x' .. and thats not my root password :)

That usually indicates that shadow passwords are installed. 

> (gcc)


> -- 
> Philip van Hoof aka freax        _/_/_/                                       
> irc: freax @ undernet.org       _/_/  _/ _/_/   _/_/_/    _/_/   _/   _/
> http://users.pandora.be/skatan _/_/     _/ _/  _/       _/  _/   _/  _/ 
> mailto:[EMAIL PROTECTED]     _/_/_/_/   _/  _/ _/_/    _/_/_/_/   _/_/   
> Hey, it will happen. They'll _/_/     _/     _/      _/    _/  _/  _/   
> go where the money is(Linus)_/_/     _/      _/_/_/ _/    _/ _/     _/

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

Date: Sun, 28 May 2000 18:11:17 -0500
From: "Tim R." <[EMAIL PROTECTED]>
Subject: Re: ps does not show all processes

Robert Redelmeier wrote:

> Jackson C. Allen wrote:
> >
> > Apparently you did not read my message very well. Yes I have RTFM and
> > tried "ps ax" "ps aux" and "ps -ax" and many others. This is the reason
> > I have posted the question, because it does not work.
>
> Well, then I'd suspect you have a trojaned `ps` .
> This is not unusual when a cracker obtains root.
>
> My ps shows sendmail and everything else.
>
> -- Robert

how about an ls -l `which ps` or something liek that, and check ps's
modified date?



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

From: Robert Redelmeier <[EMAIL PROTECTED]>
Subject: Re: ps does not show all processes
Date: Sun, 28 May 2000 19:35:56 -0500

Tim R. wrote:

> Robert Redelmeier wrote:
> > Well, then I'd suspect you have a trojaned `ps` .
> > This is not unusual when a cracker obtains root.

> how about an ls -l `which ps` or something liek that, and check ps's
> modified date?

This is a simplistic check, easy to circumvent.
tripwire and/or MD5 checksums on critical system
binaries is a more robust solution.

-- Robert

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

From: Tim Muir <[EMAIL PROTECTED]>
Subject: ptrace troubles *again*
Date: Mon, 29 May 2000 10:50:49 +1000


I am working on a program which traps system calls and monitors
"dangerous" calls like open / unlink etc.

I am forking off a child process then exec' ing the program I want to
run, and the parent continues to run tracing the child using the ptrace
library.

When I run a program and it exits normally, everything works fine.

I encounter problems when I attempt to use PTRACE_KILL to terminate an
attached process which does something "illegal".
After I do this, the tracing process just dies. I used strace to track
down the bug and discovered that it was a problem with the process
attempting to write to stdout or read from stdin when it was running in
the background even though I have waited until the WIFEXITED(status) macro
evaluates to true for the traced process before attempting to read/write
from/to stdin/out.

However, if I write to the stdout from the tracing process while the child
process is still running there is no problem !

Does anyone know how to fix this problem - should I ignore these signals
using SIG_IGN or process them in some special way. Is there a way of
forcing a task to run in the foreground from within your code ?

Regards

Timothy Muir


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

From: [EMAIL PROTECTED]
Subject: Re: where is __libc_open() defined in glibc 2.1 ?
Date: 28 May 2000 17:49:40 -0700

In article <[EMAIL PROTECTED]>, David says...

>
>[EMAIL PROTECTED] writes:
>> But when I search for '__libc_open' in all files called open.c in the
>> glibc tree, I do not see it:

>
>glibc generates syscall wrappers automatically, except for some
>complicated cases, based on specifications listed in syscalls.list
>files. E.g. for open, sysdeps/unix/syscalls.list has the line:
>
>open            -       open            3       __libc_open     __open open
>
>__libc_open is the symbol to use for the wrapper, and __open and open
>are weak aliases to add for that symbol (sysdeps/unix/make-syscalls.sh
>inteprets these lists). 

thanks David.
In the above line from syscalls.list, the first column is the file name.
Since there are in the source tree 3 files called open.c, not sure
how to find which one of them is used in libc.a:

>find . -name open.c
./sysdeps/generic/open.c
./sysdeps/mach/hurd/open.c
./sysdeps/standalone/open.c
>

I can eliminate the 'hurd' one, but not sure I understand the
standalone one. Iam assuming it is the 'generic' one being linked in?

>nm --print-file-name libc.a | grep __libc_open
libc.a:open.o:00000000 T __libc_open

Which there was a way to show the full path name of the file used
in the above 'nm' command.

btw, when using gdb to step into __libc_open(), there was no
source lines information:

(gdb) where
#0  0x804dfb0 in __libc_open ()
(gdb) 

(gdb) list __libc_open
No line number known for __libc_open

must be a side effect  of the way it was constructed?

I want to step untill I get to the call to interrupt x80 before entry to
kernel mode. I'll figure how to use gdb to step in kernel code when I get
to that ;)

so many things to learn, so little time..

Nasser
 


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

From: "Steven M. Duhaime" <[EMAIL PROTECTED]>
Subject: Beginner Question.
Date: Sun, 28 May 2000 15:29:20 +0600

I'm learning C out of books for now, or at least I'm going to try. My
problem is very basic. How can I use 'cout'? I haven't been able to find
reference to 'printf', and my books don't work with it. I found the
'iostream.h' header file in another directory, but I still can't compile
my beginner programs.

any solutions?
steve....


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

Date: Mon, 29 May 2000 06:31:59 +0200
From: Arnaud Westenberg <[EMAIL PROTECTED]>
Subject: oops messages and wait queue declaration

This is a multi-part message in MIME format.
==============7202CE4D24606C1F8E93346E
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi all,

I have a question concerning the declaration of a wait queue in a device
driver. 

I've declared a srtucture in my header file. This structure is used for
building a circular linked list and, amongst other, holds a wait queue.
I've dynamically allocated memory for the linked list by using kmalloc
for each list entry (in the read section of the driver) so every
instance of the read process can go to sleep on its own wait struct in
the list.

This however doesn't seem to work. When the read process wakes up from
the wait queue, I get an oops message (oops.txt in attachment). When I
have the read processes sleep on a statically declared wait structure,
it works fine. So I know _what_ I'm doing wrong but I don't understand
_why_ it is wrong. Printk-ing the *wq pointer on console works fine and
shows 756e696c. The oops message complains about a page fault at virtual
address 756e6970, 4 bytes higher. Accessing other structure members goes
fine.


Could someone please explain?

The assembly in the oops message shows "movl   0x4(%ecx),%eax" which
accounts for the 4 bytes difference between the pointer and the page
faulted virtual memory address. I don't have a clue about what I'm
trying to say here, but if somebody knows links to any information about
making sense of oops messages, I appreciate that.


Here's the relevant code:

In header.h:

typedef struct list_entry * ptr_to_list_entry;
struct list_entry {
        unsigned long data;
        struct wait_queue *wq;
        ptr_to_list_entry next;
};

In read.c
ssize_t read(struct file *file, char *buffer, size_t length, loff_t
*offset)
{
        ptr_to_list_entry new_entry;

        new_entry=(ptr_to_list_entry)kmalloc(sizeof(struct
list_entry),GFP_KERNEL);
        /* I assume sizeof(struct list_entry) doesn't result in what I hoped
for */

        /* Some code to set up the linked list */

        printk(KERN_ERR "new_entry->wq is: %p\n", new_entry->wq);
        interruptible_sleep_on(&new_entry->wq);

        /* rest of code */
}
==============7202CE4D24606C1F8E93346E
Content-Type: text/plain; charset=us-ascii;
 name="oops.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="oops.txt"

WARNING: This version of ksymoops is obsolete.
WARNING: The current version can be obtained from ftp://ftp.ocs.com.au/pub/ksymoops
Options used: -V (default)
              -o /lib/modules/2.2.12-20/ (default)
              -k /proc/ksyms (default)
              -l /proc/modules (default)
              -m /boot/System.map (specified)
              -c 1 (default)

Unable to handle kernel paging request at virtual address 756e6970 
current->tss.cr3 = 00c88000, %cr3 = 00c88000 
*pde = 00000000 
Oops: 0000 
CPU:    0 
EIP:    0010:[interruptible_sleep_on+60/92] 
EFLAGS: 00010046 
eax: 00c88000   ebx: c037bf4c   ecx: 756e696c   edx: 756e696c 
esi: 00000286   edi: c037bf98   ebp: c037bf54   esp: c037bf4c 
ds: 0018   es: 0018   ss: 0018 
Process rtr_read (pid: 280, process nr: 20, stackpage=c037b000) 
Stack: c037a000 756e696c c037bf98 c2809de5 c280aa13 756e696c c12f9f80 ffffffea  
       00000000 c0531da0 c0125fcb 000b1210 00000001 00000000 00000005 00000000  
       00000000 00000000 00000000 00000008 c01255b2 c12f9f80 08049654 00000008  
Call Trace: [<c2809de5>] [<c280aa13>] [chrdev_open+63/76] [sys_read+174/196] 
[system_call+52/56]  
Code: 8b 41 04 39 d8 74 0a 90 89 c2 8b 42 04 39 d8 75 f7 89 4a 04  

Trace: c2809de5 <fat_search_long+dd/5d0>
Trace: c280aa13 <vfat_ioctl_fill+7/174>
Code:  00000000 Before first symbol            00000000 <_IP>: <===
Code:  00000000 Before first symbol               0:    8b 41 04                movl   
0x4(%ecx),%eax <===
Code:  00000003 Before first symbol               3:    39 d8                   cmpl   
%ebx,%eax
Code:  00000005 Before first symbol               5:    74 0a                   je     
 00000011 Before first symbol
Code:  00000007 Before first symbol               7:    90                      nop    
Code:  00000008 Before first symbol               8:    89 c2                   movl   
%eax,%edx
Code:  0000000a Before first symbol               a:    8b 42 04                movl   
0x4(%edx),%eax
Code:  0000000d Before first symbol               d:    39 d8                   cmpl   
%ebx,%eax
Code:  0000000f Before first symbol               f:    75 f7                   jne    
 00000008 Before first symbol
Code:  00000011 Before first symbol              11:    89 4a 04                movl   
%ecx,0x4(%edx)


3 warnings issued.  Results may not be reliable.



==============7202CE4D24606C1F8E93346E==


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

From: "XuYifeng" <[EMAIL PROTECTED]>
Subject: top command suck
Date: Mon, 29 May 2000 14:47:40 +0800

Hi,

can anyone tell me why the "top" command refuse to run under a system
has more than 512 processes ?!
why FreeBSD can ?!
is this Linux Limit?
I have a slight busy Web server where process number is more than 512.
this is a annoying limit.

any help will be appreciated,
XuYifeng




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


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