Linux-Development-Sys Digest #589, Volume #8     Mon, 26 Mar 01 01:13:21 EST

Contents:
  Re: wipeinfo, secure delete, device driver (Paul Repacholi)
  Re: aic7xxx is broken in Slackware 7.1 ([EMAIL PROTECTED])
  Re: wipeinfo, secure delete, device driver (Alexander Viro)
  Re: wipeinfo, secure delete, device driver (Erik de Castro Lopo)
  Kernel Makefile and GNU make ("BAIHAO YUAN")
  Kernel Makefile and GNU make ("BAIHAO YUAN")
  A couple of newbie questions ("Rich")
  Hi, thought you might like this (Tom Leete)
  Re: Hi, thought you might like this (Tom Leete)
  Re: wipeinfo, secure delete, device driver ("Kevin B. Haywood")
  opening ethernet as a raw device ([EMAIL PROTECTED])
  /etc/init.d/function:daemon() (Byron Young)
  i am  confusing about write.s? ("Leo Naboro")
  dev_get() - what is the proper way to use? ("Rich")
  Re: wipeinfo, secure delete, device driver (Alexander Viro)
  Re: what is the meaning of ".global" in AT&T ASSEMBLY? ("hushui")
  gprof and linux pthread ("^!^ Ka Fai")
  do {.....} while(0); in macro definitions (Kiran)
  Re: Why cannot poste a new posts? I can just reply. ("Arthur H. Gold")

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

Subject: Re: wipeinfo, secure delete, device driver
From: Paul Repacholi <[EMAIL PROTECTED]>
Date: 26 Mar 2001 00:50:48 +0800

[EMAIL PROTECTED] (Alexander Viro) writes:

> In article <[EMAIL PROTECTED]>,
> Kevin B. Haywood <[EMAIL PROTECTED]> wrote:

> > When working for a government agency in computer maintenance,
> >special procedures are required for deleting sensative data from
> >the hard drive. In a classified environment, the hard drive must be
> >written with all ones, then all zeros, then all ones. It is
> >suggested to repeat the procedure three times. This "secure delete"
> >procedure was implemented in DOS by Norton utilities "wipeinfo"
> >command. Is there a Linux version of this command?  I have used the
> >/dev/zero device to write 0's to the disc, and thought there should
> >be a /dev/ones device to write all one's.

> No need for new devices.

It's for old one. Read the post.

Talk to the COMSEC officer for the site. He will have to sign it off,
and a simple over writing with zero is not enough for most
clasifications. You will need to use several patterns, several times.
The COMSEC officer is god. He is the one who enforces the rules and
can tell you what needs to be done, and the audit trail you need to
keep to prove it has been done.

-- 
Paul Repacholi                               1 Crescent Rd.,
+61 (08) 9257-1001                           Kalamunda.
                                             West Australia 6076
Raw, Cooked or Well-done, it's all half baked.

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

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.setup
Subject: Re: aic7xxx is broken in Slackware 7.1
Date: Sun, 25 Mar 2001 17:15:02 -0000

In comp.os.linux.development.system Mike Ruskai 
<[EMAIL PROTECTED]> wrote:

| The aic7xxx driver shipped with Slackware 7.1 (object file dated 6-20-2000
| -  153,576 bytes) is broken, at least for the Adaptec 2842VL.
|
| It dies with a BRKADRINT error after showing the first attached device.
|
| The driver shipped with Slackware 7.0 (dated 10-21-1999 - 126,964 bytes)
| works fine.
|
| Anyone know where updates to this driver are available?

I'm running Slackware 7.1 but with my own compiled kernel built from
the source code.  I was originally running 2.2.14 through 2.2.16
before I switched over to 2.4.0 and my aic7xxx was working fine in
all these versions.  However, I was not using the 2842VL so I cannot
say what your results will be.

The drivers are in the kernel.  A distribution just packages them up
in its own way, usually as modules.  If you want the latest drivers
then get them from the latest kernel.  Sometimes backversions work
better for some special cases.  If the kernel drivers don't work and
the vendor doesn't provide their own for you, then it's time to look
around for substitute hardware.  But I believe Adaptec hardware is
well supported in Linux, at least for hardware that has been out for
a few months.

I always recompile my own kernel (and with exactly the drivers I need
built in) from source.  I also do the same for the major services I
run on my servers (apache, bind, openssh, postfix).  That way I know
I can go tweak things if I ever need to, and know that when I decide
to do so I will be getting everything I didn't tweak exactly the same
as I have been running all along.  This can be especially helpful from
a security point of view since it gives me an additional option in the
event a package is discovered to be exploitable: I might be able to
figure out my own fix, or at least temporarily obscure the hole so the
current exploit scripts don't work.

Compiling from source is a skill worth learning.  And it doesn't take
as much personal time if you build scripts that do it all for you.

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

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

From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: wipeinfo, secure delete, device driver
Date: 25 Mar 2001 12:39:31 -0500

In article <[EMAIL PROTECTED]>,
Paul Repacholi  <[EMAIL PROTECTED]> wrote:
>> >be a /dev/ones device to write all one's.
>
>> No need for new devices.
>
>It's for old one. Read the post.

What part of "| tr '\0' '\377'" is too hard to understand?

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

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

From: Erik de Castro Lopo <[EMAIL PROTECTED]>
Subject: Re: wipeinfo, secure delete, device driver
Date: Sun, 25 Mar 2001 20:24:02 GMT

Kevin B. Haywood wrote:
> 
>  When working for a government agency in computer maintenance,
> special procedures are required for deleting sensative data from
> the hard drive. In a classified environment, the hard drive must
> be written with all ones, then all zeros, then all ones. It is
> suggested to repeat the procedure three times. This "secure delete"
> procedure was implemented in DOS by Norton utilities "wipeinfo"
> command. Is there a Linux version of this command?
>  I have used the /dev/zero device to write 0's to the disc, and
> thought there should be a /dev/ones device to write all one's.

I seem to remember hearing that writing constant values was not 
sufficient. A better method was to write randoma values to the 
disk a number times.

There is a linux program which does this for files or for whole
disk partitions. Look for wipefile on http://freshmeat.net/ .

Erik
-- 
=================================================================
Erik de Castro Lopo     [EMAIL PROTECTED]      (Yes its valid)
=================================================================
Beware the Lollipop of Mediocrity.
Lick it once, and you suck forever.

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

From: [EMAIL PROTECTED] ("BAIHAO YUAN")
Subject: Kernel Makefile and GNU make
Date: Sun, 25 Mar 2001 21:05:42 +0000 (UTC)

Hi,

I got a question when I read the Makefile for the kernel.

If I wanna build a kernel using bzImage format, I issue the command
"make bzImage".

The target bzImage is found because there is a directive "include 
arch/$(ARCH)/Makefile" in the Makefile in the "root" directory(where I issue
the "make bzImage" command).

bzImage: vmlinux
        @$(MAKEBOOT) bzImage

At this point, I am a little bit confused. the prerequisite for the
target is vmlinux, which occurs in two places. One is the Makefile
located in the "root" directory, it looks like this:

vmlinux: $(CONFIGURATION) init/main.o init/version.o linuxsubdirs
        $(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o \
                --start-group \
                $(CORE_FILES) \
                $(FILESYSTEMS) \
                $(NETWORKS) \
                $(DRIVERS) \
                $(LIBS) \
                --end-group \
                -o vmlinux
        $(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aU] 
\)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map

the other is the Makefile in the arch/i386/Makefile, it looks like this:

vmlinux: arch/i386/vmlinux.lds

arch/i386/vmlinux.lds: arch/i386/vmlinux.lds.S FORCE
        gcc -E -C -P -I$(HPATH) -imacros $(HPATH)/asm-i386/page_offset.h -Ui386 
arch/i386/vmlinux.lds.S >arch/i386/vmlinux.lds

So which vmlinux is the prerequisite for the bzImage?

According to the compiling messages, I can tell it is the "root" Makefile's 
vmlinux.
But I am wondering why? How the GNU make handles this case?

Baihao

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


-- 
Posted from [32.102.4.135] by way of f32.law11.hotmail.com [64.4.17.32] 
via Mailgate.ORG Server - http://www.Mailgate.ORG

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

From: [EMAIL PROTECTED] ("BAIHAO YUAN")
Subject: Kernel Makefile and GNU make
Date: Sun, 25 Mar 2001 21:11:15 +0000 (UTC)

Hi,

I got a question when I read the Makefile for the kernel.

If I wanna build a kernel using bzImage format, I issue the command
"make bzImage".

The target bzImage is found because there is a directive "include 
arch/$(ARCH)/Makefile" in the Makefile in the "root" directory(where I issue
the "make bzImage" command).

bzImage: vmlinux
        @$(MAKEBOOT) bzImage

At this point, I am a little bit confused. the prerequisite for the
target is vmlinux, which occurs in two places. One is the Makefile
located in the "root" directory, it looks like this:

vmlinux: $(CONFIGURATION) init/main.o init/version.o linuxsubdirs
        $(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o \
                --start-group \
                $(CORE_FILES) \
                $(FILESYSTEMS) \
                $(NETWORKS) \
                $(DRIVERS) \
                $(LIBS) \
                --end-group \
                -o vmlinux
        $(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aU] 
\)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map

the other is the Makefile in the arch/i386/Makefile, it looks like this:

vmlinux: arch/i386/vmlinux.lds

arch/i386/vmlinux.lds: arch/i386/vmlinux.lds.S FORCE
        gcc -E -C -P -I$(HPATH) -imacros $(HPATH)/asm-i386/page_offset.h -Ui386 
arch/i386/vmlinux.lds.S >arch/i386/vmlinux.lds

So which vmlinux is the prerequisite for the bzImage?

According to the compiling messages, I can tell it is the "root" Makefile's 
vmlinux.
But I am wondering why? How the GNU make handles this case?

The version I am using is 2-2-12-20 distributed by RedHat.

Thanks a lot!

Baihao

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


-- 
Posted from [32.102.4.135] by way of f224.law11.hotmail.com [64.4.17.224] 
via Mailgate.ORG Server - http://www.Mailgate.ORG

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

From: "Rich" <[EMAIL PROTECTED]>
Subject: A couple of newbie questions
Date: Sun, 25 Mar 2001 21:22:04 GMT

Hi all,

I'm a bit of a newbie when it comes to kernel programming.  Currently I'm
writing a module as a sort of learning experience.

One question I've come upon is this: what is the difference between say a
variable of type u32 and a variable of type __u32?

I noticed some of the types have these underscores infront of them.  If I
had say:

__u32 underscore = /* some appropriate value */;
u32 num;

num = underscore;

would this create problems? Or are the types compatible?

Thanks in advance!

Rich.

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

Date: Sun, 25 Mar 2001 18:57:12 -0500
From: Tom Leete <[EMAIL PROTECTED]>
Subject: Hi, thought you might like this

Hi ralfdog
was bumbling about and spotted this. LaTeX -- you get beautiful reslts
printing to postscript with that stuff
http/www.sourceforge.net/projects/he2
--Tom

-- 
The Daemons lurk and are dumb. -- Emerson

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

Date: Sun, 25 Mar 2001 19:00:14 -0500
From: Tom Leete <[EMAIL PROTECTED]>
Subject: Re: Hi, thought you might like this

My apologies, misaddressed -- Tom

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

From: "Kevin B. Haywood" <[EMAIL PROTECTED]>
Subject: Re: wipeinfo, secure delete, device driver
Date: Sun, 25 Mar 2001 20:03:46 -0500

Alexander Viro wrote:

> What part of "| tr '\0' '\377'" is too hard to understand?
>

Very good. Thank you.  I was making the problem too difficult.
I use:
 dd if=/dev/zero of=/dev/hda  to write zero's
So my new command is:
dd if=dev/zero | tr \000 \ 377 | dd of=/dev/hda

right?

 Kevin




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

From: [EMAIL PROTECTED]
Subject: opening ethernet as a raw device
Date: Mon, 26 Mar 2001 01:04:02 -0000

Is there any way to open an ethernet as a raw device, not bridged?

My process should be able to write() outgoing frames, and receive
all frames addressed to this NIC, all broadcast frames, and if in
promiscuous mode, all frames period.  None should go anywhere else.

A serial port is easy since there is a /dev node device file to open.
But an ethernet doesn't have one of those, and I could not find any
major/minor numbers for it in the list.  The kernel source code does
not seem to give anything along this line.

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

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

Date: Sun, 25 Mar 2001 17:42:34 -0800
From: Byron Young <[EMAIL PROTECTED]>
Subject: /etc/init.d/function:daemon()

The RedHat script file /etc/init.d/functions contains function daemon(),
which starts daemons. All the supplied start up scripts start services
that have a command line option to place them in daemon mode. SMBD for
example has the -D option. Some services that should be started as
daemons have no command line option to place them in daemon mode. These
services must use & (background) on the command line. What is the best
way, when invoking daemon(), to start one of these programs?

thanks,
[EMAIL PROTECTED]

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

From: "Leo Naboro" <[EMAIL PROTECTED]>
Subject: i am  confusing about write.s?
Date: Mon, 26 Mar 2001 11:00:42 +0800

Hi,I am a beginner of linux assemble.i see a sample for
http://www.linuxassembly.org/linasm-src.html#write
and have a confuse in it.
/* write.s */
.data
hello:
 .string "hello world\n"
.text
.globl _start
_start:
 movl $SYS_write,%eax // SYS_write = 4
 movl $STDOUT,%ebx // fd = fileno(stdio)
 movl $hello,%ecx // buf = str
=======================================
 movl $12,%edx // count = 0x6
=======================================
 int $0x80

 movl $SYS_exit,%eax
 xorl %ebx,%ebx
 int $0x80
 ret

why "$12=0x6"?  i think it should be thus "$12=0xc",$12 ,does it? but the
length is 6 of "hello",so it should  "movl $6,%edx".
Thanks!






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

From: "Rich" <[EMAIL PROTECTED]>
Subject: dev_get() - what is the proper way to use?
Date: Mon, 26 Mar 2001 03:28:50 GMT

Hi all,

I'm writing a kernel module and I'm having trouble using the dev_get()
function.  My system crashes whenever the following code is executed:

int start_up(void) {

        struct device *tst_dev = NULL;

        struct in_device *ext_dev;

        tst_dev = (struct device*)kmalloc(sizeof(struct device), GFP_KERNEL);
        ext_dev = (struct in_device*)kmalloc(sizeof(struct in_device), GFP_KERNEL);


        if((tst_dev = dev_get("eth0")) != NULL) {
        
                ext_dev = tst_dev->ip_ptr;
        }

        else {
                print_string(out_tty, "Returned NULL\n");       
                return(1);
        }
                
        kfree(tst_dev);
        return(0);
}  /* end start_up() */


I know from playing around with it that the line that is in face causing
the problem is the line that calls dev_get(). But I can't figure out
*why* its causing the problem.

Is there something I'm overlooking here??

Thanks for any help!

Rich.

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

From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: wipeinfo, secure delete, device driver
Date: 25 Mar 2001 22:30:58 -0500

In article <[EMAIL PROTECTED]>,
Kevin B. Haywood <[EMAIL PROTECTED]> wrote:
>Alexander Viro wrote:
>
>> What part of "| tr '\0' '\377'" is too hard to understand?
>>
>
>Very good. Thank you.  I was making the problem too difficult.
>I use:
> dd if=/dev/zero of=/dev/hda  to write zero's
>So my new command is:
>dd if=dev/zero | tr \000 \ 377 | dd of=/dev/hda

tr '\0' '\377' - quotes are needed here (backslash is interpreted by
tr)

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

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

From: "hushui" <[EMAIL PROTECTED]>
Subject: Re: what is the meaning of ".global" in AT&T ASSEMBLY?
Date: Mon, 26 Mar 2001 11:51:55 +0800

thank you very much .
Another question??
can gcc assemblye the .S file that is written in at&t Asm???
Which command ??
 > .  is the flag for AT&T assembler pseudoinstructions.
> Otherwise, the instructions have different mneumonics
> and syntax than Intel ASM:  For example:
>    mov  eax, [array+ebp+ecx*4]     Intel syntax is
>    movl array(%ebp,%ecx,4), %eax   AT&T syntax.
>
> > Can somebody give me some informantion???
>
> Sure.  Have a look at http://www.linuxassembly.org
>
> > In AT&t asm ,there is no data segment or code segment
> > declaration ??  Which take their places???
>
> There are segments, usually:  .text  for code, .data  for
> initialized data, and  .bss  for uninitialized data.  A
> typical program  hello.s  looks like this [untested]:
>
>
> .text
> .global _main
> .extrn  printf
> _main:
> pushl  $fmt
> call   printf
>         addl   $4, %esp
>         ret
> .data
> fmt: .asciz "Hello, World!"
>
>
> -- Robert  "You have to play the hand you are dealt in Silicon"



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

From: "^!^ Ka Fai" <[EMAIL PROTECTED]>
Subject: gprof and linux pthread
Date: Mon, 26 Mar 2001 12:47:44 +0800

When I try to start a thread in linux, gprof reports this error:

gprof: gmon.out file is missing call-graph data

Does gprof support multi-thread program?

^!^ Ka Fai



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

From: Kiran <[EMAIL PROTECTED]>
Subject: do {.....} while(0); in macro definitions
Date: Mon, 26 Mar 2001 11:26:23 +0530


Hi,
Why do macros coded in the linux kernel usually expand to:
do {......} while(0); 
form?? why not just :
{.....} ??

For eg., quoting a code snippet from spinlock.h,
#define spin_lock_irqsave(lock, flags)         do { local_irq_save(flags);\ 
 spin_lock(lock); } while (0)   

could've been
#define spin_lock_irqsave(lock,flags) {local_irq_save(flags); \
spin_lock(lock); }

TIA
K

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

Date: Mon, 26 Mar 2001 00:02:52 -0600
From: "Arthur H. Gold" <[EMAIL PROTECTED]>
Subject: Re: Why cannot poste a new posts? I can just reply.

John Liu wrote:
> 
> I use Rogers@HOME
Ummm...than what is this I just read?
--ag
-- 
Artie Gold, Austin, TX  (finger the cs.utexas.edu account
for more info)
mailto:[EMAIL PROTECTED] or mailto:[EMAIL PROTECTED]
--
Clone Bernie!

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


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