Linux-Development-Sys Digest #452, Volume #8     Tue, 30 Jan 01 06:13:11 EST

Contents:
  PCI access from and app, ioremap (bjrosen)
  Re: Sys call for Available Memory? - Attempts to help, but still no answer after 
months.  :-( (MeekGeek)
  Re: can Linux be secure? ([EMAIL PROTECTED])
  Re: Forcing a Core Dump (MeekGeek)
  Re: How can I lock a page and get the physical addr from user mode? 
([EMAIL PROTECTED])
  Where are source codes related to ps/2 mouse driver? ([EMAIL PROTECTED])
  Re: PCI bus access (bjrosen)
  No of CPUs in a SMP system on 2.4.0 and Cacheline size (kiran)
  Re: Access to beep (echo \a) on embedded system with no console (Mike McDonald)
  Re: Where are source codes related to ps/2 mouse driver? (Mike McDonald)
  ext3 patch for 2.4 ? (Thomas Huber)
  Re: PCI bus access (Eric)
  Re: Why max 8 SCSI LUNS/device (Josef Moellers)
  512M Physical Memory (Steven Wu)
  Re: Where are source codes related to ps/2 mouse driver? ([EMAIL PROTECTED])
  Re: 512M Physical Memory ([EMAIL PROTECTED])
  Re: Newbie to kernel module programming ([EMAIL PROTECTED])
  Re: can Linux be secure? (Klaus-Georg Adams)
  Re: No of CPUs in a SMP system on 2.4.0 and Cacheline size (Erik Hensema)
  Re: PCI bus access (David Florez)

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

From: bjrosen <[EMAIL PROTECTED]>
Subject: PCI access from and app, ioremap
Date: Tue, 30 Jan 2001 01:30:53 GMT

I need to access PCI memory space from a diagnostic application. Can I
use ioremap from an application? and if so what are the required
#includes and #defines? I've tried

#include <linux/vmalloc.h>

and that gave me a bunch of errors. I've also tried

#define __KERNEL__
#include <asm/io.h>

and that was worse.






Sent via Deja.com
http://www.deja.com/

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

From: MeekGeek <[EMAIL PROTECTED]>
Subject: Re: Sys call for Available Memory? - Attempts to help, but still no answer 
after months.  :-(
Date: Tue, 30 Jan 2001 02:51:48 GMT

Phillip and Kasper, thanks a lot for those info pointers.  I'll look
into both and see what I can come up with.

Thanks again,
M.


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

From: [EMAIL PROTECTED]
Subject: Re: can Linux be secure?
Date: Tue, 30 Jan 2001 02:52:26 -0000

On Mon, 29 Jan 2001 20:18:09 GMT Erik de Castro Lopo <[EMAIL PROTECTED]> wrote:
| [EMAIL PROTECTED] wrote:
|> 
|> Note that the question is "can", not "is".  Also note that I did
|> say "Linux" and not a distribution such as "Redhat", "SuSE", or
|> "Debian".
|
| Of course it can. The problem is that all of the major deistribution
| install everything by default. It is this default installation which
| is insecure. For instance, all the distributions I have seen enable
| NFS by default even though less than 10% of people probably use it.
| Running NFS on the public internet is just asking to be hacked.
|
| To make any of these systems secure is trival for anyone with a little
| experience. Its basically a matter of installing the latest security
| patches and disabling everything that isn't needed.

My basic concern is with the kernel.  If there are issues with the
server applications, such as apache, I can address it with them, or
"back port" the audited OpenBSD code, or at least take from the same
version.

One approach to security I have designed is to use more than one
different platform in redundant services.  For example, run DNS
services on a concurrent set of Linux, OpenBSD, and Solaris.  Then
if one of them becomes exploitable, just pull the plug on it.  You
can later address how to get it back online securely.  In the mean
time your core service didn't go down on account of security.  I
remember when I discovered a particular pop3 server became exploitable
and how quickly I rush to gum-up the hole while I had it shut down.

I say "gum-up" because my quickie solution was to add a random amount
of extra space to the particular buffer malloc() call that was the
point of exploit.  It wasn't exactly secure, but it would fend them
off for a while until the figured it out.  Later I could figure out
a new way to read the data into the buffer, or just wait for the
authors to come to their senses and fix it.


|> If a custom made distribution consisting of well audited programs
|> and other components (including especially system and administration
|> facilities) is bundled with the Linux kernel, just how safe is the
|> kernel itself in terms of security, compared to a system like OpenBSD?
|> Assume one used all the same program components as OpenBSD did and
|> just compare the kernels.

| OpenBSD is installs "secure by default". You then have to add stuff
| to make it insecure^H^H^H^H^H^H fuctional.

Are you saying functional == insecure?


| Debian is audited almost as heavily as OpenBSD but the default
| install is insecure just like most other distributions. 

So it defeats the purpose.

-- 
=================================================================
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
=================================================================

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

From: MeekGeek <[EMAIL PROTECTED]>
Subject: Re: Forcing a Core Dump
Date: Tue, 30 Jan 2001 02:54:36 GMT

>If you really wants it core dump, use some variable divided by 0.

I believe the simplest way to force a core dump is to call abort().

You may need to set rlimit(RLIMIT_CORE,...) to something other than 0
if it is 0.


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

From: [EMAIL PROTECTED]
Subject: Re: How can I lock a page and get the physical addr from user mode?
Date: Tue, 30 Jan 2001 02:56:40 -0000

On Mon, 29 Jan 2001 23:03:25 GMT MurThauZ <[EMAIL PROTECTED]> wrote:
| Ed Gregg a �crit :
|
|> I have a user-mode program that is programming a device directly. I need to
|> give the device the
|> PCI address of a memory location so the device
|> can write to this location. Is there user mode system calls or ioctls that I
|> can use that will lock down the memory, and return the physical address
|> of the memory?
|>
|> Thanks,
|> Ed
|
| Hi,
| Just open /dev/mem, then do a mmap using your physical adresse as offset,
| and 0 as vaddr  .... it will return you a pointer in the virtual address space
| of you process that will map what ever you want.
| And the best : mmap is posix ...

I believe he wants to find out what the physical address is, and already
knows what the virtual address is.  He needs the opposite.

-- 
=================================================================
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
=================================================================

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

From: [EMAIL PROTECTED]
Subject: Where are source codes related to ps/2 mouse driver?
Date: Tue, 30 Jan 2001 02:55:57 GMT

Hi..
I want to analyze mouse driver source.
I found the source related to serial mouse.
But, I have not serial mouse. So, I can test with ps/2 mouse.
In linux source codes, what are the sources related to ps/2 mouse?
Thanks in advance.


Sent via Deja.com
http://www.deja.com/

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

From: bjrosen <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.development.apps,comp.os.linux.hardware,comp.os.linux.misc
Subject: Re: PCI bus access
Date: Tue, 30 Jan 2001 04:38:44 GMT

Is there anyway to do this without a driver? I'm trying to do the same
thing for a hardware development diagnostic and I haven't been able to
figure out which #includes and #defines are required to make ioremap
work. I'm looking for the simplest way to get at PCI memory space.

Thanks

Josh


In article <[EMAIL PROTECTED]>,
  Arne Driescher <[EMAIL PROTECTED]> wrote:
> David Florez wrote:
> >
> > Hi All,
> > Does anybody know if there is a way of mapping
> > the physical PCI bus addresses into user memory
> > space (being user root if needed)?
> >
> > I need to write an application that will be
> > accessing the PCI bus VERY often. The only thing
> > I can think of is adding a module to the kernel
> > (device driver) that maps the PCI bus to kernel
> > linear space ( by calling ioremap() ) and
> > therefore the user app would have to issue a
> > system call to request a PCI bus data transaction
> > to the device driver. The idea would be finding a
> > way of getting rid of these overkilling system
> > calls.
> The trick is called mmap. This means you have to write
> a device driver (module) that implements the mmap system call.
> Basically it works like:
> 1) The user uses address=mmap(FileHandle,some parameter ..) to
>    get an address where the mem is mapped.
> 2) The request is routed to your driver and used to setup
>     some memory mapping.
>
> Good luck,
>
> Arne
>


Sent via Deja.com
http://www.deja.com/

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

From: kiran <[EMAIL PROTECTED]>
Subject: No of CPUs in a SMP system on 2.4.0 and Cacheline size
Date: Tue, 30 Jan 2001 11:45:45 +0530

Hi,
Was wonderin how to retrive no of cpus on intel SMP.  I stumbled across
smp_num_cpus  which is exported in i386_ksyms.c,  Looks like it is
initialized in smpboot.c.  Can somebody tell me if i am right?? (problem
is i don't have a smp box to test it oit as of now  :-) )

Oh btw if somebody could let me know the #define for cacheline size in
2.4.0 i would be thankful.

TIA
K


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

Reply-To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED] (Mike McDonald)
Subject: Re: Access to beep (echo \a) on embedded system with no console
Date: Tue, 30 Jan 2001 06:20:00 GMT

In article <da%c6.527$[EMAIL PROTECTED]>,
        "Bill Anderson" <[EMAIL PROTECTED]> writes:
> In article <94r3le$n$[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote:
> 
>> Folks,
>> 
>>   I am building an embedded system, and putting together a custom
>>   kernel.
>> 
>>   The hardware is an AMD 486 with 16 meg Flash memory disk, and PCMCIA,
>>   where I am running a Lucent wireless card.
>> 
>>   I am short of space, and wish to have a minimal feature kernel.
>> 
>>   I wish to have access to the console beep, but I do not need a full
>>   console.
>> 
>>   The hardware has a PC-compatible squeaker, that I want to be able to
>>   squeak with 'echo \\a > /dev/console' or something in a shell script.
> 
> Well, you will first need to pass echo an option to interpret the \a:
> echo -e \\a
> otherwise, echo just echoes the text '\a'
> 
> Just a thought.
> 
> Bill Anderson

  But none of this echo stuff is accessing the console's beep. It's triggering
the terminal connected to the machine's beep. I think he wants to beep the
internal PC speaker, which I don't know how to do.

  Mike McDonald
  [EMAIL PROTECTED]

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

Reply-To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED] (Mike McDonald)
Subject: Re: Where are source codes related to ps/2 mouse driver?
Date: Tue, 30 Jan 2001 06:23:26 GMT

In article <955afq$2kq$[EMAIL PROTECTED]>,
        [EMAIL PROTECTED] writes:
> Hi..
> I want to analyze mouse driver source.
> I found the source related to serial mouse.
> But, I have not serial mouse. So, I can test with ps/2 mouse.
> In linux source codes, what are the sources related to ps/2 mouse?
> Thanks in advance.

  /usr/src/linux/drivers/char/pc_keyb.c (look for CONFIG_PSMOUSE)

  Mike McDonald
  [EMAIL PROTECTED]

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

Reply-To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED] (Thomas Huber)
Subject: ext3 patch for 2.4 ?
Date: 30 Jan 2001 08:15:59 +0100

Hello,

To reduce the checking time on my 14GB Partition, I'd
like to use a journaling file system. Reiserfs is very
good (I use it at home) and efficient, but the existing ext2
can be upgraded to reiserfs only by backing everything up,
creating the fs and copying back. As I have no extra disk
space, this is not possible here at the moment. Now the ext3fs
can be installed from ext2 without 'destruction', which is
what I want. However, I wasn't able to find the ext3fs patch
for linux 2.4. (only some old 2.2.x). Has ext3fs stopped from
being developped ? Any news ?

Thanks,


Thomas

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

From: Eric <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.development.apps,comp.os.linux.hardware,comp.os.linux.misc
Subject: Re: PCI bus access
Date: Tue, 30 Jan 2001 08:52:09 +0100
Reply-To: [EMAIL PROTECTED]

bjrosen wrote:
> 
> Is there anyway to do this without a driver? I'm trying to do the same
> thing for a hardware development diagnostic and I haven't been able to
> figure out which #includes and #defines are required to make ioremap
> work. I'm looking for the simplest way to get at PCI memory space.

Drivers aren't all that difficult in linux.
There are good howto's and tutorials on this subject.
If you do a search on google, some good documents will turn up.
(I don't recall the name of the document, but get the tutorial by Ori
Pomerantz)

Eric

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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: Why max 8 SCSI LUNS/device
Date: Tue, 30 Jan 2001 09:21:21 +0100

bill davidsen wrote:
> =

> In article <[EMAIL PROTECTED]>,
> Josef Moellers  <[EMAIL PROTECTED]> wrote:
> | Bill Anderson wrote:
> | > =3D
> |
> | > Is there any (good) reason why the kernel still limits (apparently =
even=3D
> |
> | > in 2.4) the maximum number of LUNS/SCSI device to 8?
> | > =3D
> |
> | > If not, how difficult would it be to modify that?
> |
> | boot: linux max_scsi_luns=3D128
> |
> | Works for us,
> =

>   New one on me. I can see why you need to increase the number of total=

> SCSI devices, but which devices are you using with more than three bits=

> for LUNs? Tape jukebox of some sort?

Nope, Disk RAID boxen, like FibreCAT, can be configured for more than 8
LUNs.

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize
                                                -- T.  Pratchett

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

From: Steven Wu <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.powerpc
Subject: 512M Physical Memory
Date: Tue, 30 Jan 2001 01:31:44 -0700

Hi,

I need a pointer to point out where in the kernel src code which makes 
the linux sees only 512M physical memory.

thanks.
steve


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

From: [EMAIL PROTECTED]
Subject: Re: Where are source codes related to ps/2 mouse driver?
Date: Tue, 30 Jan 2001 08:18:00 GMT

Thanks a lot.. ^^;

In article <y5td6.1023$[EMAIL PROTECTED]>,
  [EMAIL PROTECTED] wrote:
> In article <955afq$2kq$[EMAIL PROTECTED]>,
>       [EMAIL PROTECTED] writes:
> > Hi..
> > I want to analyze mouse driver source.
> > I found the source related to serial mouse.
> > But, I have not serial mouse. So, I can test with ps/2 mouse.
> > In linux source codes, what are the sources related to ps/2 mouse?
> > Thanks in advance.
>
>   /usr/src/linux/drivers/char/pc_keyb.c (look for CONFIG_PSMOUSE)
>
>   Mike McDonald
>   [EMAIL PROTECTED]
>


Sent via Deja.com
http://www.deja.com/

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

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.powerpc
Subject: Re: 512M Physical Memory
Date: Tue, 30 Jan 2001 09:47:03 -0000

In comp.os.linux.development.system Steven Wu <[EMAIL PROTECTED]> wrote:

| I need a pointer to point out where in the kernel src code which makes 
| the linux sees only 512M physical memory.

That will depend on what hardware and BIOS is involved in the situation
where this is detected.

Is there a problem?

-- 
=================================================================
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
=================================================================

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

From: [EMAIL PROTECTED]
Subject: Re: Newbie to kernel module programming
Date: 30 Jan 2001 10:24:18 +0100

"Rich" <[EMAIL PROTECTED]> writes:

> Any help would be appreciated. Thanks all for the great response so far!
> 
> Rich.

you probably didn't include all the files.
I had also this problem, but not with proc ( with filesystems ), try <linux/wrapper.h>.

browse through tutorial on www.linuxdoc.org.

Igor

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

From: Klaus-Georg Adams <[EMAIL PROTECTED]>
Subject: Re: can Linux be secure?
Date: 30 Jan 2001 10:57:02 +0100


You might want to take a look at http://www.bastille-linux.org/
It is basically a hardening script for RedHat Linux.

--
kga

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

From: [EMAIL PROTECTED] (Erik Hensema)
Subject: Re: No of CPUs in a SMP system on 2.4.0 and Cacheline size
Date: Tue, 30 Jan 2001 11:23:18 +0100
Reply-To: [EMAIL PROTECTED]

kiran ([EMAIL PROTECTED]) wrote:
>Hi,
>Was wonderin how to retrive no of cpus on intel SMP.  I stumbled across
>smp_num_cpus  which is exported in i386_ksyms.c,  Looks like it is
>initialized in smpboot.c.  Can somebody tell me if i am right?? (problem
>is i don't have a smp box to test it oit as of now  :-) )

Read /proc/cpuinfo.

-- 
Erik Hensema ([EMAIL PROTECTED]) || ICQ# 8280101
Bride, n.:
        A woman with a fine prospect of happiness behind her.
                -- Ambrose Bierce, "The Devil's Dictionary"

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

From: David Florez <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.development.apps,comp.os.linux.hardware,comp.os.linux.misc
Subject: Re: PCI bus access
Date: Tue, 30 Jan 2001 10:20:22 +0100

Arne,
I searched the web after reading your post and found this:
http://kernelnewbies.org/code/mmap/

The concept seems to be what I'm looking for but I've got a doubt:
I believe that when you map a file into user space by using mmap() the
kernel thinks it's a real file and therefore uses cache pages to do that
mapping. What if what you are really mapping is the PCI bus with lots of
changing hardware registers? How can I get rid of any caching at all?

Thanks to all.

David.

Arne Driescher wrote:
> 
> David Florez wrote:
> >
> > Hi All,
> > Does anybody know if there is a way of mapping
> > the physical PCI bus addresses into user memory
> > space (being user root if needed)?
> >
> > I need to write an application that will be
> > accessing the PCI bus VERY often. The only thing
> > I can think of is adding a module to the kernel
> > (device driver) that maps the PCI bus to kernel
> > linear space ( by calling ioremap() ) and
> > therefore the user app would have to issue a
> > system call to request a PCI bus data transaction
> > to the device driver. The idea would be finding a
> > way of getting rid of these overkilling system
> > calls.
> The trick is called mmap. This means you have to write
> a device driver (module) that implements the mmap system call.
> Basically it works like:
> 1) The user uses address=mmap(FileHandle,some parameter ..) to
>    get an address where the mem is mapped.
> 2) The request is routed to your driver and used to setup
>     some memory mapping.
> 
> Good luck,
> 
> Arne

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


** 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 by posting to the
comp.os.linux.development.system newsgroup.

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