Re: [vox-tech] Re: vox-tech digest, Vol 1 #577 - 11 msgs

2003-01-21 Thread Shawn P. Neugebauer
On Tuesday 21 January 2003 09:22 pm, Peter Jay Salzman wrote:
> begin Robin Snyder <[EMAIL PROTECTED]>
>
> > > > I came back from the Installfest very happy to finally have X running
> > > > (thanks, Mike!) but now have no internet connection.  I'm sure it's
> > > > something stupid, but I can't figure out what.
> > > >
> > > > My setup: I'm on a fixed IP address, using a DSL line.  I have two
> > > > ethernet cards.
> > > >
> > > > What I've checked so far: I'm pretty sure I'm plugged into the
> > > > correct ethernet card.  I know the DSL box works, because I can use
> > > > my housemate's computer to get to the net.  The ethernet cable should
> > > > be fine because it was working at the Installfest.  There's nothing
> > > > amiss that I can see in either dmesg or /var/log/syslog.  netstat -rn
> > > > gives me the correct IP address but Gateway is listed simply as
> > > > 0.0.0.0.  However, that strikes me more as symptom than cause.  What
> > > > other probes can I use to figure out what's gone wrong?
> > >
> > > hi robin,
> > >
> > > try:
> > >
> > >ping 66.218.71.198
>
> that's the IP address for yahoo.com.
>
> it appears that you don't have DNS for some reason...

to clarify, you need to get the IP address for a nameserver or two into
/etc/resolv.conf -- if your ethernet configuration was/is hard-coded you
can do this by directly modify the file; if you/someone used a fancy gui
tool to configure the interface you'll need to use that tool.  the required
contents of the file are simple, e.g., 
first line: "search somedomainname.net"
second line: "nameserver 1.2.3.4"
modified to reflect the specifics of your provider, of course.

shawn.
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] lame question on memory allocation

2003-01-21 Thread Jeff Newmiller
I think my comments here are mostly intended for Tim... I am piggybacking
off of Bill's comments because I am lazy.

On Tue, 21 Jan 2003, Bill Broadley wrote:

> First I'd like to mention that register size depends on exactly what
> registers your refering to.
> 
> Your average generic pentium 4 will have:
>   32 bit integer registers
>   80 bit floating point registers
>   64 bit (I think) MMX registers
>   128 bit (I think) registers.
> 
> AMD's coming out with a new cpu "RSN", that allows for all the registers
> to be >= 64 bits, and doubles the number of floating point, and integer
> registers.  The 128 bit quantity/register BTW is called a double quad-word
> I believe.

A "word" is by convention 16 bits on all x86 architectures... but by the
generic definition, a Pentium uses a 32 bit word, and on an Alpha it is
64 bits.

> Back to memory allocation, in general use what you need, try to ignore
> the page size whenever possible, even on x86's there are often more
> than 1 page size available, it's up to the OS which to use.
> 
> Don't forget that you never know when your crossing a page boundary,
> so while a char may trigger a new page just like a larger array, the
> odds are much higher for the larger array.
> 
> As far as optimization go:
> * Malloc is VERY expensive, avoid when possible, especially inside loops
> * Large malloc requests can increase performance if you efficiently track
>   the utilization, and make lots of regular small sized requests.  This
>   is often called "pooling"

To rephrase this statement: fixed-size allocation libraries are available,
and are generally much more time efficient than malloc.  Of course, they
are only useful if you need to allocate blocks of memory of a fixed size,
but you can have different "pools" of blocks with different sizes in
different pools.

> * Doing your own memory allocation library is tricky, it's very easy to
>   introduce subtle errors

An interesting exercise, but fortunately you should be able to find a
variety to use without the pain of developing from scratch.

> * Memory allocation in general is very tricky, double allocations, double
>   free's, or the dreaded memory leak are common side effects.

Isn't perl nice? Gotta love that garbage collection. ;)

> * Be very careful with array lengths, do not rely on null terminated strings
>   when possible, especially if the source of the string is a remote program,
>   service, user, etc.  Buffer overflows are the number 1 security problem.

That is, never trust input to always give you less than any particular
number of bytes... "gets()" is dangerous.

> * In general working with the largest useful unit leads to the highest 
>   performance.  I.e. copying a file 1024 double-words at a time is faster
>   then by character.  Of course you have to handle the case when the file
>   is not a multiple of 1024 double words long.
> * Be wary of trying to outguess the OS, memory hierarchies are complicated
>   and changing, it's an area of active research and sometimes changes even in
>   minor revisions to the kernel.
> 
> > I learned that a byte is 8 bits, no matter how many bits are available for
> > storage.
> > I also learned that the CPU stores both an integer and a byte in memory as a
> > word. Try
> > this test:
> > 
> > /* test1.c */
> > int main( int argc, char **argv )
> > {
> > static char c;
> > }
> > 
> > /* test2.c */
> > int main( int argc, char **argv )
> > {
> > static int c;
> > }
> > 
> > ls -l test1 test2 <-- the sizes are the same on my computer.
> 
> Umm, ls isn't exactly the tool for this kind of thing, if you don't use a
> variable the compiler could just not allocate it.

Assuming you compile with optimizations off, I would still not be
surprised to see these programs have the same size.  Uninitialized static
variables are not the same as initialized static variables... the compiler
typically stuffs the a number measuring the amount of memory to allocate
for uninitialized static variables into the executable file, and the
startup code that runs before main() allocates one big buffer for all of
the uninitialized static variables in the program and zeroes it out in a
loop.

Even if you made the variable initialized statics or globals, the block of
data stored in the executable image could very well be allocated in words
(16 or 32 or 64 bit), with the unused bytes in the "char" version being
ignored in the running program.

Following list is the typical memory initialization techniques used to 
comply minimally with ANSI C89, from my memory banks:

  classinitialization   mechanism
  auto uninitializedalter frame ptr, undefined data
  auto initialized  alter frame ptr, code copies
data every time function is called
  global   uninitializedmemory allocated on program load,
undefined data
  global   

Re: [vox-tech] Re: vox-tech digest, Vol 1 #577 - 11 msgs

2003-01-21 Thread Peter Jay Salzman
begin Robin Snyder <[EMAIL PROTECTED]> 
> > > I came back from the Installfest very happy to finally have X running
> > > (thanks, Mike!) but now have no internet connection.  I'm sure it's
> > > something stupid, but I can't figure out what.
> > >
> > > My setup: I'm on a fixed IP address, using a DSL line.  I have two
> > > ethernet cards.
> > >
> > > What I've checked so far: I'm pretty sure I'm plugged into the correct
> > > ethernet card.  I know the DSL box works, because I can use my housemate's
> > > computer to get to the net.  The ethernet cable should be fine because it
> > > was working at the Installfest.  There's nothing amiss that I can see in
> > > either dmesg or /var/log/syslog.  netstat -rn gives me the correct IP
> > > address but Gateway is listed simply as 0.0.0.0.  However, that strikes me
> > > more as symptom than cause.  What other probes can I use to figure out
> > > what's gone wrong?
> >
> > hi robin,
> >
> > try:
> >
> >ping 66.218.71.198
 
that's the IP address for yahoo.com.

it appears that you don't have DNS for some reason...

pete


> That works. (!) (What is that address for?  Is it something internal,
> somehow?)
> 
> > post output of:
> >
> >ifconfig
> 
> Can't post the output (no way to get the output to this computer), but
> the output looks normal: it gives the correct IP address, etc.
> Anything in particular I should look for?
> 
> > make sure this command doesn't "hang":
> >
> >route
> 
> It doesn't hang.  It does have a gateway entry for "default," although
> for destination 168.150.243.0, gateway just has a * ... but I think
> that IP is the gateway IP, so perhaps that's OK.
> 
> > Try running
> > /sbin/ifup eth0
> >
> > (assuming eth0 is your DSL ethernet card)
> 
> ifup assures me that interface eth0 is already configured.  However, I
> can't ping remote machines, or at least not machines on campus.
> 
>   - robin.
> 
> ___
> vox-tech mailing list
> [EMAIL PROTECTED]
> http://lists.lugod.org/mailman/listinfo/vox-tech

-- 
First they ignore you, then they laugh at you, then they fight you,
then you win. -- Gandhi, being prophetic about Linux.

Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



[vox-tech] Re: vox-tech digest, Vol 1 #577 - 11 msgs

2003-01-21 Thread Robin Snyder
> > I came back from the Installfest very happy to finally have X running
> > (thanks, Mike!) but now have no internet connection.  I'm sure it's
> > something stupid, but I can't figure out what.
> >
> > My setup: I'm on a fixed IP address, using a DSL line.  I have two
> > ethernet cards.
> >
> > What I've checked so far: I'm pretty sure I'm plugged into the correct
> > ethernet card.  I know the DSL box works, because I can use my housemate's
> > computer to get to the net.  The ethernet cable should be fine because it
> > was working at the Installfest.  There's nothing amiss that I can see in
> > either dmesg or /var/log/syslog.  netstat -rn gives me the correct IP
> > address but Gateway is listed simply as 0.0.0.0.  However, that strikes me
> > more as symptom than cause.  What other probes can I use to figure out
> > what's gone wrong?
>
> hi robin,
>
> try:
>
>ping 66.218.71.198

That works. (!) (What is that address for?  Is it something internal,
somehow?)

> post output of:
>
>ifconfig

Can't post the output (no way to get the output to this computer), but
the output looks normal: it gives the correct IP address, etc.
Anything in particular I should look for?

> make sure this command doesn't "hang":
>
>route

It doesn't hang.  It does have a gateway entry for "default," although
for destination 168.150.243.0, gateway just has a * ... but I think
that IP is the gateway IP, so perhaps that's OK.

> Try running
> /sbin/ifup eth0
>
> (assuming eth0 is your DSL ethernet card)

ifup assures me that interface eth0 is already configured.  However, I
can't ping remote machines, or at least not machines on campus.

- robin.

___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] Recovering Debian without /var/lib/dpkg...

2003-01-21 Thread Karsten M. Self
on Tue, Jan 21, 2003 at 07:54:00PM -0800, Peter Jay Salzman ([EMAIL PROTECTED]) wrote:
> begin Karsten M. Self <[EMAIL PROTECTED]> 
> > on Tue, Jan 21, 2003 at 11:30:28AM -0800, R. Douglas Barbieri ([EMAIL PROTECTED]) 
>wrote:
> > > Here is a good article about recovering a Debian system without having a
> > > backup of /var/lib/dpkg...
> > > 
> > > http://www.linuxworld.com/2003/0113.petreley.html
> > 
> > Funny, I walked someone through that on irc.debian.org:#debian last
> > week.  This can be somewhat simplified from Nick's procedure.  Rather
> > than manually re-selecting packages in dselect, you would take advantage
> > of the fact that Debian policy requires all packages to create an entry
> > in /usr/share/doc, with the name of the package.
> > 
> > Procedure (in handy shell-script format).  Note that I *haven't* tried
> > this (suggestion:  someone with a faster box than I should try
> > installing Debian under UML and self-inflicting damage, then recovering,
> > and telling me what I got wrong).
> 
> if anyone with a little time is curious enough, i'll lend you a 60GB
> hard drive to do the test, and if successful, demonstrate it as a short
> demo at an upcoming lugod meeting.

The disk is far less an issue for me than the bandwidth.

I'm content knowing that the procedure's now archived on the Net, I'll
post to d-u as well to see if we might get some feedack there.

Peaace.

-- 
Karsten M. Self <[EMAIL PROTECTED]>http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
   Geek for hire:  http://kmself.home.netcom.com/resume.html
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] Recovering Debian without /var/lib/dpkg...

2003-01-21 Thread Peter Jay Salzman
begin Karsten M. Self <[EMAIL PROTECTED]> 
> on Tue, Jan 21, 2003 at 11:30:28AM -0800, R. Douglas Barbieri ([EMAIL PROTECTED]) 
>wrote:
> > Here is a good article about recovering a Debian system without having a
> > backup of /var/lib/dpkg...
> > 
> > http://www.linuxworld.com/2003/0113.petreley.html
> 
> Funny, I walked someone through that on irc.debian.org:#debian last
> week.  This can be somewhat simplified from Nick's procedure.  Rather
> than manually re-selecting packages in dselect, you would take advantage
> of the fact that Debian policy requires all packages to create an entry
> in /usr/share/doc, with the name of the package.
> 
> Procedure (in handy shell-script format).  Note that I *haven't* tried
> this (suggestion:  someone with a faster box than I should try
> installing Debian under UML and self-inflicting damage, then recovering,
> and telling me what I got wrong).

if anyone with a little time is curious enough, i'll lend you a 60GB
hard drive to do the test, and if successful, demonstrate it as a short
demo at an upcoming lugod meeting.

pete
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] Redhat-8.0.93 (phoebe-2) mini-review

2003-01-21 Thread Bill Broadley
On Tue, Jan 21, 2003 at 07:41:34PM -0800, Rod Roark wrote:
> That's good news; I was wondering how 845g support was
> progressing.  What X release does RH have in there?

[root@t01 root]# rpm -q XFree86
XFree86-4.2.99.3-20030115.0

-- 
Bill Broadley
Mathematics
UC Davis
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] lame question on memory allocation

2003-01-21 Thread Bill Broadley
First I'd like to mention that register size depends on exactly what
registers your refering to.

Your average generic pentium 4 will have:
32 bit integer registers
80 bit floating point registers
64 bit (I think) MMX registers
128 bit (I think) registers.

AMD's coming out with a new cpu "RSN", that allows for all the registers
to be >= 64 bits, and doubles the number of floating point, and integer
registers.  The 128 bit quantity/register BTW is called a double quad-word
I believe.

Back to memory allocation, in general use what you need, try to ignore
the page size whenever possible, even on x86's there are often more
than 1 page size available, it's up to the OS which to use.

Don't forget that you never know when your crossing a page boundary,
so while a char may trigger a new page just like a larger array, the
odds are much higher for the larger array.

As far as optimization go:
* Malloc is VERY expensive, avoid when possible, especially inside loops
* Large malloc requests can increase performance if you efficiently track
  the utilization, and make lots of regular small sized requests.  This
  is often called "pooling"
* Doing your own memory allocation library is tricky, it's very easy to
  introduce subtle errors
* Memory allocation in general is very tricky, double allocations, double
  free's, or the dreaded memory leak are common side effects.
* Be very careful with array lengths, do not rely on null terminated strings
  when possible, especially if the source of the string is a remote program,
  service, user, etc.  Buffer overflows are the number 1 security problem.
* In general working with the largest useful unit leads to the highest 
  performance.  I.e. copying a file 1024 double-words at a time is faster
  then by character.  Of course you have to handle the case when the file
  is not a multiple of 1024 double words long.
* Be wary of trying to outguess the OS, memory hierarchies are complicated
  and changing, it's an area of active research and sometimes changes even in
  minor revisions to the kernel.

> I learned that a byte is 8 bits, no matter how many bits are available for
> storage.
> I also learned that the CPU stores both an integer and a byte in memory as a
> word. Try
> this test:
> 
> /* test1.c */
> int main( int argc, char **argv )
> {
> static char c;
> }
> 
> /* test2.c */
> int main( int argc, char **argv )
> {
> static int c;
> }
> 
> ls -l test1 test2 <-- the sizes are the same on my computer.

Umm, ls isn't exactly the tool for this kind of thing, if you don't use a
variable the compiler could just not allocate it.

Often compilers allow tuning for the architecture which includes changing
the alignments of various datatypes for maximum performance.  These rules
have changed with the different levels of Pentiums, this is part of what
changes when you tell the compiler which specific cpu you are targeting.  The
code should work in all cases, but have maximum performance for the cpu
that is targeted.  The linux kernel I believe uses these kinds of things
as well.

Sometimes for instance it's worth 64 bit aligning something, sometimes it's
just a waste of memory.

> > A word is the natural unit of data that can be moved from memory to a
> > processor register. [1]
> 
> Right. The CPU moves words from memory to registers and back. It moves
> memory in chunks of words because that is how it addresses them.

Er, that kind implies that a 32 bit load sends 2 requests for 1 word each,
which is not true.  In actuality memory requests if they miss the cache
results in a cache line load, which is usually 64-128 bytes or so.

For maximum performance from cache or memory in general you reference
the bigggest useful chunk you can.  With integers it's 32 bit unless you
use MMX or SSE.

You might want to try say reading and writing a few arrays to and from
memory of different sizes with different datatypes, if your careful you
should see 2-3 plateau in performance where you can see the performance
of L1 cache, L2 cache, and main memory seperately.

> Is this for backward compatibility for 16 bit buses? My guess is that
> by now there's a "move a 32 bit word from memory to a register in
> one operation" x86 instruction.

There is.

> > It may be inefficient to move a "word" around that is not stored beginning
> > with the first addressable byte in the data bus.
> 
> Hardware is not my forte, but I don't see how this can even be possible,
> much less inefficient. What instruction addresses the middle of a word?

Well if you wanted say bits 9-25 (a word) typically you would load the 32
bits, and then and it with a bit mask to get the bits you want, then shift
it if you wish.


-- 
Bill Broadley
Mathematics
UC Davis
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] Recovering Debian without /var/lib/dpkg...

2003-01-21 Thread Karsten M. Self
on Tue, Jan 21, 2003 at 11:30:28AM -0800, R. Douglas Barbieri ([EMAIL PROTECTED]) wrote:
> Here is a good article about recovering a Debian system without having a
> backup of /var/lib/dpkg...
> 
> http://www.linuxworld.com/2003/0113.petreley.html

Funny, I walked someone through that on irc.debian.org:#debian last
week.  This can be somewhat simplified from Nick's procedure.  Rather
than manually re-selecting packages in dselect, you would take advantage
of the fact that Debian policy requires all packages to create an entry
in /usr/share/doc, with the name of the package.

Procedure (in handy shell-script format).  Note that I *haven't* tried
this (suggestion:  someone with a faster box than I should try
installing Debian under UML and self-inflicting damage, then recovering,
and telling me what I got wrong).

(Aside to Nick:  this expands somewhat on my prior email.)


#!/bin/sh
export PATH=/usr/sbin:/usr/bin:/sbin:/bin

# Let's be verbose
set -v

# Create /var directory tree stubs
mkdir /var/cache/apt/archives
mkdir /var/cache/debconf
mkdir /var/log
mkdir -p /var/lib/dpkg/{info,parts,alternatives,methods,updates}

# Create a rudimentary status file
cat <<-EOF>/var/lib/dpkg/status
Package: libc6
Status: install ok installed
Version: 2.3.1-9
EOF

# Update package cache
apt-get update
apt-get dist-upgrade

# Register as installed crucial packages.
dpkg --clear-avail
apt-get update
apt-get dist-upgrade
cd /var/cache/apt/archives
dpkg -i libncurses*
dpkg -i perl-base*
dpkg -i libstdc++*
dpkg -i dselect*
dpkg -i dpkg*

# Reinstall libc to register it.
apt-get install --reinstall libc6  
   
# Reinstall base packages.
apt-get dist-upgrade

# Generate list of installed packages to Re-register previously
# installed packages as installed, using /usr/share/doc as a
# fallback package registry.
dpkg --get-selections $(
ls /usr/share/doc | grep -v [A-Z] | awk '{print $1 " install"}'
)

# Re-register everything.
apt-get dist-upgrade


Peace.

-- 
Karsten M. Self <[EMAIL PROTECTED]>http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
   Geek for hire:  http://kmself.home.netcom.com/resume.html
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] Redhat-8.0.93 (phoebe-2) mini-review

2003-01-21 Thread Rod Roark
That's good news; I was wondering how 845g support was
progressing.  What X release does RH have in there?

-- 
Rod Roark, Sunset Systems http://www.sunsetsystems.com/
Offering preconfigured Linux computers, custom software and
remote system administration services.
Public Key: http://www.sunsetsystems.com/rodspublickey.asc

On Tuesday 21 January 2003 07:26 pm, Bill Broadley wrote:
> Figured some might be interested.  I'm working on a thin client (no disk
> drive) for a semi-public lab of 30 machines.
>
> We bought 30 thin clients (p4-2.0 Ghz/512 MB ram, no hard drive, on
> board graphics via i845g, DVI out).
>
> I was very pleasantly surprised to find quite a few improvements:
> 1. dvips is fixed (most tetex packages broke dvips -P after the last
>security update)
> 2. Anti-aliased as well as sub-pixel fonts work (the i845G lack of RENDER
>support caused a memory leak before)
> 3. 3D works, 60-70 fps at chromium, 840-950 ish fps at glxgears.
> 4. Mozilla comes with XFT enabled (anti-aliasing)
>
> Nothing too exciting, a nice set of improvements.

___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



[vox-tech] Redhat-8.0.93 (phoebe-2) mini-review

2003-01-21 Thread Bill Broadley
Figured some might be interested.  I'm working on a thin client (no disk
drive) for a semi-public lab of 30 machines.

We bought 30 thin clients (p4-2.0 Ghz/512 MB ram, no hard drive, on
board graphics via i845g, DVI out).

I was very pleasantly surprised to find quite a few improvements:
1. dvips is fixed (most tetex packages broke dvips -P after the last 
   security update)
2. Anti-aliased as well as sub-pixel fonts work (the i845G lack of RENDER
   support caused a memory leak before)
3. 3D works, 60-70 fps at chromium, 840-950 ish fps at glxgears.
4. Mozilla comes with XFT enabled (anti-aliasing)

Nothing too exciting, a nice set of improvements.

-- 
Bill Broadley
Mathematics
UC Davis
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] lame question on memory allocation

2003-01-21 Thread Tim Riley
Jeff,

This response is getting away from Pete's question; however,
I would like to understand memory management better.

Jeff Newmiller wrote:

> On Tue, 21 Jan 2003, Tim Riley wrote:
>
> >
> >
> > Peter Jay Salzman wrote:
> 

> > > for example, the man page says that malloc() may be required to return
> > > word aligned memory pages, so in the diagram:
> > >
> >
> > This implies that malloc() may return more memory than you request.
> > It might be that malloc( 1 ) gets you an entire page -- 4 or 8 K. However,
> > subsequent malloc( 1 )s will just fill in the existing page. When it fills
> > up you
> > get a new page.
> >
> > The gcc complier knows about page alignments and will allocate
> > memory requested on the stack effeciently. So, whenever I need
> > string space, I'll do: "char buffer[ 1024 ];" because I believe that
> > "char buffer[ 1000 ];" gets me 1024 anyway.
>
> a) malloc() affects heap memory, not stack memory.

This is true; however, both the heap and stack are paged. The
compiler probably aligns a stack of memory just like it aligns
a heap of memory. My example should have been "malloc( 1000 )"
vs. "malloc( 1024 )."

> 

> My point is that your "optimization" is rather implementation-specific...
> it can backfire if the code is ported, yielding less efficient use of
> memory by requiring two pages instead of one.  (If you don't mind some
> platform dependencies in your search for performance, this may be par for
> the course.)
>

This is a risk I hadn't considered.

>
> 

>
> > > what's a word?  :)
> > >
> >
> > A word is the minimum amount of addressable memory. So, if you
> > declare "char c;" on the stack of a 386, even though you plan on storing
> > only 8 bits, more bits are available. To figure out the word size, take
> > the log based 2 of the constant UINT_MAX + 1 (in limits.h) -- probably
> > it's 32.
>
> Actually, the minimum amount of addressable memory is more commonly
> referred to as a byte.  (Technically, the minimum amount of addressable
> memory _large enough to represent any printable character in the "C"
> locale_ is a byte... some architectures can address bits.)
>

I learned that a byte is 8 bits, no matter how many bits are available for
storage.
I also learned that the CPU stores both an integer and a byte in memory as a
word. Try
this test:

/* test1.c */
int main( int argc, char **argv )
{
static char c;
}

/* test2.c */
int main( int argc, char **argv )
{
static int c;
}

ls -l test1 test2 <-- the sizes are the same on my computer.

> A word is the natural unit of data that can be moved from memory to a
> processor register. [1]

Right. The CPU moves words from memory to registers and back. It moves
memory in chunks of words because that is how it addresses them.

>  Most modern processors have data paths composed
> of multiple bytes, and separate "enable" signals allow smaller units of
> data than a "word" to be read or written.  This definition differs from
> the x86 version, which is fixed by convention at 16 bits to support
> upward software compatibility for certain compilers and assemblers.
>

Is this for backward compatibility for 16 bit buses? My guess is that
by now there's a "move a 32 bit word from memory to a register in
one operation" x86 instruction.

>
> It may be inefficient to move a "word" around that is not stored beginning
> with the first addressable byte in the data bus.

Hardware is not my forte, but I don't see how this can even be possible,
much less inefficient. What instruction addresses the middle of a word?

>  Part of the word has to
> be read in one bus operation, and the rest in a second bus
> operation.

Does the data bus have to be smaller than a register for the CPU to have
to use two move operations? This probably doesn't happen any more.




___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] lame question on memory allocation

2003-01-21 Thread Jeff Newmiller
On Tue, 21 Jan 2003, Tim Riley wrote:

> 
> 
> Peter Jay Salzman wrote:
> 
> > you'd think by now i'd know stuff like this.  i'm embarrased to have to
> > ask this, but here it goes.
> 
> Don't be -- memory management is complicated and gets more so
> everytime they improve the hardware. As a result, the vocabulary
> can get esoteric.
> 
> >
> >
> > i'm reading the man page for electric fence, and i'm not fully
> > understanding the sections on EF_ALIGNMENT and "WORD-ALIGNMENT AND
> > OVERRUN DETECTION".   i feel like i "almost" understand them.
> >
> > i think i understand the concept of memory page as being the minimum
> > chunk of memory the kernel handles internally (8192 bytes minimum
> > allocation of memory on x86) and alignment, but i guess i don't know
> > what a word is.
> >
> 
> More specifically, a page is a chunk of memory that the operating system
> (or hardware) copies to disk (swap space) when you run out of memory -- aka
> "page fault." To optimize this process, memory is allocated by the page.
> 
> >
> > for example, the man page says that malloc() may be required to return
> > word aligned memory pages, so in the diagram:
> >
> 
> This implies that malloc() may return more memory than you request.
> It might be that malloc( 1 ) gets you an entire page -- 4 or 8 K. However,
> subsequent malloc( 1 )s will just fill in the existing page. When it fills
> up you
> get a new page.
> 
> The gcc complier knows about page alignments and will allocate
> memory requested on the stack effeciently. So, whenever I need
> string space, I'll do: "char buffer[ 1024 ];" because I believe that
> "char buffer[ 1000 ];" gets me 1024 anyway.

a) malloc() affects heap memory, not stack memory.

b) Don't forget that malloc() is a library call that uses data structures
to keep track of allocated memory.  Some implementations reserve
some memory for allocated memory, while others simply take over
freed memory and ignore allocated memory.  An implementation that keeps
track of allocated memory will allocate more than you ask for, and use teh
extra for its own uses.

My point is that your "optimization" is rather implementation-specific...
it can backfire if the code is ported, yielding less efficient use of
memory by requiring two pages instead of one.  (If you don't mind some
platform dependencies in your search for performance, this may be par for
the course.)

> 
> >
> >  1 page allocated by malloc()
> > x   
> > x+1 |  |
> > x+2 | 8192 |
> > | bytes on |
> > |   x86|
> > |  |
> > 
> >
> > i guess that places a restriction on what "x" is, but because i don't
> > know what a word is, i don't know what that restriction is.
> >
> > what's a word?  :)
> >
> 
> A word is the minimum amount of addressable memory. So, if you
> declare "char c;" on the stack of a 386, even though you plan on storing
> only 8 bits, more bits are available. To figure out the word size, take
> the log based 2 of the constant UINT_MAX + 1 (in limits.h) -- probably
> it's 32.

Actually, the minimum amount of addressable memory is more commonly
referred to as a byte.  (Technically, the minimum amount of addressable
memory _large enough to represent any printable character in the "C"
locale_ is a byte... some architectures can address bits.)

A word is the natural unit of data that can be moved from memory to a
processor register. [1]  Most modern processors have data paths composed
of multiple bytes, and separate "enable" signals allow smaller units of
data than a "word" to be read or written.  This definition differs from
the x86 version, which is fixed by convention at 16 bits to support
upward software compatibility for certain compilers and assemblers.

It may be inefficient to move a "word" around that is not stored beginning
with the first addressable byte in the data bus.  Part of the word has to
be read in one bus operation, and the rest in a second bus
operation.  This is strongly discouraged on some architectures, to the
point that they won't support such memory accesses directly, preferring
instead to raise an exception (interrupt).  Even if it is allowed, it
represents a performance hit that can be avoided if data is laid out
properly.

> 
> >
> > or does it mean that there's a restriction on *size* of the page and not
> > the starting point?
> >
> 
> The page size is set by the hardware, and the Linux kernel manages paging
> transparently. I'm surprised to hear about an application that is forcing
> you
> to make decisions about memory alignment.

It isn't forcing the issue... simply providing it as an option to aid in
identifying misaligned data accesses that could be a portability or
performance problem.


[1] http://WhatIs.techtarget.com/definition/0,,sid9_gci498438,00.html

---
Jeff NewmillerThe .   .  Go Live...
DCN

Re: [vox-tech] troubleshooting internet connection

2003-01-21 Thread Foo Lim
On Tue, 21 Jan 2003, Robin Snyder wrote:

> What I've checked so far: I'm pretty sure I'm plugged into the correct
> ethernet card.  I know the DSL box works, because I can use my housemate's
> computer to get to the net.  The ethernet cable should be fine because it
> was working at the Installfest.  There's nothing amiss that I can see in
> either dmesg or /var/log/syslog.  netstat -rn gives me the correct IP
> address but Gateway is listed simply as 0.0.0.0.  However, that strikes me
> more as symptom than cause.  What other probes can I use to figure out
> what's gone wrong?
> 
>   - robin.


Try running

/sbin/ifup eth0

(assuming eth0 is your DSL ethernet card)

then pinging another machine (local or non-local).

If that works, then you need to enable networking at boot time.  You can
enable networking in /etc/sysconfig/network:

NETWORKING=yes
HOSTNAME=mymachine.mynetwork.com
GATEWAY=192.168.1.1

and /etc/sysconfig/networking/devices/ifcfg-eth0  by adding the line

ONBOOT=yes

in the file.  This is in Redhat 8.0.  These settings may be in different 
files within different distros.  Also, instead of eth0, use the correct 
ethernet interface number for your setup.

FL

___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] troubleshooting internet connection

2003-01-21 Thread Peter Jay Salzman
begin Robin Snyder <[EMAIL PROTECTED]> 
> I came back from the Installfest very happy to finally have X running
> (thanks, Mike!) but now have no internet connection.  I'm sure it's
> something stupid, but I can't figure out what.
> 
> My setup: I'm on a fixed IP address, using a DSL line.  I have two
> ethernet cards.
> 
> What I've checked so far: I'm pretty sure I'm plugged into the correct
> ethernet card.  I know the DSL box works, because I can use my housemate's
> computer to get to the net.  The ethernet cable should be fine because it
> was working at the Installfest.  There's nothing amiss that I can see in
> either dmesg or /var/log/syslog.  netstat -rn gives me the correct IP
> address but Gateway is listed simply as 0.0.0.0.  However, that strikes me
> more as symptom than cause.  What other probes can I use to figure out
> what's gone wrong?

hi robin,

try:

   ping 66.218.71.198

post output of:

   ifconfig

make sure this command doesn't "hang":

   route

pete

-- 
First they ignore you, then they laugh at you, then they fight you,
then you win. -- Gandhi, being prophetic about Linux.

Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



[vox-tech] troubleshooting internet connection

2003-01-21 Thread Robin Snyder
I came back from the Installfest very happy to finally have X running
(thanks, Mike!) but now have no internet connection.  I'm sure it's
something stupid, but I can't figure out what.

My setup: I'm on a fixed IP address, using a DSL line.  I have two
ethernet cards.

What I've checked so far: I'm pretty sure I'm plugged into the correct
ethernet card.  I know the DSL box works, because I can use my housemate's
computer to get to the net.  The ethernet cable should be fine because it
was working at the Installfest.  There's nothing amiss that I can see in
either dmesg or /var/log/syslog.  netstat -rn gives me the correct IP
address but Gateway is listed simply as 0.0.0.0.  However, that strikes me
more as symptom than cause.  What other probes can I use to figure out
what's gone wrong?

- robin.




___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] lame question on memory allocation

2003-01-21 Thread Tim Riley


Peter Jay Salzman wrote:

> you'd think by now i'd know stuff like this.  i'm embarrased to have to
> ask this, but here it goes.

Don't be -- memory management is complicated and gets more so
everytime they improve the hardware. As a result, the vocabulary
can get esoteric.

>
>
> i'm reading the man page for electric fence, and i'm not fully
> understanding the sections on EF_ALIGNMENT and "WORD-ALIGNMENT AND
> OVERRUN DETECTION".   i feel like i "almost" understand them.
>
> i think i understand the concept of memory page as being the minimum
> chunk of memory the kernel handles internally (8192 bytes minimum
> allocation of memory on x86) and alignment, but i guess i don't know
> what a word is.
>

More specifically, a page is a chunk of memory that the operating system
(or hardware) copies to disk (swap space) when you run out of memory -- aka
"page fault." To optimize this process, memory is allocated by the page.

>
> for example, the man page says that malloc() may be required to return
> word aligned memory pages, so in the diagram:
>

This implies that malloc() may return more memory than you request.
It might be that malloc( 1 ) gets you an entire page -- 4 or 8 K. However,
subsequent malloc( 1 )s will just fill in the existing page. When it fills
up you
get a new page.

The gcc complier knows about page alignments and will allocate
memory requested on the stack effeciently. So, whenever I need
string space, I'll do: "char buffer[ 1024 ];" because I believe that
"char buffer[ 1000 ];" gets me 1024 anyway.

>
>  1 page allocated by malloc()
> x   
> x+1 |  |
> x+2 | 8192 |
> | bytes on |
> |   x86|
> |  |
> 
>
> i guess that places a restriction on what "x" is, but because i don't
> know what a word is, i don't know what that restriction is.
>
> what's a word?  :)
>

A word is the minimum amount of addressable memory. So, if you
declare "char c;" on the stack of a 386, even though you plan on storing
only 8 bits, more bits are available. To figure out the word size, take
the log based 2 of the constant UINT_MAX + 1 (in limits.h) -- probably
it's 32.

>
> or does it mean that there's a restriction on *size* of the page and not
> the starting point?
>

The page size is set by the hardware, and the Linux kernel manages paging
transparently. I'm surprised to hear about an application that is forcing
you
to make decisions about memory alignment.

>
> pete
>
> --
> First they ignore you, then they laugh at you, then they fight you,
> then you win. -- Gandhi, being prophetic about Linux.
>
> Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
> ___
> vox-tech mailing list
> [EMAIL PROTECTED]
> http://lists.lugod.org/mailman/listinfo/vox-tech

___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] networking

2003-01-21 Thread Jeff Newmiller
On Tue, 21 Jan 2003, Jim wrote:

> > Just to remind y'all... it is noted, in the lugod-faq:
> >
> > http://www.dirac.org/linux/lugod/faq/lugod-faq.html
> >
> > which "Jim" says he read.
> 
> picky arent ya?  Fine, lets play your game.  If you look up on my original
> post (dated 1-20-03 at 11:27 AM) I never stated that I read the entire
> lugod-faq.  "I followed the directions given in the lugod fact" is the exact
> phrase just in case you don't want to look it up on the original post.
> 
> I know a good optometrist if you are interested.
> "Jim"

I apologize for the apparent short temper... I only intended to make sure
everyone realized that a discussion of this topic had already been
referenced.  The original question was certainly fair, and the responses
were accurate, but neither Karsten nor Rick are in Davis, so it seemed
appropriate to make sure everyone (including, but not limited to, you)
realized that the FAQ had some relevant points.

---
Jeff NewmillerThe .   .  Go Live...
DCN:<[EMAIL PROTECTED]>Basics: ##.#.   ##.#.  Live Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.  rocks...2k
---

___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] lame question on memory allocation

2003-01-21 Thread Rod Roark
Scratch that -- looks like the official definition of "word"
in all x86 architectures is 16 bits.  This is in spite of
the fact that the 80386 and above are 32-bit CPUs, that the
registers are 32 bits, and that declaring an "int" in C gets
you 32 bits.

This is a holdover from the predecessor 8086 and 80286,
which were true 16-bit CPUs.

Sorry for the bogus answer.

-- Rod

On Tuesday 21 January 2003 11:38 am, Rod Roark wrote:
> On x86 CPUs (well, 80386 and above), a word is 32 bits.
>
> A "word-aligned" piece of memory is one whose starting
> binary address ends in 00 (i.e. is a multiple of 4 bytes).
>
> Also I thought the x86 unit of paging is 4K, not 8K, but
> maybe things have changed since the old 386 days.
>
> Cheers,

___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] lame question on memory allocation

2003-01-21 Thread Ryan Zeeturt

A word is 2 bytes I think on x86. Then after that there is double-word,
quad-word and paragraph, and more nerdy names I'm sure.

Word-aligned means that you can't have a memory address starting at
anything that isn't a multiple of 2. So for different types of alignments,
let's say it were aligned to N bytes, then you couldn't have a memory
address
starting at anything that isn't MEM_ADDRESS mod N.


-ryan


On Tue, 21 Jan 2003, Peter Jay Salzman wrote:

>
> you'd think by now i'd know stuff like this.  i'm embarrased to have to
> ask this, but here it goes.
>
> i'm reading the man page for electric fence, and i'm not fully
> understanding the sections on EF_ALIGNMENT and "WORD-ALIGNMENT AND
> OVERRUN DETECTION".   i feel like i "almost" understand them.
>
> i think i understand the concept of memory page as being the minimum
> chunk of memory the kernel handles internally (8192 bytes minimum
> allocation of memory on x86) and alignment, but i guess i don't know
> what a word is.
>
> for example, the man page says that malloc() may be required to return
> word aligned memory pages, so in the diagram:
>
>
>  1 page allocated by malloc()
> x   
> x+1 |  |
> x+2 | 8192 |
> | bytes on |
> |   x86|
> |  |
> 
>
> i guess that places a restriction on what "x" is, but because i don't
> know what a word is, i don't know what that restriction is.
>
> what's a word?  :)
>
> or does it mean that there's a restriction on *size* of the page and not
> the starting point?
>
> pete
>
> --
> First they ignore you, then they laugh at you, then they fight you,
> then you win. -- Gandhi, being prophetic about Linux.
>
> Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
> ___
> vox-tech mailing list
> [EMAIL PROTECTED]
> http://lists.lugod.org/mailman/listinfo/vox-tech
>


___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] lame question on memory allocation

2003-01-21 Thread Rod Roark
On x86 CPUs (well, 80386 and above), a word is 32 bits.

A "word-aligned" piece of memory is one whose starting
binary address ends in 00 (i.e. is a multiple of 4 bytes).

Also I thought the x86 unit of paging is 4K, not 8K, but
maybe things have changed since the old 386 days.

Cheers,
-- 
Rod Roark, Sunset Systems http://www.sunsetsystems.com/
Offering preconfigured Linux computers, custom software and
remote system administration services.
Public Key: http://www.sunsetsystems.com/rodspublickey.asc

On Tuesday 21 January 2003 11:20 am, Peter Jay Salzman wrote:
> you'd think by now i'd know stuff like this.  i'm embarrased to have to
> ask this, but here it goes.
>
> i'm reading the man page for electric fence, and i'm not fully
> understanding the sections on EF_ALIGNMENT and "WORD-ALIGNMENT AND
> OVERRUN DETECTION".   i feel like i "almost" understand them.
>
> i think i understand the concept of memory page as being the minimum
> chunk of memory the kernel handles internally (8192 bytes minimum
> allocation of memory on x86) and alignment, but i guess i don't know
> what a word is.
>
> for example, the man page says that malloc() may be required to return
> word aligned memory pages, so in the diagram:
>
>
>  1 page allocated by malloc()
> x   
> x+1 |  |
> x+2 | 8192 |
>
> | bytes on |
> |   x86|
>
> 
>
> i guess that places a restriction on what "x" is, but because i don't
> know what a word is, i don't know what that restriction is.
>
> what's a word?  :)
>
> or does it mean that there's a restriction on *size* of the page and not
> the starting point?
>
> pete

___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



[vox-tech] Recovering Debian without /var/lib/dpkg...

2003-01-21 Thread R. Douglas Barbieri
Here is a good article about recovering a Debian system without having a
backup of /var/lib/dpkg...

http://www.linuxworld.com/2003/0113.petreley.html

-- 
R. Douglas Barbieri
[EMAIL PROTECTED]
http://www.dooglio.net

GPG Fingerprint: FE6A 6A57 2B95 7594 E534  BFEE 45F1 9E5E F30A 8A27
GPG Public key : http://www.dooglio.net/dooglio.gpg


___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] networking

2003-01-21 Thread Jim
> Just to remind y'all... it is noted, in the lugod-faq:
>
> http://www.dirac.org/linux/lugod/faq/lugod-faq.html
>
> which "Jim" says he read.

picky arent ya?  Fine, lets play your game.  If you look up on my original
post (dated 1-20-03 at 11:27 AM) I never stated that I read the entire
lugod-faq.  "I followed the directions given in the lugod fact" is the exact
phrase just in case you don't want to look it up on the original post.

I know a good optometrist if you are interested.
"Jim"


___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



[vox-tech] lame question on memory allocation

2003-01-21 Thread Peter Jay Salzman

you'd think by now i'd know stuff like this.  i'm embarrased to have to
ask this, but here it goes.

i'm reading the man page for electric fence, and i'm not fully
understanding the sections on EF_ALIGNMENT and "WORD-ALIGNMENT AND
OVERRUN DETECTION".   i feel like i "almost" understand them.

i think i understand the concept of memory page as being the minimum
chunk of memory the kernel handles internally (8192 bytes minimum
allocation of memory on x86) and alignment, but i guess i don't know
what a word is.

for example, the man page says that malloc() may be required to return
word aligned memory pages, so in the diagram:


 1 page allocated by malloc()
x   
x+1 |  |
x+2 | 8192 |
| bytes on |
|   x86|
|  |


i guess that places a restriction on what "x" is, but because i don't
know what a word is, i don't know what that restriction is.

what's a word?  :)

or does it mean that there's a restriction on *size* of the page and not
the starting point?

pete

-- 
First they ignore you, then they laugh at you, then they fight you,
then you win. -- Gandhi, being prophetic about Linux.

Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] electric fence - error in man page? a bug?

2003-01-21 Thread Peter Jay Salzman
begin Jeff Newmiller <[EMAIL PROTECTED]> 
> On Tue, 21 Jan 2003, Peter Jay Salzman wrote:
> 
> > hola lugod,
> > 
> > according to the electric fence man page, pages of dynamic memory
> > which are free'd are returned back to the heap from whence they came.
> > in other words, if you do nothing, efence won't detect access of free'd
> > dynamic memory.
> 
> That doesn't preclude Linux from detecting it.  Accessing free memory
> produces undefined results... sometimes the library may return the memory
> to the OS, and other times not (a function of buffering optimization).  
> If it is returned, then the OS has the freedom to mark the page as outside
> the process again, such that accesses there yield the same result
> (SIGSEGV) as efence's forced behavior.
> 
> 0 = sometimes detect error
> 1 = always detect error
 
ok, understood.

but when i run the code without linking to efence, it doesn't segfault.

i know you're next comment will be "the result is undefined" but on a
practical level, when you run the same code twice, the exact same
"unpredictable behavior" happens again.

kind of like how when you overwrite an array bound and tromp on another
variable, say your variable z is now "3".  run the program again, and
suddenly z is again "3".  unpredictable, yes, but completely
reproducible.

i guess what i need to do is try to find a way to tell whether the
segfault was generated by the OS or by efence (if it's possible to find
something like this out).

pete

-- 
First they ignore you, then they laugh at you, then they fight you,
then you win. -- Gandhi, being prophetic about Linux.

Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] networking

2003-01-21 Thread Jeff Newmiller
On Mon, 20 Jan 2003, Rick Moen wrote:

> Quoting Karsten M. Self ([EMAIL PROTECTED]):
> 
> > ...but this largely doesn't matter for broadband.  Most DSL/Cable
> > services connect to your internal network as an Ethernet hub.  There's
> > no hardware issue here -- your network card will work just fine (though
> > your DSL/Cable provider may balk at dealing with GNU/Linux).  
> 
> The software issue with low-end providers requiring PPPoE is worth
> noting.

Just to remind y'all... it is noted, in the lugod-faq:

http://www.dirac.org/linux/lugod/faq/lugod-faq.html

which "Jim" says he read.

---
Jeff NewmillerThe .   .  Go Live...
DCN:<[EMAIL PROTECTED]>Basics: ##.#.   ##.#.  Live Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.  rocks...2k
---


___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] electric fence - error in man page? a bug?

2003-01-21 Thread Jeff Newmiller
On Tue, 21 Jan 2003, Peter Jay Salzman wrote:

> hola lugod,
> 
> according to the electric fence man page, pages of dynamic memory
> which are free'd are returned back to the heap from whence they came.
> in other words, if you do nothing, efence won't detect access of free'd
> dynamic memory.

That doesn't preclude Linux from detecting it.  Accessing free memory
produces undefined results... sometimes the library may return the memory
to the OS, and other times not (a function of buffering optimization).  
If it is returned, then the OS has the freedom to mark the page as outside
the process again, such that accesses there yield the same result
(SIGSEGV) as efence's forced behavior.

0 = sometimes detect error
1 = always detect error

---
Jeff NewmillerThe .   .  Go Live...
DCN:<[EMAIL PROTECTED]>Basics: ##.#.   ##.#.  Live Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.  rocks...2k
---

___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] networking

2003-01-21 Thread Rod Roark
The other problem with PPPoE is that it's not static; i.e.,
your IP address can change between connections.  This adds
yet another set of headaches if you want to run externally-
accessable services.

Much better to get a static IP if you can.  If you can get,
say, Pac Bell DSL, then you can probably find other ISPs
that use the same PB equipment and also have static IPs
(see www.dslreports.com).

-- 
Rod Roark, Sunset Systems http://www.sunsetsystems.com/
Offering preconfigured Linux computers, custom software and
remote system administration services.
Public Key: http://www.sunsetsystems.com/rodspublickey.asc

On Tuesday 21 January 2003 08:03 am, Kevin Hooke wrote:
> Some external ethernet DSL modems/routers will include PPPOE connectivity
> built into the hardware so you don't have to worry about it within linux
> (or any other os) - turn the modem/router on and you're connected. Most
> have a web interface in the hardware for setup, so you just hit it with
> your browser to do the config.
>
> I had a Speedtouch USB DSL modem (from PacBell) that I tried for ages to
> get to work with linux ( I think I almost got it working - I had the
> drivers for the modem working and it would get sync ok), but I couldn't get
> PPPOE working for the life of me.
>
> So rather than pulling out any more hair, I replaced it for an all-in-one
> ethernet DSL modem/router/ hub/NAT firewall from Netgear (DG814) for about
> 150 bucks. It does the PPPOE signon for you, and works great, straight out
> of the box with minimal (3mins) setup.
>
> Kevin
>
>
> Quoting Rick Moen <[EMAIL PROTECTED]>
>
> >Date: Tue, 21 Jan 2003 00:11:56 -0800
> >To: [EMAIL PROTECTED]
> >Subject: Re: [vox-tech] networking
>
> From: Rick Moen <[EMAIL PROTECTED]>
>
> >Reply-To: [EMAIL PROTECTED]
> >
> >Quoting Matt Holland ([EMAIL PROTECTED]):
> >
> > You think so?  PPPoE is really pretty easy to set up these days
> >
> >Glad to hear that, I guess.  I deliberately avoid it, as it's a horrid
> >and techically unjustifiable kludge that's best avoided.
> >
> >In general terms, any additional mandatory layer of software is yet
> >another thing that can go wrong.  People think this isn't a problem,
> >until the day that setup doesn't work and it's necessary to do
> >diagnosis.  At that point, they learn the uncomfortable truth about how
> >presence of too many suspects tends to complicate one's diagnostic
> >efforts.
> >
> >> I would suggest being aware of one possible hardware issue, though...
> >> when I set up my DSL with Pac Bell 1.5 yrs ago, I had to specifically
> >> request a modem with an ethernet interface; the other "option" was a USB
> >> interface.  Maybe they've gotten away from that with the near ubiquity
> >> of ethernet adapters in PCs now, but I'd make sure.
> >
> >Yes, that's definitely another problem area.
> >
> >--
> >Cheers,   I once successfully declined a departmental
>
> retreat,
>
> >Rick Moen saying that on that day I planned instead to
>
> advance.
>
> >[EMAIL PROTECTED]  -- Alan J. Rosenthal, in the
> > Monastery

___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] networking

2003-01-21 Thread Kevin Hooke
Some external ethernet DSL modems/routers will include PPPOE connectivity
built into the hardware so you don't have to worry about it within linux (or
any other os) - turn the modem/router on and you're connected. Most have a
web interface in the hardware for setup, so you just hit it with your
browser to do the config.

I had a Speedtouch USB DSL modem (from PacBell) that I tried for ages to get
to work with linux ( I think I almost got it working - I had the drivers for
the modem working and it would get sync ok), but I couldn't get PPPOE
working for the life of me.

So rather than pulling out any more hair, I replaced it for an all-in-one
ethernet DSL modem/router/ hub/NAT firewall from Netgear (DG814) for about
150 bucks. It does the PPPOE signon for you, and works great, straight out
of the box with minimal (3mins) setup.

Kevin


Quoting Rick Moen <[EMAIL PROTECTED]>

>Date: Tue, 21 Jan 2003 00:11:56 -0800
>To: [EMAIL PROTECTED]
>Subject: Re: [vox-tech] networking
>From: Rick Moen <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]

>Quoting Matt Holland ([EMAIL PROTECTED]):

> You think so?  PPPoE is really pretty easy to set up these days

>Glad to hear that, I guess.  I deliberately avoid it, as it's a horrid
>and techically unjustifiable kludge that's best avoided.

>In general terms, any additional mandatory layer of software is yet
>another thing that can go wrong.  People think this isn't a problem,
>until the day that setup doesn't work and it's necessary to do
>diagnosis.  At that point, they learn the uncomfortable truth about how
>presence of too many suspects tends to complicate one's diagnostic
>efforts.

>> I would suggest being aware of one possible hardware issue, though...
>> when I set up my DSL with Pac Bell 1.5 yrs ago, I had to specifically
>> request a modem with an ethernet interface; the other "option" was a USB
>> interface.  Maybe they've gotten away from that with the near ubiquity
>> of ethernet adapters in PCs now, but I'd make sure.

>Yes, that's definitely another problem area.

>--
>Cheers,   I once successfully declined a departmental
retreat,
>Rick Moen saying that on that day I planned instead to
advance.
>[EMAIL PROTECTED]  -- Alan J. Rosenthal, in the Monastery


___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] converting opera bookmarks to galeon

2003-01-21 Thread Peter Jay Salzman
begin Troy Arnold <[EMAIL PROTECTED]> 
> On Tue, Jan 21, 2003 at 12:16:18AM -0800, Peter Jay Salzman wrote:
>  
> > 2. after i do that, is there a way to share the bookmark folder between
> >galeon and opera so that changes made with one browser will reflect in
> >the other browser's bookmarks?
> 
> BTW, Opera 6.11 almost never craps out on me.  Feel free to mail me off
> list if you want to try and figure out what's going on.  It's likely
> font-related.  In the meantime, I think i'll apt-get galeon.

ok, i wasn't switching because i wanted to -- it was because i had to.

the segfaulting happened in 3 cases:

1. totally random
2. pressing the back button too quickly in succession
3. animated gifs

so i'm not sure it was font related (although anything is possible, i
suppose).

i was using 6.10.  i'll give 6.11 a try and see how it goes.  i'd rather
use opera simply because it's faster than any other browser on linux,
although if opera were to disappear tomorrow, i'd be almost as happy
with galeon.  those guys are doing a fantastic job.

thanks!
pete

-- 
First they ignore you, then they laugh at you, then they fight you,
then you win. -- Gandhi, being prophetic about Linux.

Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] converting opera bookmarks to galeon

2003-01-21 Thread Troy Arnold
On Tue, Jan 21, 2003 at 12:16:18AM -0800, Peter Jay Salzman wrote:
 
> 1. is there a way to convert my opera bookmark file into galeon/mozilla
>format?  i don't really have bookmarks under galeon yet.  i'm
>starting with a clean slate and would like to simply import the opera
>bookmarks.

IIRC galeon stores bookmarks in XML.  (Haven't used galeon in awhile --
I got annoyed when galeon was switching over to gconf for configuration
and started using Opera.  For me, Galeon is now the Wally Pip[1] of web
browsers)  Opera stores bookmarks in a flat textfile whose format is easy
to grok.  Sounds like it's time to put that Perl practice to use.

> 2. after i do that, is there a way to share the bookmark folder between
>galeon and opera so that changes made with one browser will reflect in
>the other browser's bookmarks?

Probably not a super clean way.  You could automate something from
crond, but you'd have to take care the one or other of the browsers
isn't running.  If you modify opera6.adr while opera is running, opera
will happily overwrite it with the bookmarks it has in memory.  Not sure
what galeons behavior is in this regard.

Opera can import netscape and konq bookmarks on startup, so depending
upon galeons similar capabilities, you might find a common format and
use that.

BTW, Opera 6.11 almost never craps out on me.  Feel free to mail me off
list if you want to try and figure out what's going on.  It's likely
font-related.  In the meantime, I think i'll apt-get galeon.

-ta

[1]  Wally Pip was the starting firstbaseman for the Yankee's in the
'20's  He became ill one day and was replaced in the lineup by Lou
Gehrig who didn't miss a game for 17 years.  Kinda like windows after I
installed my first Linux. 


___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



[vox-tech] electric fence - error in man page? a bug?

2003-01-21 Thread Peter Jay Salzman
hola lugod,

according to the electric fence man page, pages of dynamic memory
which are free'd are returned back to the heap from whence they came.
in other words, if you do nothing, efence won't detect access of free'd
dynamic memory.

the man page goes on to say that you can set the global

   extern int EF_PROTECT_FREE;

or the shell variable

   EF_PROTECT_FREE

to the value 1 to intercept free() and keep them allocated.  this allows
electric fence to catch read/write access to free'd memory.

in my little hello world program:

   #include 
   #include 
   
   int main(void)
   {
  int *a = (int *) malloc( 3*sizeof(int) );
   
  for (int i = 0; i < 3; ++i)
 a[i] = i;
   
  free(a);
   
  printf("%d\n", a[1]);
  return 0;
   }

i've found that efence will cause a segfault on the read of free'd
memory, even though i never set EF_PROTECT_FREE to 1.  this is contrary
to what i understand from the man page.

in fact, i tried to explicitly set the int to 0:

   #include 
   #include 
   extern int EF_PROTECT_FREE;
   
   int main(void)
   {
  EF_PROTECT_FREE = 0;
  int *a = (int *) malloc( 3*sizeof(int) );
   
  for (int i = 0; i < 3; ++i)
 a[i] = i;
   
  free(a);
   
  printf("%d\n", a[1]);
  return 0;
   }

and it still segfaults on the last printf() statement.   i also tried:

   export EF_PROTECT_FREE=0

and the printf() still segfaults.


perhaps i'm non understanding the manpage correctly, but it looks like
this is a bug in electric fence.  everything else i've read in the
manpage seems accurate.

comments?

pete

ps- quite a relevent question for tonight, considering the author of
efence.   :-)

-- 
First they ignore you, then they laugh at you, then they fight you,
then you win. -- Gandhi, being prophetic about Linux.

Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] converting opera bookmarks to galeon

2003-01-21 Thread Rick Moen
Quoting Peter Jay Salzman ([EMAIL PROTECTED]):

> 1. is there a way to convert my opera bookmark file into galeon/mozilla
>format?  i don't really have bookmarks under galeon yet.  i'm
>starting with a clean slate and would like to simply import the opera
>bookmarks.

Hmm.  Here's one to convert from Opera to Konqueror:
http://mail.python.org/pipermail/xml-sig/2001-April/005028.html

An online conversion _service_:
http://www.linkagogo.com/

Another:
http://www.searchengineworld.com/opera/bookmark_convert.cgi

Proprietary gratis conversion utility for Win32 (coded in Delphi):
http://home.earthlink.net/~garycramblitt/

Proprietary, Win32, wants money:
http://www.softandco.com/Internet/Browsers/c/67/a/2621/Bookmark%20Converter.html

Conversion utility for Mac OS X:
http://ralf.menssen.bei.t-online.de/sw/swindex.html

Bookmarker might be able to do it; can't tell (might be Netscape-only):
http://packages.debian.org/stable/web/bookmarker.html
http://www.renaghan.com/pcr/bookmarker.html

-- 
Cheers,"Please return all dogmas to their orthodox positions."
Rick Moen -- Brad Johnson, in r.a.sf.w.r-j
[EMAIL PROTECTED]
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



Re: [vox-tech] networking

2003-01-21 Thread Rick Moen
Quoting Matt Holland ([EMAIL PROTECTED]):

> You think so?  PPPoE is really pretty easy to set up these days

Glad to hear that, I guess.  I deliberately avoid it, as it's a horrid
and techically unjustifiable kludge that's best avoided.

In general terms, any additional mandatory layer of software is yet
another thing that can go wrong.  People think this isn't a problem,
until the day that setup doesn't work and it's necessary to do
diagnosis.  At that point, they learn the uncomfortable truth about how
presence of too many suspects tends to complicate one's diagnostic
efforts.

> I would suggest being aware of one possible hardware issue, though... 
> when I set up my DSL with Pac Bell 1.5 yrs ago, I had to specifically 
> request a modem with an ethernet interface; the other "option" was a USB 
> interface.  Maybe they've gotten away from that with the near ubiquity 
> of ethernet adapters in PCs now, but I'd make sure.

Yes, that's definitely another problem area.

-- 
Cheers,   I once successfully declined a departmental retreat,
Rick Moen saying that on that day I planned instead to advance.
[EMAIL PROTECTED]  -- Alan J. Rosenthal, in the Monastery
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech



[vox-tech] converting opera bookmarks to galeon

2003-01-21 Thread Peter Jay Salzman
hola,

after being a die-hard opera fan for over a year, i think i'm going to
switch fully to galeon.  i can't take the segfaulting anymore.

however, i'd still like to use opera for very short term recreational
browsing -- like looking up a word on dictionary.com, for instance.
despite its stability issues, opera is still *lightyears* faster than
mozilla and galeon in both start up and rendering.

1. is there a way to convert my opera bookmark file into galeon/mozilla
   format?  i don't really have bookmarks under galeon yet.  i'm
   starting with a clean slate and would like to simply import the opera
   bookmarks.

2. after i do that, is there a way to share the bookmark folder between
   galeon and opera so that changes made with one browser will reflect in
   the other browser's bookmarks?

pete

-- 
First they ignore you, then they laugh at you, then they fight you,
then you win. -- Gandhi, being prophetic about Linux.

Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech