Linux-Development-Sys Digest #282, Volume #8     Thu, 16 Nov 00 01:13:10 EST

Contents:
  Re: Patch for g++ and glibc-2.2 anyone? (Thomas W. Horna)
  Re: CMOS access ("Ken Wilson")
  Re: injecting keystrokes into virtual console (George MacDonald)
  [ip_masq.o] Error 1 aborts my kernel build ([EMAIL PROTECTED])
  Re: Newbie compile problem ([EMAIL PROTECTED])
  Re: injecting keystrokes into virtual console ([EMAIL PROTECTED])
  make[3]: *** [ip_masq.o] Error 1 ([EMAIL PROTECTED])
  Re: linux API ([EMAIL PROTECTED])
  Re: linux API ([EMAIL PROTECTED])
  Re: make[3]: *** [ip_masq.o] Error 1 ([EMAIL PROTECTED])
  Re: Segmentation faults with struct hostent & char ** (James Moe)
  Re: Accessing a separate process's memory from a syscall (James Moe)
  Re: linux API (Alexander Viro)
  accessing attrib byte of win32 files ([EMAIL PROTECTED])
  accessing attrib byte of win32 files ([EMAIL PROTECTED])

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

From: Thomas W. Horna <[EMAIL PROTECTED]>
Subject: Re: Patch for g++ and glibc-2.2 anyone?
Date: Thu, 16 Nov 2000 00:44:56 +0100
Reply-To: [EMAIL PROTECTED]





> > however, this site appears to be dead.  Is there an alternative site?


I�ve found these two mirrrrors

http://www.made-it.com/TMP/glibc22install-HOWTO.html
http://www.veldy.net/glibc22install-HOWTO.html


bya


======================================
Horna W. Thomas

"Film is not Theatre"  Robert Bresson
======================================

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

From: "Ken Wilson" <[EMAIL PROTECTED]>
Subject: Re: CMOS access
Date: Wed, 15 Nov 2000 15:55:16 -0800

Hi Georg,
Being a new to Linux, I don't understand what you're advising me.
There isn't /dev/nvram on my Red Hat 6.2 machine.  How do I get
driver (module)?

Josef,
I can't find the mini-howto on my system either.  Is there anything on
the internet?
I use a CMOS location on this machine to store data which can be manipulated
with BIOS setup.  After boot in DOS/Win9x, I can easily access it thru port
70.
With Red Hat, I would like to use this data as I did in DOS/Win9x.


"Georg Acher" <[EMAIL PROTECTED]> wrote in message
news:8uubn5$elo$[EMAIL PROTECTED]...
> In article <[EMAIL PROTECTED]>,
>  "Ken Wilson" <[EMAIL PROTECTED]> writes:
> |> Hi,
> |>
> |> Can I access the CMOS of an x86 system on Red Hat 6.2 ?
> |> In DOS, I can do IO to port 70h, how do I do in Linux?
>
> Besides the direct I/O, there is also the way via /dev/nvram. You just
need the
> driver (module), then you can do lseek and read/write on the CMOS memory.
>
> --
>          Georg Acher, [EMAIL PROTECTED]
>          http://www.in.tum.de/~acher/
>           "Oh no, not again !" The bowl of petunias



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

From: George MacDonald <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: injecting keystrokes into virtual console
Date: Thu, 16 Nov 2000 02:01:39 GMT

[EMAIL PROTECTED] wrote:
> 
> On Wed, 15 Nov 2000 05:33:46 GMT George MacDonald <[EMAIL PROTECTED]> wrote:
> | [EMAIL PROTECTED] wrote:
> |>
> |> On Tue, 14 Nov 2000 10:17:18 -0000 Mirco Zaggy <[EMAIL PROTECTED]> wrote:
> |>
> |>  Oh, I think I'm carrying this idea  a bit too far already.
> |>
> |
> | A hardware solution?  -> http://www.vetra.com
> 
> A KVM switch?  Not even close.
> 

Jeesh, look across the page on the right hand side:

        Keyboard<->rs232  translator

http://www.vetra.com/335text.html

Use another computer to drive the keyboard.



-- 
We stand on the shoulders of those giants who coded before.
Build a good layer, stand strong, and prepare for the next wave.
Guide those who come after you, give them your shoulder, lend them your code.
Code well and live!   - [EMAIL PROTECTED] (7th Coding Battalion)

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

From: [EMAIL PROTECTED]
Subject: [ip_masq.o] Error 1 aborts my kernel build
Date: Thu, 16 Nov 2000 03:54:53 GMT

I'm trying to build a kernel on a 486-DX2 using
source from kernel-source-2.2.16-22.i386.rpm.
The distribution was from RedHat 7.0.
The gcc version is 2.96.

After about a freakin' hour, it aborts out of the
build with the following last gcc text:

gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -
Wstrict-prototypes -O2 -fomit-frame-pointer -fno-
strict-aliasing -pipe -fno-strength-reduce -m486 -
DCPU=486   -DEXPORT_SYMTAB -c ip_masq.c
In file included from ip_masq.c:85:
/usr/src/linux/include/net/ip_masq.h:319:26:
warning: nothing can be pasted after this token
/usr/src/linux/include/net/ip_masq.h:322:25:
warning: nothing can be pasted after this token
/usr/src/linux/include/net/ip_masq.h:325:29:
warning: nothing can be pasted after this token
ip_masq.c:578: `ip_masq_hash' undeclared here
(not in a function)
ip_masq.c:578: initializer element is not constant
ip_masq.c:578: (near initialization for
`__ksymtab_ip_masq_hash.value')
ip_masq.c:579: `ip_masq_unhash' undeclared here
(not in a function)
ip_masq.c:579: initializer element is not constant
ip_masq.c:579: (near initialization for
`__ksymtab_ip_masq_unhash.value')
ip_masq.c:518: warning: `masq_port_lock' defined
but not used
make[3]: *** [ip_masq.o] Error 1
make[3]: Leaving directory `/usr/src/linux-
2.2.16/net/ipv4'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-
2.2.16/net/ipv4'
make[1]: *** [_subdir_ipv4] Error 2
make[1]: Leaving directory `/usr/src/linux-
2.2.16/net'
make: *** [_dir_net] Error 2
[root@pokey linux]#

I'm not sure where to start looking.  I would
greatly appreciate some help from the community.

Thank you very much.

Brian


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

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

From: [EMAIL PROTECTED]
Subject: Re: Newbie compile problem
Date: Thu, 16 Nov 2000 03:54:54 GMT

Do you need to compile them?
Consider obtaining them from the RPM.
rpm -i rpm_filename
The above will install the programs you want.
Sorry if this wasn't what you needed.

Brian

In article <3a130bae$0$8166@reader3>,
  "Jan Thompson" <[EMAIL PROTECTED]> wrote:
> I am trying to compile several programs like
Squid, OpenSSL and OpenSSH.
> Whatever I try I get fatal errors during
compilations.
> Error is:
> make[1]:  ....   Illegal instruction (Core
dumped)
>
> In the makefile originally was a line like
CLAGS= .... -march=pentiumpro
> ....
> I tried to change this in just pentium, I
removed the entry, but I still get
> the error!
> I'm getting desperate!
> My CPU is a Pentium 200 MMX, 128Mb mem, SCSI
disks
> Is this a Pentium bug or any hardware related
problem, is it ...
>
> Any suggestions would be appreciated.
>
> Thanks in advance, Jan...
>
>



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

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

From: [EMAIL PROTECTED]
Subject: Re: injecting keystrokes into virtual console
Date: Thu, 16 Nov 2000 04:04:22 -0000

On Thu, 16 Nov 2000 02:01:39 GMT George MacDonald <[EMAIL PROTECTED]> wrote:
| [EMAIL PROTECTED] wrote:
|> 
|> On Wed, 15 Nov 2000 05:33:46 GMT George MacDonald <[EMAIL PROTECTED]> wrote:
|> | [EMAIL PROTECTED] wrote:
|> |>
|> |> On Tue, 14 Nov 2000 10:17:18 -0000 Mirco Zaggy <[EMAIL PROTECTED]> wrote:
|> |>
|> |>  Oh, I think I'm carrying this idea  a bit too far already.
|> |>
|> |
|> | A hardware solution?  -> http://www.vetra.com
|> 
|> A KVM switch?  Not even close.
|> 
|
| Jeesh, look across the page on the right hand side:
|
|       Keyboard<->rs232  translator
|
| http://www.vetra.com/335text.html
|
| Use another computer to drive the keyboard.

The purpose is to be able to have a program initialize a session environment,
such as logging in, or starting a program and feeding it initial keystrokes,
then using that session in the normal way.

The way I do it now is with a program that opens the virtual console tty
(or it could open the serial port) and starts a session via a pty.  After
it feeds in the initialization input, it then passes all traffic to that
session from its input.

What you're suggesting is an expensive hardware alternative that requires a
whole other computer just to do what I do now with just a program.  What I
want to do is eliminate this excessive process, since the initialization is
just a few seconds perhaps once a week, and all the remaining time is spent
shuffling bytes back and forth.  I don't want to put hardware in its place.

It appears the kernel does not have what I need, although I can see where
someone in the past thought that what it does have meets my needs (maybe
because they just didn't understand what I was asking for).  I don't know
if you misunderstood what I was asking for, or just trying to divert me
to something entirely different.

I'm going to have to write a new driver in the kernel.  I'll have to decide
if it will be:

1.  A new device, analogous to /dev/vcs[a][0-9]*, but associated with the
    virtual console keyboard input.  Writing to it would take the data and
    make it be keyboard input.  An ioctl() may be possible to allow the
    mode to accept already translated ASCII or untranslated keyboard scan
    codes.

2.  A whole new device class which combines what pty is and what vc is.
    It would be perhaps a "vpty".  It would have all the semantics of a
    pty as well as a vc.  Each could be selectively bound to the screen
    and keyboard much as vc's a switched now.  They would be allowed to
    persist even if the pty size closes.  The sessions could then be
    "operated" either via a console switch or opening the pty side.

I rather like #2, but #1 would probably be simpler to implement.  Either
way it means diving in to the kernel and coding, which I don't have time
for right now (I'm busy diving into a few other projects right now).  So
it won't happen just now.

-- 
| Phil Howard - KA9WGN | My current websites: linuxhomepage.com, ham.org
| phil  (at)  ipal.net +----------------------------------------------------
| Dallas - Texas - USA | [EMAIL PROTECTED]

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

From: [EMAIL PROTECTED]
Subject: make[3]: *** [ip_masq.o] Error 1
Date: Thu, 16 Nov 2000 03:59:37 GMT

I'm trying to build a kernel on a 486-DX2 using source from kernel-
source-2.2.16-22.i386.rpm.  The distribution was from RedHat 7.0.
The gcc version is 2.96.

After about a freakin' hour, it aborts out of the build with the
following last gcc text:

gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -
O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-
reduce -m486 -DCPU=486   -DEXPORT_SYMTAB -c ip_masq.c
In file included from ip_masq.c:85:
/usr/src/linux/include/net/ip_masq.h:319:26: warning: nothing can be
pasted after this token
/usr/src/linux/include/net/ip_masq.h:322:25: warning: nothing can be
pasted after this token
/usr/src/linux/include/net/ip_masq.h:325:29: warning: nothing can be
pasted after this token
ip_masq.c:578: `ip_masq_hash' undeclared here (not in a function)
ip_masq.c:578: initializer element is not constant
ip_masq.c:578: (near initialization for `__ksymtab_ip_masq_hash.value')
ip_masq.c:579: `ip_masq_unhash' undeclared here (not in a function)
ip_masq.c:579: initializer element is not constant
ip_masq.c:579: (near initialization for
`__ksymtab_ip_masq_unhash.value')
ip_masq.c:518: warning: `masq_port_lock' defined but not used
make[3]: *** [ip_masq.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.2.16/net/ipv4'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.2.16/net/ipv4'
make[1]: *** [_subdir_ipv4] Error 2
make[1]: Leaving directory `/usr/src/linux-2.2.16/net'
make: *** [_dir_net] Error 2
[root@pokey linux]#

I'm not sure where to start looking.  I would greatly appreciate some
help from the community.

Thank you very much.

Brian


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

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

From: [EMAIL PROTECTED]
Subject: Re: linux API
Date: Thu, 16 Nov 2000 04:51:21 GMT

[EMAIL PROTECTED] writes:
> In article <8uvhu1$1aj$[EMAIL PROTECTED]>,
>   "Vikash K Agarwal" <[EMAIL PROTECTED]> wrote:
> > I am new to Linux, basically coming from DOS/WIN background, so i may
> sound
> > silly ...
> > Just like there were interrupts in DOS and API in Windows, what is the
> > corresponding in the Linux OS??
> > Where can I find the documentation?
> > Any good books on the subject??
> > lets say  i want to access a file using a Linux OS call, how do i do
> it
> > using a Linux C compiler like GCC??? How do i program for the linux
> GUI,
> > probably referred to as the X-Windows system??
> >
> > any help is sincerely appreciated
> 
> On linux, there are syscalls . You need to put the right value in eax
> and call "int $0x80" (the only software interrupt on linux as far as i
> know) . I recommend you :
> - gcc last version (the one including stack protection)
> - gdb (debugger)
> - objdump (disassembler and binary analyzer)

Are you sure?

Are you sure that "int $0x80" will do what you expect on a MIPS chip?
Or an Alpha?  Or a PPC?

The fact that such details vary, considerably, from architecture to
architecture represents the reason why Sensible People are likely to
ignore such nonsensical suggestions, and instead write programs to use
the POSIX interfaces provided by GLIBC.

The reason to use syscalls would be if you were trying to build
applications that would be _ludicrously_ incompatible with Unix as we
know it.  Perhaps a worthwhile strategy if you're Bill Gates, planning
to spend $350M deploying a project team to build _spectacularly_
proprietary applications to try to subvert Linux, but likely to be
stupendously stupid for just about anyone else.

Certainly the _straight_ answer, to the gentle reader, would be to
suggest that the Gentle Reader examine the documentation to GLIBC,
found at <http://www.gnu.org/software/libc/libc.html>, which provides
all sorts of documentation on this.

"Section 3" of the manual pages represents another good place to look;
this might be found somewhere like /usr/share/man/man3 or
/usr/man/man3, depending on your distribution.
-- 
(concatenate 'string "cbbrowne" "@hex.net") <http://www.ntlug.org/~cbbrowne/>
"Terrrrrific." -- Ford Prefect

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

From: [EMAIL PROTECTED]
Subject: Re: linux API
Date: Thu, 16 Nov 2000 04:51:24 GMT

[EMAIL PROTECTED] (Alexander Viro) writes:
> In article <8uuhtm$gcc$[EMAIL PROTECTED]>,  <[EMAIL PROTECTED]> wrote:
> >On linux, there are syscalls . You need to put the right value in eax
> >and call "int $0x80" (the only software interrupt on linux as far as i
> >know) . I recommend you :
> >- gcc last version (the one including stack protection)
> >- gdb (debugger)
> >- objdump (disassembler and binary analyzer)
> 
> - _NOT_ using the aforementioned interface, since it's Linux- and
> x86-specific and there are much simpler portable ways to do the
> thing. Use libc - functions you need are there and you don't have to
> mess with assembler. It's UNIX, so there is no need to scare sheep -
> just use standard libraries.

Agreed; might be appropriate to use the interrupts if you plan to use
Linux as the kernel for a Spectacularly Custom User Space that
wouldn't resemble Unix.  

[Look at <http://www.clienux.com/> for something of an example of
such; when people propose the idea of building their own distribution,
cLIeNUX is the example I cite, as it actually _is different_, unlike
most proposals that represent thinly veiled "hacks of Red Hat" or
"hacks of Slackware" or such...]

> BTW, since when does gcc include "stack protection", whatever it means?

Probably this is some elusive reference to Crispin Cowan's
"StackGuard" scheme that detects and prevents "stack smashing attacks."

See: <http://www.cse.ogi.edu/DISC/projects/immunix/StackGuard/>
-- 
(concatenate 'string "cbbrowne" "@hex.net") <http://www.ntlug.org/~cbbrowne/>
You  know  that  little  indestructible  black box  that  is  used  on
planes---why  can't  they  make  the  whole  plane  out  of  the  same
substance?

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

From: [EMAIL PROTECTED]
Subject: Re: make[3]: *** [ip_masq.o] Error 1
Date: Thu, 16 Nov 2000 04:45:58 GMT

I found a totally obscure net posting inside a huge text file at some
site.

Essentially, the solution is to compile IP Masq. as a module and not
into the kernel.

My machine is currently chugging away at the build...

Brian


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

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

From: James Moe <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development
Subject: Re: Segmentation faults with struct hostent & char **
Date: Thu, 16 Nov 2000 05:38:29 GMT

Christoper McClan wrote:
> 
> Look at the following small piece of code :
> ---------------------------
> 
> [...]
> int main()
> {
>         char **alias_list;
>         struct hostent *host_name;
>         //host_name->h_name="mymachine.mydomain.net";
>         alias_list[1]="hello";
> }
> ----------------------------------
> This will compile & run fine. If however, you remove the comment from the
> "host_name" line, it will compile, but when executed will segmentation fault!?
> 
    Nowhere do you actually allocate memory for alias_list. You just
have a pointer to an array of pointers but the array has not been
created, just a pointer to it.
    The same for host_name: you have a pointer, NOT the object. So when
you try to derefernce host_name ("host_name->h_name"), you are accessing
random memory.
    C is really generous this way. It gives you really big guns to shoot
your feet with.

-- 
sma at sohnen-moe dot com

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

From: James Moe <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: Accessing a separate process's memory from a syscall
Date: Thu, 16 Nov 2000 05:41:23 GMT

Kevin Wooten wrote:
> 
> I need to know if there is a way to acess another process's memory when
> calling a syscall from a separate process. The way I envision this is to
> call an initialization syscall and save the "current" process structure
> [...]
>
    Have you considered shared memory? It would be a lot easier to use,
does not require manipulating CPU registers, or accessing another
process' space.


-- 
sma at sohnen-moe dot com

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

From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: linux API
Date: 16 Nov 2000 00:51:13 -0500

In article <gJJQ5.9479$[EMAIL PROTECTED]>,
 <[EMAIL PROTECTED]> wrote:

>[Look at <http://www.clienux.com/> for something of an example of
>such; when people propose the idea of building their own distribution,
>cLIeNUX is the example I cite, as it actually _is different_, unlike
>most proposals that represent thinly veiled "hacks of Red Hat" or
>"hacks of Slackware" or such...]

Rick's "I'm a k3wl h4X0R and I can do !3133t! global search-and-replace" one?
Dunno. Never could stomach BBS kiddies...

-- 
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid.  Get yourself a better computer" - Dilbert.

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

From: [EMAIL PROTECTED]
Subject: accessing attrib byte of win32 files
Date: Thu, 16 Nov 2000 05:47:58 GMT

I'd like to write a program to read and/or modify
the attrib byte
of files on a mounted win95 fat32 filesystem. Can
someone give me some pointers as to how I can do
this? TIA
Dave Brown
[EMAIL PROTECTED]


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

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

From: [EMAIL PROTECTED]
Subject: accessing attrib byte of win32 files
Date: Thu, 16 Nov 2000 05:52:05 GMT

I want to write a program that reads and/or modifies the attrib byte
of files on a mounted win95 fat32 partition.  Can someone tell me how
this is done?  TIA
David Brown


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

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


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