Linux-Development-Sys Digest #715, Volume #8     Sun, 13 May 01 14:13:24 EDT

Contents:
  Direct Master Mapping (k)
  Sync and Async disk I/O (Zhiyong Xu)
  Re: Sync and Async disk I/O (Zhiyong Xu)
  Re: Critical sections ([EMAIL PROTECTED])
  Re: Anyone working with IEEE1394 for laptops. CarBus Cards?  cvs (E-mu)
  Re: 2.4.4 Kernel, Something Seriously Wrong.  David Hinds can you read in please to! 
("Bluesky")
  Re: 2.4.4 Kernel, Something Seriously Wrong. David Hinds can you read in please to! 
("Bluesky")
  put_user in 2.2.6 (Wil Taphoorn)
  Re: 2.4.4 Kernel, Something Seriously Wrong. David Hinds can you read in please to! 
("Wayne Osborn")
  Re: command line interpreter (eric)
  lilo boot proplem ("Nicolas Alt")
  Re: Directory Protector (eric)
  Re: Crypto File System (Kasper Dupont)
  Re: put_user in 2.2.6 (Kasper Dupont)
  Re: Guid generator for unix. (Nick Andrew)
  Re: Guid generator for unix. (Nick Andrew)
  Re: Checking if a pointer is valid ("Neil Butterworth")

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

From: k <[EMAIL PROTECTED]>
Subject: Direct Master Mapping
Date: Sat, 12 May 2001 18:12:57 GMT

I am trying to do Direct Master Mapping of PCI Mapping so that Local processor
can access it. I did a 'page = get_free_page(...)' in 'kernel code' and then
used 'virt_to_bus(page)' address to program my PCI re-map register.  Then I
wrote a test pattern on my local side. Now, when I try to read it of this page,
I don't seem to be reading from the right location. Did anybody try to do it.
Any info/suggestions on this..

thanx



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

From: Zhiyong Xu <[EMAIL PROTECTED]>
Subject: Sync and Async disk I/O
Date: Sat, 12 May 2001 20:38:53 -0400

Hi, everyone,
            for sync disk I/O, is the function b_end_io in struct
buffer_head NULL? Becuase b_end_io usually used for async disk I/O?




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

From: Zhiyong Xu <[EMAIL PROTECTED]>
Subject: Re: Sync and Async disk I/O
Date: Sat, 12 May 2001 20:52:53 -0400

Zhiyong Xu wrote:

> Hi, everyone,
>             for sync disk I/O, is the function b_end_io in struct
> buffer_head NULL? Becuase b_end_io usually used for async disk I/O?

Also , do both of these I/Os call b_end_io function? I saw this function
should be end_buffer_io_async.
If not, is there any other functions sync disk I/O must call?
     For sync disk write, must the buffer head labeled as dirty and put
into dirty list, after finishing I/O, move it from dirty list?


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

From: [EMAIL PROTECTED]
Crossposted-To: comp.lang.c,gnu.glibc.bug,linux.dev.kernel
Subject: Re: Critical sections
Date: 13 May 2001 03:37:36 GMT

In comp.os.linux.development.system Derek Viljoen <[EMAIL PROTECTED]> wrote:
| Dean Wakerley wrote:
|
|> Whats the standard way in C of enforcing mutual exclusion on a section of
|> code? I'm thinking of semaphores and the equivalent of java's synchronised
|> keyword, but can't find any info.
|
| It seems to me like you're asking a very simple question, and everyone 
| just wants to split hairs about the way you asked it.

The OP crossposted too many groups, there are going to be different
kinds of answers originating from the various groups.  One of them
is where questions of standards are asked, and so it would be right
for followup posters to assume he meant what he said since that is
what is appropriate there; those answers were correct in that context.

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

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

From: E-mu <[EMAIL PROTECTED]>
Subject: Re: Anyone working with IEEE1394 for laptops. CarBus Cards?  cvs
Date: Sun, 13 May 2001 02:14:24 -0500

Cameron Kerr wrote:

> Wouldn't you get a better answer from thier sourceforge newsgroup?
>
> --
> Cameron Kerr -- cameron.kerr @ paradise.net.nz
> Praise Slackware, our baud and saviour!
> --

Actually I tried searching there discussion groups at sourceforge.
Funny thing, I could not find one post on the IEEE1394 cvs project.

I may have to subscribe to their mailing lists.  As youy knwo mailing
lists are very cluttering and take up a lot a space on your hard drive.
Unless I just get a Web based email and use that.

Thanks Anyhow


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

From: "Bluesky" <[EMAIL PROTECTED]>
Subject: Re: 2.4.4 Kernel, Something Seriously Wrong.  David Hinds can you read in 
please to!
Date: Sun, 13 May 2001 17:24:35 +0900


"E-mu" <[EMAIL PROTECTED]> wrote in message
news:9dev5s$[EMAIL PROTECTED]...
> I didn't know 2.4.4 was 2.4.2-2. Ithink that is incorrect because RH 7.1
was
> released with 2.4.2-2 way before 2.4.4 was out.
>

To be honest, I just begin learning to use Linux in about a month, and
have no knowledge about which kernel in which version.

Therefore, when I said I found the old version is still in my pc, it may be
because I may not recompile the kernel correctly, although I checked and
reread books, documents online, and recompiled about 25 times with either
the same order or slightly changed order of the commands.  But I never
get the report of new kernel 2.4.4 once.

Now I temporarily use what I have.

My usb MO still does not work, but I can use hard disk to exchange files
with other pc.  Will work on it when I ahve time later.


Thanks for your info.

SN

---



>
> I don't have any problems with my Zip USB, nor my Sony Camera memory
stick.
> That all works fine for me.
>
>
> I got 2.4.4 to run ok as long as my APA1480 Slim Scsi Adaptec card bus
card
> is not installed.  Dunno whats wrong with PCMCIA card bus, but I htink the
> 1480 driver was either left out this time or is not working properly.
>
>
> And I got lilo -v to work but mkinitrd still hangs but I was able to
figure
> out how to kill it.
>
> Here is the real problem, when I run mkinitrd followed by lilo -v, then
the
> system hangs and I cannot kill lilo, no matter what.  System then has to
be
> power'd down at that point!
>
>
> "SilentNight" <[EMAIL PROTECTED]> wrote in message
> news:9deq9b$m1p$[EMAIL PROTECTED]...
> > well, i begin to doubt if the kernel 2.4.4 is what it is named.
> >
> > After compiling and recompiling about 20 times on 3 different hard
disks,
> 2
> > different
> > motherboards, and 2 different language version (Japanese and English),
the
> > check shows
> > that the kernel is still 2.4.2-2.
> >
> > Also, the USB support is not working with devices other than mouse. I do
> not
> > try
> > keyboard so I cannot say.
> >
> > SN
> >
> > ---
> >
> > "E-mu" <[EMAIL PROTECTED]> wrote in message
> > news:9dci43$[EMAIL PROTECTED]...
> > > I know its the kernel, because I configured it exactly like 2.4.2.
> > >
> > > It compiles fine, but when I run lilo -v it hangs when it writes to
the
> > boot
> > > sector, or if I run mkinitrd it hangs.
> > >
> > > Another problem, my adaptec 1480 slim SCSI bombs out when the kernel
> boots
> > > up.  I noticed they removed adaptec 1480 from the section,
SCSI>PCMCIA.
> > >
> > > Is it because it no longer is a seperate choice, but rather the
drivers
> > are
> > > now part of the PCMCIA (y) choice?
> > >
> > > Either way my slim scsi aha1480 bombs out.  Kernel won't go through a
> > > successfull boot with the SCSI card bus card installed.
> > >
> > > I could not catch the error messages on boot up, but there are also
> > looping
> > > error messages to that do not stop, then a get a stack dump at the
end.
> > >
> > >
> > > RH Linux 7.1 Up to date patches
> > > ximian's gnome 1.4-all up to date patches
> > > kernel 2.4.2-2, monolithic, except for AHA 1480 which only had a
choice
> of
> > > (m) in kernel.
> > > Dell Inpiron 7500
> > >
> > >
> >
>
>


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

From: "Bluesky" <[EMAIL PROTECTED]>
Subject: Re: 2.4.4 Kernel, Something Seriously Wrong. David Hinds can you read in 
please to!
Date: Sun, 13 May 2001 17:25:58 +0900


"Wayne Osborn" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> In article <9deq9b$m1p$[EMAIL PROTECTED]>, "SilentNight"
> <[EMAIL PROTECTED]> wrote:
>
> > well, i begin to doubt if the kernel 2.4.4 is what it is named.
> >
> > After compiling and recompiling about 20 times on 3 different hard
> > disks, 2 different
> > motherboards, and 2 different language version (Japanese and English),
> > the check shows
> > that the kernel is still 2.4.2-2.
>
> Is your Makefile really a 2.4.4 makefile ? Check the VERSION, PATCHLEVEL
> and SUBLEVEL variables.
>
> --
>   Wayne A. Osborn, SCADA Engineer.[dnar AT iinet DOT net DOT au]
>   Registered Linux User #212818.  [2.2.16-22-Win4Lin-686] [i686]
>   5:30pm  up 18:09,  1 user,  load average: 1.44, 1.25, 1.25
>   ...Real programs don't eat cache.


Thank you Wayne,  I will check it soon.

Can I change your "motto" into: ... real programmer eats lots of cake

Cheers,

SN





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

From: Wil Taphoorn <[EMAIL PROTECTED]>
Subject: put_user in 2.2.6
Date: Sun, 13 May 2001 11:03:21 +0100

Hi all,

In 2.2.6, uaccess.h calls __put_user_X (the default case tag in
put_user() macro) but arch/i386/lib/putuser.S only defines
functions __put_user_1, _2 and _4.

I found some discussion on this item but did't find a solution
to the problem.

Where can I find info on this?

Cheers,
Wil.

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

From: "Wayne Osborn" <[EMAIL PROTECTED]>
Subject: Re: 2.4.4 Kernel, Something Seriously Wrong. David Hinds can you read in 
please to!
Date: Sun, 13 May 2001 19:26:00 +0800

In article <9dlgj3$9q6$[EMAIL PROTECTED]>, "Bluesky"
<[EMAIL PROTECTED]> wrote:

> "Wayne Osborn" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
>> In article <9deq9b$m1p$[EMAIL PROTECTED]>, "SilentNight"
>> <[EMAIL PROTECTED]> wrote:
>>
>> > well, i begin to doubt if the kernel 2.4.4 is what it is named.
>> >
>> > After compiling and recompiling about 20 times on 3 different hard
>> > disks, 2 different
>> > motherboards, and 2 different language version (Japanese and
>> > English), the check shows
>> > that the kernel is still 2.4.2-2.
>>
>> Is your Makefile really a 2.4.4 makefile ? Check the VERSION,
>> PATCHLEVEL and SUBLEVEL variables.
>>
>> --
>>   Wayne A. Osborn, SCADA Engineer.[dnar AT iinet DOT net DOT au]
>>   Registered Linux User #212818.  [2.2.16-22-Win4Lin-686] [i686] 5:30pm
>>    up 18:09,  1 user,  load average: 1.44, 1.25, 1.25 ...Real programs
>>   don't eat cache.
> 
> 
> Thank you Wayne,  I will check it soon.
> 
> Can I change your "motto" into: ... real programmer eats lots of cake

Feel free, I have a cron task that changes my motto for me anyway :-)

> 
> Cheers,
> 
> SN
> 


-- 
  Wayne A. Osborn, SCADA Engineer.[dnar AT iinet DOT net DOT au]
  Registered Linux User #212818.  [2.2.16-22-Win4Lin-686] [i686]
  7:20pm  up 22:41,  2 users,  load average: 1.02, 1.03, 1.00
  ...There are new messages.

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

From: eric <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: command line interpreter
Date: Sun, 13 May 2001 07:52:44 -0500

"Karim A." wrote:

> Hi all,
>
> I need for my project to write a command line interpreter for linux
> platform.
> I've not a lot of time to write it.
> Has someone already developped such a tool.
> Where can I found doc about it ?
>
> Thanks,
>
> Karim

gnu software  readline  package.  Full command line intrepreter, with
history and everything ( I believe that tcsh and bash use it ).

Eric



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

From: "Nicolas Alt" <[EMAIL PROTECTED]>
Subject: lilo boot proplem
Date: Sun, 13 May 2001 14:55:14 +0200

Hello!

I'm using lilo 20 in that config.:
hda1: os/2 (fat) (on 1.5 gb hd)
hda2: lilo
hdb1: win98 (on 40 gb hd)
For windows, lilo swaps the 2 hard disks.
I tried to use the partition - set commands in lilo to hide the os/2
partition from win98, but as soon as a I boot win98 from lilo, it says
nothing and hangs up. lilo says "Loading 1" before. If I comment out the
partition-set commands in lilo.conf, win98 boots without any problems. It
even doesn't care wether hda1 has a fat abel or not.
Can anyone help me?

greetings






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

From: eric <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development,comp.unix.programmer
Subject: Re: Directory Protector
Date: Sun, 13 May 2001 08:02:22 -0500

Aminudin Khalid wrote:

> Hi ,
>
> I am trying to figure out on how to protect directory under Linux/Unix
> environment. Let say we have a dedicated directory and we want to
> protect that directory with smart card or other authentication devices.
> How can I detect if there is an access to that directory ? How can I
> implement this  functionality in programming ? Is it kernel level
> programming or just application programming ?
>
> Any idea is apreciated . Thanks.

Under linux I would have to say the best place to implement this is in the
kernel.  It gives you a straight forward way to restrict access to the
directory that is harder than typical to circumnavigate.   There are
several patches out there already that do similar things (medusa,
grsecurity, ...) and would give you an idea of where the patch needs to
go.  I would also encrypt the data directly or consider using something
like stegFS (though I don't believe this is available for 2.4.x kernels
yet), so that your data has some protection even if the attacker boots
another kernel (or runs without your userspace program if you go that
route)

Hope this helped,

Eric
MVP for Unix Programming
BrainBench http://www.brainbench.com



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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Crypto File System
Date: Sun, 13 May 2001 15:41:36 +0200

[EMAIL PROTECTED] wrote:
> 
> On Sat, 12 May 2001 17:44:52 +0800 Aminudin Khalid <[EMAIL PROTECTED]> wrote:
> 
> | Is there any Linux Secure /Crypto File System that I can use for testing
> 
> How about a crypto block device which you can format and mount
> any filesystem type with?
> 

The loopback device can do that.

-- 
Kasper Dupont

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: put_user in 2.2.6
Date: Sun, 13 May 2001 15:48:39 +0200

Wil Taphoorn wrote:
> 
> Hi all,
> 
> In 2.2.6, uaccess.h calls __put_user_X (the default case tag in
> put_user() macro) but arch/i386/lib/putuser.S only defines
> functions __put_user_1, _2 and _4.
> 
> I found some discussion on this item but did't find a solution
> to the problem.
> 
> Where can I find info on this?
> 
> Cheers,
> Wil.

The put_user() macro is only supposed to be called
with arguments of size 1, 2 or 4. As long as this
is the case the compiler will optimize away all
references to __put_user_X. The default case is
there to detect attempts to use put_user() with an
unsupported size. There is also functions to copy
data of any size to/from user space.

-- 
Kasper Dupont

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

From: [EMAIL PROTECTED] (Nick Andrew)
Subject: Re: Guid generator for unix.
Date: 14 May 2001 01:23:53 +1000

Steve Connet <[EMAIL PROTECTED]> writes:

>[EMAIL PROTECTED] (Nick Andrew) writes:

>>  ... merely reduces the chance of collision, and does not eliminate it.
>> I thought GUIDs were supposed to be nominally globally unique, not just
>> show low chance of collision.
>> 
>> I'd suggest adding to the 8 random bytes, the FQDN of the local host
>> and return values from time() and getpid().

>The way Microsoft creates GUIDs (if the box has a NIC), is it obtains
>the MAC address and the current system time and munges those into a
>128-bit universally unique identifier. It is gauranteed to not be
>duplicated anywhere in the universe, forever and ever.

Until Mr "Random Number GUID generator" starts pumping out totally random
GUIDs, that is!

Nick.
-- 
Do not send me email copies of postings. Keep it in USENET please.

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

From: [EMAIL PROTECTED] (Nick Andrew)
Subject: Re: Guid generator for unix.
Date: 14 May 2001 01:33:15 +1000

Chronos Tachyon <[EMAIL PROTECTED]> writes:

>Good point, I didn't think about that until after I posted.  I would 
>probably throw a "/sbin/ifconfig | grep HWaddr | md5sum" somewhere in there 
>in addition to time().

MAC addresses are supposed to be unique, however I have heard stories
about companies releasing cards with duplicate MACs, either accidentally
or due to them being cheap rip-offs.

So in summary,

- completely random is bad; there must be certain non-random elements
- MAC address and/or FQDN are useful
- time() and getpid() help to randomise the result and reduce chance of
collision when somebody has done the wrong thing.

Nick.
-- 
Do not send me email copies of postings. Keep it in USENET please.

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

From: "Neil Butterworth" <[EMAIL PROTECTED]>
Subject: Re: Checking if a pointer is valid
Date: Sun, 13 May 2001 16:03:32 +0100

"Steve Connet" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Nix <$}xinix{[email protected]> writes:
>
> > ... which bears no resemblance to what was asked about, which was
> > how to determine if a *pre-existing* pointer was valid (presumably
> > for the best of reasons, i.e. paranoia :) ).
>
> Oh... well that's why everyone should set the pointer to 0 after they
> free it. That way the rest of the world will know right away if the
> pointer is valid.

Unfortunately, that doesn't work either:

char * p = new char[100];
char * p2 = p;
...
delete p2;
p2 = 0;
...

p will be non-null. Basically, you can't do this (at least portably) without
using smart reference counted pointers.

NeilB

PS This is a FAQ in all C and C++ ngs.








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


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