This commit is contained in:
gferg 2000-11-08 16:35:50 +00:00
parent 807d7ef3ce
commit 588f1df462
4 changed files with 470 additions and 315 deletions

View File

@ -16,7 +16,7 @@
<url url="mailto:konst@linuxassembly.org" name="Konstantin Boldyshev"> and
<url url="mailto:fare@tunes.org" name="Francois-Rene Rideau">
<date>v0.5m, October 22, 2000
<date>v0.5n, November 07, 2000
<abstract>
This is the Linux Assembly HOWTO.
@ -161,6 +161,10 @@ I would like to thank following persons, by order of appearance:
Each version includes a few fixes and minor corrections,
that need not to be repeatedly mentioned every time.
<descrip>
<tag/Version 0.5n 07 Nov 2000/
Added question regarding kernel modules to FAQ,
fixed NASM URLs, GAS has Intel syntax too
<tag/Version 0.5m 22 Oct 2000/
Linux 2.4 system calls can have 6 args,
Added ALD note to FAQ,
@ -811,15 +815,15 @@ from the cell pointed to by <tt/&percnt;ebp/).
</itemize>
A program exists to help you convert programs
There's a program to help you convert source code
from TASM syntax to AT&amp;T syntax. See
<url url="ftp://x2ftp.oulu.fi/pub/msdos/programming/convert/ta2asv08.zip">.
<url url="ftp://x2ftp.oulu.fi/pub/msdos/programming/convert/ta2asv08.zip">.
<!--
(Since the original x2ftp site is closing (no more?), use a
<url url="ftp://ftp.lip6.fr/pub/pc/x2ftp/README.mirror_sites"
name="mirror site">).
-->
There also exists a program for the reverse conversion:
There's also a program for the reverse conversion:
<url url="http://www.multimania.com/placr/a2i.html">.
@ -850,6 +854,10 @@ Finally, just compiling a C program to assembly
might show you the syntax for the kind of instructions you want.
See section <ref id="doyouneedasm" name="Do you need Assembly?"> above.
<sect2>Intel syntax
<p>
Beginning from binutils 2.10.x.x.x, GAS supports Intel syntax too.
<sect2>16-bit mode
<p>
@ -886,7 +894,8 @@ to eventually support all known syntaxes and object formats.
<sect2>Where to find NASM<label id="findnasm">
<p>
<url url="http://nasm.sourceforge.net">
<url url="http://www.cryogen.com/nasm/">,
<url url="http://nasm.rm-f.net">
Binary release on your usual metalab mirror in <tt>devel/lang/asm/</tt>.
Should also be available as .rpm or .deb in your usual RedHat/Debian
@ -1923,7 +1932,7 @@ List archives are available at <url url="http://www.egroups.com/list/linux-assem
<sect1>Frequently asked questions (with answers)<label id="faq">
<p>
Here are frequently asked questions. Answers are taken
Here are frequently asked questions. Some answers were taken
from the <ref id="res-list" name="linux-assembly mailing list">.
<sect2>How do I do graphics programming in Linux?
@ -2058,6 +2067,56 @@ by means of system calls or library functions.
In the worst case you may go through direct port access,
or make a kernel patch to implement needed functionality.
<sect2>Is it possible to write kernel modules in assembly?
<p>
Yes, indeed it is. While in general it is not a good idea
(it hardly will speedup anything), there may be a need of such wizardy.
The process of writing a module itself is not that hard --
a module must have some predefined global function,
it may also need to call some external functions from the kernel.
Examine kernel source code (that can be built as module) for details.
Meanwhile, here's an example of a minimum dumb kernel module (module.asm)
(code is based on example by mammon_ from APJ #8):
<tscreen><code>
section .text
global init_module
global cleanup_module
global kernel_version
extern printk
init_module:
push dword str1
call printk
pop eax
xor eax,eax
ret
cleanup_module:
push dword str2
call printk
pop eax
ret
str1 db "init_module done",0xa,0
str2 db "cleanup_module done",0xa,0
kernel_version db "2.2.18",0
</code></tscreen>
The only thing this example does is reporting its actions.
Modify <tt/kernel_version/ to match yours, and build module with:
<tt/&dollar; nasm -f elf -o module.m module.asm/
<tt/&dollar; ld -r -o module.o module.m/
Now you can play with it using insmod/rmmod/lsmod
(root privilidged are required); a lot of fun, huh?
<em/That's all for now, folks/.
$Id$

View File

@ -5,7 +5,7 @@
<title>"Pocket" ISP based on RedHat Linux
<author>Anton Chuvakin, <tt>
<htmlurl url="mailto:anton@chuvakin.org" name="anton@chuvakin.org"></tt>
<date>v1.1.0 1 August 2000</date>
<date>v1.1.1 5 November 2000</date>
<abstract>
This document outlines the setup of a single RedHat box for dialins, virtual
web hosting, virtual email, POP3 and ftp servers. Why anybody might need
@ -68,6 +68,16 @@ the setup of some particular machines built by the author.
<p>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<sect> Changes<p>
<bf>from 1.1.0 to 1.1.1</bf>
<p>
<itemize>
<item>
Partitioning scheme described
<item>
Some comments to dialin server setup added (based on user feedback)
<item>
Some comments to ftp server setup added (based on user feedback)
</itemize>
<bf>from 1.0.3 to 1.1.0</bf>
<p>
@ -127,7 +137,7 @@ Windows configuration for dialup added
<bf>Next update planned at:</bf> upon request or when new program versions are released
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<sect> TODO Mon Aug 7 03:39:28 EDT 2000
<sect> TODO Mon Nov 6 13:05:39 EST 2000
<p>
<itemize>
<item>
@ -135,15 +145,14 @@ More on security of all the services we install (clear text password, DoS by
overflowing partition in mail and ftp, http access configs etc), including
maybe the very basic ipchains setup (ipchains as safer alternative to tcp wrappers)
<item>
Add info on POP3 and ftp tunneling via ssh (just for fun)
Add info on POP3 and ftp tunneling via ssh (just for fun) or refer to other HOWTOs
<item>
Add troubleshooting subsections to various sections
<item>
Add SSL-enabled Apache install and basic configuration
<item>
PDF version is available on all linuxdoc mirror sites
<item>
Add news server setup
</itemize>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
@ -242,7 +251,7 @@ Ingredients needed:
<item>
RedHat Linux distribution (the instructions are exactly applicable to RedHat
6.1 or 6.0 (I think, 6.2, as well, since there are no major changes)
and with some minor changes to 5.x versions)
and with some minor changes to 5.x and 7.x versions)
<item>
<htmlurl url="http://www.redhat.com/support/hardware/"
name="compatible"> hardware (also known as a PC), that includes
@ -298,6 +307,21 @@ required-so only Server or Custom is strongly recommended.
corresponding documentation for troubleshooting network card, modem,
video card, etc problems
(mostly HOWTOs and mini-HOWTOs, some are in References section below).
<p>
Here are some ideas on disk space partitioning. Read
<htmlurl url="http://linuxdoc.org/HOWTO/Multi-Disk-HOWTO.html" name="Linux Partitions HOWTO"> (a bit outdated)
to get some general hints on functions of partitions and their sizes for
different kinds of server setups.
<p>Lest assume we are setting up a server for under one hundred users. We will
need separate /tmp, /var and /home partititons (and swap, of course).
If you hard drive is around 4 GB than roughly 300 MB is /tmp, 100MB swap, 1 GB /var (you
want ample logging) and 1GB /home.
The remaining 1.6GB will be root partition (no separate /usr). The split between
/home and / might depend upon the amount of web pages you plan to host- the
more pages the more space goes to /home. To enhance security it is nice to put
some restricions (in /etc/fstab) to /tmp, /var and /home partitions (similar to those
described in my
<htmlurl url="http://www.chuvakin.org/kiodoc" name="Public Browser Station HOWTO ">.
<p>
If your network card is detected properly you will be asked for an IP
address of your machine, gateway address and network mask and the
@ -495,7 +519,10 @@ has Pentium II processor. This file exists, if the <tt>kernel-source</tt> RPM
package was installed. If line <tt>CONFIG_IP_ALIAS=y</tt> is present in the
file than you are OK. While we are here, we can also confirm the ability to
forward IP packets (needed for dialup users PPP). This ability is present, but
not turned on by default. Also needed is the support for PPP protocol (line
not turned on by default (to turn it on do execute the following command
<tt>echo 1 > /proc/sys/net/ipv4/ip_forward</tt>)
. Also needed is the support for PPP protocol (line
<tt>CONFIG_PPP=m</tt>, this means PPP support is compiled as a kernel loadable
module, <tt>CONFIG_PPP=y</tt> is also OK)
<p>
@ -586,11 +613,18 @@ upgrading to 8.x
(provided <htmlurl url="http://www.acmebw.com/askmrdns/00444.htm" name="http://www.acmebw.com/askmrdns/00444.htm">
and
<htmlurl url="http://www.dns.net/dnsrd/servers.html" name="http://www.dns.net/dnsrd/servers.html">
and, I guess, at many other places)
and, I guess, at many other places. Here is another
<htmlurl url="http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=651139761" name="message">
from Theo de Raadt
himself (the head of OpenBSD development) where he justifies the choice of
bind 4 as part of OpenBSD-the most secure UNIX OS around. He also shudders at
the amount of bugs the OenBSD auditing team saw in BIND 8 source code)
still didn't seem to convince many people. And, lets not forget the "exploit of 1999" -
ADMROCKS, that gives remote root access to almost any Linux machine running bind prior to
8.1.2 patch 3. Judging by the INCIDENTS mailing list, this is still a very
popular way to attack RH versions 5.0-6.1 if no recommended upgrades are installed.
popular way to attack RH versions 5.0-6.1 if no recommended upgrades are
installed.
It is claimed that named (whatever version) should always be run in a chroot jail.
<p>
Here are the instructions, loosely following the DNS book from O'Reilly (a good
one, highly recommended to all, but very casual DNS user).
@ -1078,8 +1112,8 @@ location and transfer their passwords in clear text? Not everybody
<p>
I suggest using the stock RH wu-ftpd (version 2.6.0 at the time of
writing). While it is rumored that there are "more secure" ftp daemons
(Pro-FTP?), wu-ftp appears to be one most commonly used. Recenly a series of
bug was again discovered in wu-ftp and its reputation as the most popular ftp
(Pro-ftpd), wu-ftp appears to be one most commonly used. Recenly a series of
bugs was again discovered in wu-ftp and its reputation as the most popular ftp
daemon seem to be dwindling. CERT has issued an advisory concerning WU-FTPD and all ftp daemons derived
from BSD's final release.
<p>
@ -1237,7 +1271,10 @@ ftpguy:x:505:701::/home/ftpguy/./:/etc/ftponly
yes, that is "slash"-"dot"-"slash" after his home directory.
<item>Edit file <it>/etc/shells</it>, add line, below
<verb>/etc/ftponly</verb>
This file doesn't have to actually exist.
This file has to exist in some newer Linux distributions (contrary to what is
claimed at
<htmlurl url="ftp://ftp.fni.com/pub/wu-ftpd/guest-howto" name="Guest FTP HOWTO">).
Sometimes one can put <it>/bin/true</it> in its place.
<item>Edit file <it>/etc/group</it>, add line, below
<verb>
lusers:x:701:ftpguy
@ -1444,7 +1481,16 @@ DNS server
</itemize>
Look at pppd man page for all the juicy details (parts of the above info is
adapted from there)
<p>Another note is appropriate here. Some people reported that they had more
success with <bf>+chap -pap</bf> in authenticating both Windows and Linux
dial-up clients. If you are having problems, try changing
<tt>/etc/ppp/options</tt> to have <bf>+chap -pap</bf>. In this case the new
file <it>/etc/ppp/chap-secrets</it> should be created (same contents as
recommended <it>/etc/ppp/pap-secrets</it>).
<p>Some other people reported that
having default line from <it>/etc/mgetty+sendfax/login.config</it> works
fine. I am very happy to hear that, and I never claimed that my way to set
things up is the only true way.
<item>
<it>/etc/ppp/options.ttyS1</it><p>
This file serves purpose similar to the previous one, but only applies to

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
<author>Kris Buytaert,
<htmlurl url="mailto:Kris.Buytaert@advalvas.be"
name="Kris.Buytaert@advalvas.be">
<date>v1p00, 24 June, 2000
<date>v1p01, 02 November, 2000
<abstract>
This document tries to describe how to hook up a IBM Netstation
@ -285,6 +285,7 @@ and tried executing nsmsetup.exe. It extracted properly, then choked
on the install and removed all the install files. Then I tried opening
it with WinZip, and that worked. I just extracted everything into my
Windows partition under the directory C:/netstation.
<item> I then copied everything from C:/netstation/prodbase to my linux
box. I set everything up in /usr/netstation, which I think was a
mistake. I ran strings on parts of the package, and it looks like
@ -298,6 +299,14 @@ server, until I botched something. Now I get an IBM login screen that
doesn't allow me to log in.
</itemize>
<p>
Philip Tait wrote to tell us this :
"From the directory tree extracted from nsmsetup.exe using WinZIP
classic, copy the entire tree under "Prodbase" to /netstation. Export
/netstation, and proceed as for the following sections.
</p>
<sect1>The Linux Part
<p>
@ -892,7 +901,8 @@ Lots of thanks must go out to Wouter Cloetens,
wcloeten@raleigh.ibm.com
for getting me started , additional info from Boas Betzler, Andreas Neuper
and Herman Bos. Thanks for updates in v1.00 must go to Matt Peterson and
Ken Collins for the setup using a Win98 machine in stead of an AIX box.
Ken Collins and Philip Tait for the setup using
a Win98 machine instead of an AIX box.
and to Bart Geens ,Bart.Geens@advalvas.be for rereading this howto and
findin uot lost of splelling errosr
@ -917,6 +927,8 @@ think your part is missing, please mail me ;-)
<item>v1.00 20000624 Updates but now also a sollution without AIX,
this might be a good time for 1.0 ;-) It Also seems like the howto is not
listed under mini anymore
<item>v1.01 20001103 Updates for the not using AIX sollution (Philip
Tait)
</itemize>