Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jun 2001 06:01:05 +0100
From:      j mckitrick <jcm@FreeBSD-uk.eu.org>
To:        "G. Adam Stanislav" <adam@whizkidtech.net>
Cc:        freebsd-chat@freebsd.org
Subject:   Re: most complex code in BSD?
Message-ID:  <20010624060105.A12278@dogma.freebsd-uk.eu.org>
In-Reply-To: <3.0.6.32.20010623205528.00e64210@mail85.pair.com>; from adam@whizkidtech.net on Sat, Jun 23, 2001 at 08:55:28PM -0500
References:  <20010621233210.A37804@dogma.freebsd-uk.eu.org> <3.0.6.32.20010623205528.00e64210@mail85.pair.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jun 23, 2001 at 08:55:28PM -0500, G. Adam Stanislav wrote:
| At 23:32 2001-06-21 +0100, j mckitrick wrote:
| >
| >In everyone's opinion, what is the most complex code in the BSD codebase?
| >Not including asm
| 
| Is that supposed to imply that asm is complex or something? Because
| I would have to strongly disagree with any such implication.

Well, i guess i would have said that for 2 possible reasons: 

first, because
asm is machine dependent, so what might required for one task under a cpu
would not have the same implementation on others.  

Second, maybe cryptic is a
better choice than complex.  While asm works with the most primitive of
operations and could not literally be complex, sometimes (a) the task being
done leads to cryptic or confusing code or (b) a sequence of instructions 
used which has subtle implications not obvious on first glance, especially
to someone who has only a surface level knowledge of asm.  For example, the
code previously posted that used an unusual characteristic of PDP-10 (IIRC)
code to alter a return address.  Someone who knows the basic instructions,
but did not know about this idiosyncracy might spend hours trying to figure
out the most simple of instructions because their full effect is not
understood.

I remember once when i was tracing some 6510 code that was trying to hide
itself and cover its tracks.  The code loaded into zero page, then suddenly
ended up under the kernel above 0xFF00.  It wasn't until i found out later
that the code had overwritten the disk drive buffer pointer in zero page
that it made sense how the code got there.  The code was trivial.  The effect
was subtle, but extremely significant.



Jonathon
--
Microsoft complaining about the source license used by 
Linux is like the event horizon calling the kettle black.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010624060105.A12278>