s2avatarsetting

standards

by

Jeff Stewart

Yes, it’s that time again! After many months of development and careful testing, we are proud to announce the release of Slackware version 13.1! We are sure you’ll enjoy the many improvements. We’ve done our best to bring the latest technology to Slackware while still maintaining the stability and security that you have come to expect. Slackware is well known for its simplicity and the fact that we try to bring software to you in the condition that the authors intended.

Slackware 13.1 brings many updates and enhancements, among which you’ll find two of the most advanced desktop environments available today: Xfce 4.6.1, a fast and lightweight but visually appealing and easy to use desktop environment, and KDE 4.4.3, a recent stable release of the new 4.4.x series of the award-winning KDE desktop environment. We continue to make use of HAL (Hardware Abstraction Layer) and udev, which allow the system administrator to grant use of various hardware devices according to users’ group membership so that they will be able to use items such as USB flash sticks, USB cameras that appear like USB storage, portable hard drives, CD and DVD media, MP3 players, and more, all without requiring sudo, the mount or umount command. Just plug and play. Properly set up, Slackware’s desktop should be suitable for any level of Linux experience. New to the desktop framework are ConsoleKit and PolicyKit. ConsoleKit handles “seats”, things like dealing with devices when switching from one user to another. PolicyKit is a system for fine-grained access control, allowing a non-root user to run certain tasks with elevated privilege, but more securely than if the entire task were simply run as root.

Slackware uses the 2.6.33.4 kernel bringing you advanced performance features such as journaling filesystems, SCSI and ATA RAID volume support, SATA support, Software RAID, LVM (the Logical Volume Manager), and encrypted filesystems. Kernel support for X DRI (the Direct Rendering Interface) brings high-speed hardware accelerated 3D graphics to Linux.

There are two kinds of kernels in Slackware. First there are the huge kernels, which contain support for just about every driver in the Linux kernel. These are primarily intended to be used for installation, but there’s no real reason that you couldn’t continue to run them after you have installed. The other type of kernel is the generic kernel, in which nearly every driver is built as a module. To use a generic kernel you’ll need to build an initrd to load your filesystem module and possibly your drive controller or other drivers needed at boot time, configure LILO to load the initrd at boot, and reinstall LILO. See the docs in /boot after installing for more information. Slackware’s Linux kernels come in both SMP and non-SMP types now. The SMP kernel supports multiple processors, multi-core CPUs, HyperThreading, and about every other optimization available. In our own testing this kernel has proven to be fast, stable, and reliable. We recommend using the SMP kernel even on single processor machines if it will run on them.

Downloading Slackware 13.1:

—————————

The full version of Slackware Linux 13.1 is available for download from the central Slackware FTP sites hosted by our friends at www.cwo.com and osuosl.org:

ftp://slackware.osuosl.org/pub/slackware/slackware-13.1/

ftp://ftp.slackware.com/pub/slackware/slackware-13.1/

If the sites are busy, see the list of official mirror sites here:

http://slackware.com/getslack/

s2avatarsetting

standards

by

Karen Crawford

SENCAW | AUTHOR

If you’re a veteran system administrator, you might remember an era of extremely expensive hard disk storage, when any serious network would have a beefy central file server (probably accessed using the Network File System, NFS) that formed the lifeblood of its operations. It was a well-loved feature as early as Linux kernel 2.0 that you could actually boot your machine with a root filesystem in NFS and have no local disk at all. Hardware costs went down, similar machines could share large parts of their system binaries, upgrades could be done without touching anything but the central server—sysadmins loved this.

But that was then. Diskless booting these days seems a lot less common, even though the technology still exists. You hear about supercomputer clusters using it, but not the “typical” IT department. What happened?

Part of it, I’m sure, is that hard disks became speedier and cheaper more quickly than consumer network technology gained performance. With local disks, it’s still difficult to roll out updates to a hundred or a thousand computers simultaneously, but many groups don’tstart with a hundred or a thousand computers, and multicast system re-imaging software like Norton Ghost prevents the hassle from being unbearable enough to force a switch.

More important, though, is that after a few years of real innovation, the de facto standard in network booting has been stagnant for over a decade. Back in 1993, when the fastest Ethernet anyone could use transferred a little over a megabyte of data per second and IDE hard drives didn’t go much faster, network card managers were already including boot ROMs on their expansion cards, each following its own proprietary protocol for loading and executing a bootstrap program. A first effort at standardization, Jamie Honan’s “Net Boot Image Proposal”, was informally published that year, and soon enough two open-source projects, Etherboot (1995) and Netboot (1996), were providing generic ROM images with pluggable driver support. (Full disclosure: I’m an Etherboot Project developer.) They took care of downloading and executing a boot file, but that file would have no way of going back to the network for more data unless it had a network card driver built in. These tools thus became rather popular for booting Linux, and largely useless for booting simpler system management utilities that couldn’t afford the maintenance cost of their own network stack and drivers.

Around this time, Intel was looking at diskless booting from a more commercial point of view: it made management easier, consolidated resources, avoided leaving sysadmins at the mercy of users who broke their systems thinking themselves experts. They published aspecification for the Preboot Execution Environment (PXE), as part of a larger initiative called Wired for Management. Network cards started replacing their proprietary boot ROMs with PXE, and things looked pretty good; the venerable SYSLINUX bootloader grew aPXELINUX variant for PXE-booting Linux, and a number of enterprise system management utilities became available in PXE-bootable form.

But, for whatever reason, the standard hasn’t been updated since 1999. It still operates in terms of the ancient x86 real mode, only supports UDP and a “slow, simple, and stupid” file transfer protocol called TFTP, and officially limits boot program size to 32kB. For modern-day applications, this is less than ideal.

Luckily for us, the Etherboot Project still exists, and Etherboot’s successor gPXE has been picking up where Intel left off, and supports a number of more modern protocols. Between that, excellent support in recent Linux kernels for both accessing and serving SAN disks with high performance, and the flexibility gained by booting with an initial ramdisk, diskless booting is making a big comeback. It’s not even very hard to set up: read on!

The general idea

PXE booting flowchart

While it can get a lot more complicated to support boot menus and proprietary operating systems, the basic netbooting process these days is pretty straightforward. The PXE firmware (usually burned into ROM on the network card) performs a DHCP request, just like most networked computers do to get an IP address. The DHCP server has been configured to provide additional “options” in its reply, specifying where to find boot files. All PXE stacks support booting from a file (a network bootstrap program, NBP); PXELINUX is the NBP most commonly used for booting Linux. The NBP can call back to the PXE stack to ask it to download more files using TFTP.

Alternatively, some PXE stacks (including gPXE) support booting from a networked disk, accessed using a SAN protocol like ATA over Ethernet or iSCSI. Since it’s running in real mode, the firmware can hook the interrupt table to cause other boot-time programs (like the GRUB bootloader) to see an extra hard disk attached to the system; unbeknownst to these programs, requests to read sectors from that hard disk are actually being routed over the network.

If you want to boot a real-mode operating system like DOS, you can stop there; DOS never looks beyond the hooked interrupt, so it never has to know about the network at all. We’re interested in booting Linux, though, and Linux has to manage the network card itself. When the kernel is booted, the PXE firmware becomes inaccessible, so it falls to the initial ramdisk (initrd or initramfs) to establish its own connection to the boot server so it can mount the root filesystem.

Setting up the client

We’re going to walk through setting up network booting for a group of similar Ubuntu Lucid systems using disk images served over iSCSI. (The instructions should work with Karmic as well.) iSCSI runs on top of a TCP/IP stack, so it’ll work fine within your current network infrastructure. Even over 100Mbps Ethernet, it’s not significantly slower than a local disk boot, and certainly faster than a live CD. Rebooting may be obsolete, but short bootup times are still good to have!

You’ll want to start by installing one Ubuntu system and configuring it how you’ll want all of your diskless clients to be configured. There’s room for individual configuration (like setting unique hostnames and maybe passwords) later on, but the more you can do once here, the less you’ll have to do or script for all however-many clients you have. When they’re booted, the clients will find your networked drive just like a real hard drive; it’ll show up as /dev/sda, in /proc/scsi/scsi, and so forth, so you can pretty much configure them just like any local machine.

No matter what site-specific configuration choices you make, there are some steps you’ll need to perform to make the image iSCSI bootable. First, you’ll need to install the iSCSI initiator, which makes the connection to the server housing the boot disk image

client# aptitude install open-iscsi

That connection will need to occur during the earliest stages of bootup, in the scripts on the initial ramdisk. open-iscsi can automatically update the initramfs to find and mount the iSCSI device, but it assumes you’ll be setting a bunch of parameters in a configuration file to point it in the right place. It’s quite cumbersome to set this up separately for every node, so I have prepared a patch that will make the initramfs automatically set these values based on the “boot firmware table” created by the iSCSI boot firmware from the information provided by your DHCP server. You should apply it now with

client# wget http://etherboot.org/share/oremanj/ubuntu-iscsi-ibft.patch client# patch -p0 -i ubuntu-iscsi-ibft.patch patching file /usr/share/initramfs-tools/hooks/iscsi patching file /usr/share/initramfs-tools/scripts/local-top/iscsi

Next, tell the setup scripts you want boot-time iSCSI and regenerate the ramdisk to include your modifications:

client# touch /etc/iscsi/iscsi.initramfs client# update-initramfs -u

Finally, make sure the clients will get an IP address at boot time, so they can get to their root filesystem:

client# vi /etc/default/grub [find the GRUB_CMDLINE_LINUX line and add ip=dhcp to it; e.g. GRUB_CMDLINE_LINUX="" becomes GRUB_CMDLINE_LINUX="ip=dhcp"] client# update-grub

Setting up the storage

Let’s assume you’ve set up the prototype client as above, and you now have an image of its hard disk in a file somewhere. Because the disk-level utilities we’ll be using don’t know how to deal with files, it’s necessary to create a loop device to bridge the two:

server# losetup -v -f /path/to/ubuntu-image Loop device is /dev/loop0

If you get different output, or if the client disk image you created is already on a “real” block device (e.g. using LVM), replace /dev/loop0 with that device in the below examples.

You may be familiar with the Linux device mapper, probably as the backend behind LVM, but there’s a lot more it can do. In particular, it gives us very easy copy-on-write (COW) semantics: you can create multiple overlays on a shared image, such that writes to the overlay get stored separately from the underlying image, reads of areas you’ve written come from the overlay, and reads of areas you’ve not modified come from the underlying image, all transparently. The shared image is not modified, and the overlays are only as large as is necessary to store each one’s changes. Let’s suppose you’ve got some space in /cow that you want to use for the overlay images; then you can create five of them named/cow/overlay-1.img through /cow/overlay-5.img with

server# for i in $(seq 1 5); do > dd if=/dev/zero of=/cow/overlay-$i.img bs=512 count=1 seek=10M > done

(10M blocks * 512 bytes per block = 5GB per overlay; this represents the amount of new data that can be written “on top of” the base image.)

Now for the fun part. The aforementioned snapshot functionality is provided by the dm-snapshot module; it’s a standard part of the Linux device mapper, but you might not have it loaded if you’ve not used the snapshotting feature before. Rectify that if necessary:

server# modprobe dm-snapshot

and set up the copy-on-write like this:

server# for i in $(seq 1 5); do > loopdev=$(losetup -f) > losetup $loopdev /cow/overlay-$i.img > echo “0 $(blockdev –getsize /dev/loop0) snapshot /dev/loop0 $loopdev p 8″ | dmsetup create image-$i > done

This sequence of commands assigns a loopback device to each COW overlay file (to make it look like a normal block device) and creates a bunch of /dev/mapper/image-n devices from which each client will boot. The 8 in the above line is the “chunk size” in 512-byte blocks, i.e. the size of the modified regions that the overlay device will record. A large chunk size wastes more disk space if you’re only modifying a byte here and there, but may increase performance by lowering the overhead of the COW setup. p makes the overlays “persistent”; i.e., all relevant state is stored in the image itself, so it can survive a reboot.

You can tear down the overlays with dmsetup remove:

server# for i in $(seq 1 5); do > dmsetup remove image-$i > done

It’s generally not safe to modify the base image when there are overlays on top of it. However, if you script the changes (hostname and such) that you need to make in the overlays, it should be pretty easy to just blow away the COW files and regenerate everything when you need to do an upgrade.

The loopback device and dmsetup configuration need to be performed again after every reboot, but you can reuse the /cow/overlay-n.img files.

Setting up the server for iSCSI

We now have five client images set up to boot over iSCSI; currently they’re all passing reads through to the single prototype client image, but when the clients start writing to their disks they won’t interfere with each other. All that remains is to set up the iSCSI server and actually boot the clients.

The iSCSI server we’ll be using is called ietd, the iSCSI Enterprise Target daemon; there are several others available, but ietd is simple and mature—perfect for our purposes. Install it:

server# aptitude install iscsitarget

Next, we need to tell ietd where it can find our disk images. The relevant configuration file is/etc/ietd.conf; edit it and add lines like the following:

Target iqn.2008-01.com.ksplice.servertest:client-0 Lun 0 Path=/dev/mapper/image-0,Type=blockio Target iqn.2008-01.com.ksplice.servertest:client-1 Lun 0 Path=/dev/mapper/image-1,Type=blockio …

Each Target line names an image that can be mounted over iSCSI, using a hierarchical naming scheme called the “iSCSI Qualified Name” or IQN. In the example above, thecom.ksplice.servertest should be replaced with the reverse DNS name of your organization’s domain, and 2008-01 with a year and month as of which that name validly referred to you. The part after the colon determines the specific resource being named; in this case these are the client drives client-0, client-1, etc. None of this is required—your clients will quite happily boot images introduced as Target worfle-blarg—but it’s customary, and useful in managing large setups. The Lun 0 line specifies a backing store to use for the first SCSI logical unit number of the exported device. (Multi-LUN configurations are outside the scope of this post.)

Edit /etc/default/iscsitarget and change the one line in that file to:

ISCSITARGET_ENABLE=true

You can then start ietd with

server# /etc/init.d/iscsitarget start

To test that it’s working, you can install open-iscsi and ask the server what images it’s serving up:

server# aptitude install open-iscsi server# iscsiadm -m discovery -p localhost -t sendtargets [::1]:3260,1 iqn.2008-01.com.ksplice.servertest:client-1 [::1]:3260,1 iqn.2008-01.com.ksplice.servertest:client-2 …

Setting up DHCP

The only piece that remains is somehow communicating to your clients what they’ll be booting from; if they’re diskless, they don’t have any way to read that information locally. Luckily, you probably already have a DHCP server set up in your organization, and as we mentioned before, it can hand out boot information just as easily as it can hand out IP addresses. You need to have it supply the root-path option (number 17); detailed instructions for ISC dhcpd, the most popular DHCP server, are below.

In order to make sure each client gets the right disk, you’ll need to know their MAC addresses; for this demo’s sake, we’ll assume the addresses are 52:54:00:00:00:0n wheren is the client number (1 through 5). Then the lines you’ll need to add to /etc/dhcpd.conf, inside the subnet block corresponding to your network, look like this:

host client-1 { hardware ethernet 52:54:00:00:00:01; option root-path “iscsi:192.168.1.90::::iqn.2008-01.com.ksplice.servertest:client-1″; } host client-2 { hardware ethernet 52:54:00:00:00:02; option root-path “iscsi:192.168.1.90::::iqn.2008-01.com.ksplice.servertest:client-2″; } …

Replace 192.168.1.90 with the IP address of your iSCSI server. The syntax of the root-pathoption is actually iscsi:server:protocol:port:lun:iqn, but the middle three fields can be left blank because the defaults (TCP, port 3260, LUN 0) are exactly what we want.

Booting the clients

If your clients are equipped with particularly high-end, “server” network cards, you can likely boot them now and everything will Just Work. Most network cards, though, don’t contain an iSCSI initiator; they only know how to boot files downloaded using TFTP. To bridge the gap, we’ll be using gPXE.

gPXE is a very flexible open-source boot firmware that implements the PXE standard as well as a number of extensions: you can download files over HTTP, use symbolic DNS names instead of IP addresses, and (most importantly for our purposes) boot off a SAN disk served over iSCSI. You can burn gPXE into your network card, replacing the less-capable PXE firmware, but that’s likely more hassle than you’d like to go to. You can start it from a CD or USB key, which is great for testing. For long-term use you probably want to set up PXE chainloading; the basic idea is to configure the DHCP server to hand out your root-path when it gets a DHCP request with user class “gPXE”, and the gPXE firmware (in PXE netboot program format) when it gets a request without that user class (coming from your network card’s simple PXE firmware).

For now, let’s go the easy-testing route and start gPXE from a CD. Download this 600kB ISO image, burn it to a CD, and boot one of your client machines using it. It will automatically perform DHCP and boot, yielding output something like the below:

gPXE 1.0.0+ — Open Source Boot Firmware — http://etherboot.org Features: AoE HTTP iSCSI DNS TFTP bzImage COMBOOT ELF Multiboot NBI PXE PXEXT net0: 52:54:00:00:00:01 on PCI00:03.0 (open) [Link:up, TX:0 TXE:0 RX:0 RXE:0] DHCP (net0 52:54:00:00:00:01)…. ok net0: 192.168.1.110/255.255.255.0 gw 192.168.1.54 Booting from root path “iscsi:192.168.1.90::::iqn.2008-01.com.ksplice.servertest:client-1″ Registered as BIOS drive 0×80 Booting from BIOS drive 0×80

after which, thanks to the client setup peformed earlier, the boot will proceed just like from a local hard disk. You can eject the CD out as soon as you see the gPXE banner; it’s just being used as an oversized ROM chip here.

You’ll probably want to boot each client in turn and, at a minimum, set its hostname to something unique. It’s also possible to script this on the server side by using kpartx on the/dev/mapper/image-n devices, mounting each client’s root partition, and modifying the configuration files therein.

That’s it: if you’ve followed these instructions, you now have a basic but complete architecture for network booting a bunch of similar clients. You’ve set up servers to handle iSCSI and DHCP, set up one prototype client from which client disks can be automatically generated, and can easily scale to hosting many more clients just by increasing the number 5 to something larger. (You’d probably want to switch to using LVM logical volumes instead of file-backed loopback devices for performance reasons, though.) The number of clients you can quickly provision is limited only by the capacity of your network. And the next time one of your users decides their computer is an excellent place to stick refrigerator magnets, they won’t be creating any additional headaches for you

s2avatarsetting

standards

by

Jeff Stewart

SENCAW | AUTHOR

Another blow for Flash. As Adobe is stating that they will make the best tools for HTML5, another major website using Flash has announced they’re switching over to HTML5. Scribd, which provides in-browser access to all sorts of documents and e-books uploaded by users, will ditch its Flash-based website in favour of a brand-new HTML5 version.

Scribd is the largest website of its kind, hosting tens of millions of documents uploaded by users; a sort of YouTube for documents, if you will. Scribd works by converting uploaded documents into a what was formerly called iPaper, a PDF-like document technology for the web, which would then be displayed inside users’ browsers using Flash. Supported source document formats include any Microsoft Office or OpenOffice.org format, PDF, PostScript, rich text, and plain text.

HTML5 - The SWITCH (flash -epic fail)This is about to change, starting today. “We are scrapping three years of Flash development and betting the company on HTML5 because we believe HTML5 is a dramatically better reading experience than Flash. Now any document can become a Web page,” Scribd co-founder and CTO Jared Friedman told SENCAW.

Initially (which means today), only 200000 of the most popular documents will be made available as HTML5, but eventually, everything on Scribd will be converted to the new format – turning them into actual, real-world web pages, instead of walled-off Flash elements. “Right now the document is in a box,” Friedman said, “a Youtube-type of experience. There is a bunch of content and a bunch of stuff around it. In the new experience we are taking the content out of the box.” It allows users to completely bypass the concept of an online e-book store, and no longer will users have to download PDF files onto their mobile devices or computers. They can just go to Scribd to read Alice’s Adventures In Wonderland (if you haven’t read it yet, shame on you, you’re missing out on a vital experience) as if it were a web page. Scribd has partners such as The New York Times, New Yorker, Fortune, various publishing houses, as well as Ford, Accenture, and the FCC.

This news comes on the same day Adobe’s CTO, Kevin Lynch, stated that his company will create the best tools for HTML5. “We see whatever people are using to express themselves,” he said, “We’re going to make great tooling for HTML5. We’re going to make the best tools in the world for HTML 5.” In other words, it seems like Adobe is considering creating software designers can use to create compelling HTML5 stuff – much in the same way they today use Adobe’s software to do the same with Flash.

s2avatarsetting

standards

by

Chung-Hung Tsai

SENCAW | AUTHOR

Matlab and Octave DO support 64 bit unsigned numbers, they don’t support any mathematical operations on them. Computations in matlab/octave are limited as follows because they follow the IEEE standard for binary arithmetic:

  1. matlab does compute64 bits are allocated to a number,
  2. The LSB is N1 (to match with Matlab/Octave nomenclature), MSB is N64
  3. Then N1 is used as a sign bit
  4. N2-N13 are used to store the exponent (ranging from -1021 to 1024)
  5. The remaining bits 52 are used to store the mantissa (the fractional component)

There is no way to perform computations on unsigned 64 bit number – doing so will result in truncation. If your unsigned number exceeds 53bits you’ll begin seeing truncation of your least significant bits.

Here is one cheesy way to do it:

Create a set of functions which convert numbers to string and perform operations on those string (Next Two Code Sources from J. Franco):

Converting to a big int:

[code language="cpp"] function number = toBigInt(n);
number = '';
while n ~= 0
number = [char(mod(n,10)+'0') number];
n = floor(n/10);
end
end[/code]

Adding two big ints:

[code language="cpp"]function s3 = addBigInt(s1,s2);

if length(s1) < 1 && length(s2) < 1 s3 = '0';  % if s1,s2 == [] answer = 0
elseif length(s1) < 1 s3 = s2;        % if s1 == [] then s2 is the answer
elseif length(s2) < 1 s3 = s1;        % if s2 == [] then s1 is the answer
else
carry = 0;                         % define the carry
s3 = '';                           % define the answer
dh = max(length(s1),length(s2));   % maximum number of digits to worry about

% From least significant digit, change digit chars to numbers, add with
% carry to get new carry and new digit, convert new digit back to char
% and stick into solution.  If a number runs out of digits, use 0.
for i=1:dh
if i <= length(s1) n1 = s1(length(s1)+1-i)-'0'; else n1 = 0; end
if i <= length(s2) n2 = s2(length(s2)+1-i)-'0'; else n2 = 0; end
n = n1 + n2 + carry;            % add the ith digits of s1, s2 and carry
carry = floor(n/10);            % save the carry
s3 = [char(mod(n,10)+'0') s3];  % compute the answer digit
end
% If there is a carry at the end, change to char and stick it at front
if carry > 0 s3 = [char(carry+'0') s3]; end
end
[/code]

Get it? – perform your your operations on strings,  when necessary,  split the strings into manageable chunks and change them back to numbers with the correct exponentiation.

It’s possible to do this cleaner and more efficient– this is just a quick and dirty solution.

s2avatarsetting

standards

by

Jeff Stewart

SENCAW | AUTHOR

What is JBOD and how does it compare to RAID?

raid5-arrayWith all the new SATA boards out there, now we have options for all of the old, odd sized SATA drives hanging out on the bench currently being used as drink coasters and dispersed as independent drives. In some applications, however, it is now an optionto be able to use all these disks as if they were one single volume. The proper term for this is spanning; the pseudo-cutesy term for it, clearly chosen to contrast against “Redundant Array of Inexpensive Disks or RAID”, is; “Just A Bunch Of Disks or JBOD”. What’s next? AFTOM – A Freaking Ton of Memory?

JBOD is not RAID, but I discuss it here since it is sort of a “red headed step brother” of RAID… JBOD can be thought of as the opposite of partitioning: while partitioning chops single drives up into smaller logical volumes, JBOD combines drives into larger logical volumes. It provides absolutely no fault tolerance, nor does it provide any improvements in performance compared to the independent use of its constituent drives. (In fact, it arguably hurts performance, by making it more difficult to use the underlying drives concurrently, or to optimize different drives for different uses.)

When you look at it, JBOD doesn’t really have a lotgoing for it and it still requires a controller card or a software driver, which means that almost any system that can do JBOD can also do RAID ’0′, and RAID ’0′ has significant performance advantages over JBOD. Neither provide fault tolerance, so that’s a wash. There are only two possible advantages of JBOD over RAID ’0′:

Avoiding Drive Waste: If you have a number of odd-sized drives, JBOD will let you combine them into a single unit without loss of any capacity; a 10 GB drive and 30 GB would combine to make a 40 GB JBOD volume but only a 20 GB RAID 0 array. This may be an issue for those expanding an existing system, though with drives so cheap these days it’s a relatively small advantage.

Easier Disaster Recovery: If a disk in a RAID ’0′ volume dies, the data on every disk in the array is essentially destroyed because all the files are striped; if a drive in a JBOD set dies then it may be easier to recover the files on the other drives (but then again, it might not, depending on how the operating system manages the disks.) Considering that you should be doing regular backups regardless, and that even under JBOD recovery can be difficult, this too is a minor advantage.
And remember “spanning” and “striping” mean the same thing!

I prefer RAID 5 and RAID 0+1

raid5uiRAID combines two or more physical hard disks into a single logical unit using special hardware or software. Hardware solutions are often designed to present themselves to the attached system as a single hard drive, so that the operating system would be unaware of the technical workings. For example, if one were to configure a hardware-based RAID-5 volume using three 250GB hard drives (two drives for data, and one for parity), the operating system would be presented with a single 500GB volume. Software solutions are typically implemented in the operating system and would present the RAID volume as a single drive to applications running within the operating system.

There are three key concepts in RAID: mirroring, the writing of identical data to more than one disk; striping, the splitting of data across more than one disk; and error correction, where redundant (“parity”) data is stored to allow problems to be detected and possibly fixed (known as fault tolerance). Different RAID schemes use one or more of these techniques, depending on the system requirements. The purpose of using RAID is to improve reliability and availability of data, ensuring that important data is not harmed in case of hardware failure, and/or to increase the speed of file input/output.

Each RAID scheme affects reliability and performance in different ways. Every additional disk included in an array increases the likelihood that one will fail, but by using error checking and/or mirroring, the array as a whole can be made more reliable by the ability to survive and recover from a failure. Basic mirroring can speed up the reading of data, as a system can read different data from multiple disks at the same time, but it may be slow for writing if the configuration requires that all disks must confirm that the data is correctly written. Striping, often used for increasing performance, writes each bit to a different disk, allowing the data to be reconstructed from multiple disks faster than a single disk could send the same data. Error checking typically will slow down performance as data needs to be read from multiple places and then compared. The design of any RAID scheme is often a compromise in one or more respects, and understanding the requirements of a system is important. Modern disk arrays typically provide the facility to select an appropriate RAID configuration.

Redundancy is achieved by either writing the same data to multiple drives (known as mirroring), or collecting parity data across the array, calculated such that the failure of one disk (or possibly more, depending on the RAID scheme) in the array will not result in loss of data. A failed disk may be replaced with a good one to allow the lost data to be reconstructed from the remaining data and the parity data.

s2avatarsetting

standards

by
Singh Ryu

SENCAW | AUTHOR

The XML Signature specification allows for HMAC truncation, which may allow a remote attacker to bypass authentication.
XML Signature Syntax and Processing (XMLDsig) is a W3C recommendation for providing integrity, message authentication, and/or signer authentication services for data. XMLDsig is commonly used by web services such as SOAP. The XMLDsig recommendation includes support for HMAC truncation, as specified in RFC2104. However, the XMLDsig specification does not follow the RFC2104 recommendation to not allow truncation to less than half of the length of the hash output or less than 80 bits. When HMAC truncation is under the control of an attacker this can result in an effective authentication bypass. For example, by specifying an HMACOutputLength of 1, only one bit of the signature is verified. This can allow an attacker to forge an XML signature that will be accepted as valid.
This vulnerability can allow an attacker to bypass the authentication mechanism provided by the XML Signature specification.
Solution:
Apply an update
Please check with your vendor for available updates. Erratum E03 for the XMLDsig recommendation has been added, which specifies minimum values for HMAC truncation.
HMAC truncationThe XML Signature specification allows for HMAC truncation, which may allow a remote attacker to bypass authentication.
XML Signature Syntax and Processing (XMLDsig) is a W3C recommendation for providing integrity, message authentication, and/or signer authentication services for data. XMLDsig is commonly used by web services such as SOAP. The XMLDsig recommendation includes support for HMAC truncation, as specified in RFC2104. However, the XMLDsig specification does not follow the RFC2104 recommendation to not allow truncation to less than half of the length of the hash output or less than 80 bits. When HMAC truncation is under the control of an attacker this can result in an effective authentication bypass. For example, by specifying an HMACOutputLength of 1, only one bit of the signature is verified. This can allow an attacker to forge an XML signature that will be accepted as valid.
This vulnerability can allow an attacker to bypass the authentication mechanism provided by the XML Signature specification.
Solution:
Apply an update
Please check with your vendor for available updates. Erratum E03 for the XMLDsig recommendation has been added, which specifies minimum values for HMAC truncation.

s2avatarsetting

standards

by
Jeff Stewart

SENCAW | AUTHOR

    Here’s a simple example of a script that sniffs an ethernet line for all TCP/IP packets bound to/from a particular host and dumps out the source/destination IP address/port and a hex dump of the packet’s contents:

perl snifferHere’s a simple example of a script that sniffs an Ethernet line for all TCP/IP packets bound to/from a particular host and dumps out the source/destination IP address/port and a hex dump of the packet’s.

#!/usr/bin/perl -w
use strict;
use Net::PcapUtils;
use NetPacket::Ethernet;
use NetPacket::IP;
use NetPacket::TCP;
use Data::HexDump;
Net::PcapUtils::loop(\&process_pkt, FILTER => 'ip host 192.168.1.252')
+;
my $i=0;
sub process_pkt {
  my ($user_data,$hdr,$pkt)=@_;
  my $eth=NetPacket::Ethernet->decode($pkt);
  if($eth->{type} == 2048){
    my $ip=NetPacket::IP->decode($eth->{data});
    if($ip->{proto} == 6){
      my $tcp=NetPacket::TCP->decode($ip->{data});
      print "\n\n$i $ip->{src_ip}($tcp->{src_port}) -> $ip->{dest_ip}(
+$tcp->{dest_port})\n";
      print HexDump $ip->{data};
      $i++;
    }
  }
}
simple-pearl-snifferABSTRACT by Chung-Hung Tsai
Department of Computer Science and Information Engineering,
National Chiao Tung University As a large and complex application platform, the World Wide Web is capable of delivering a broad range of sophisticated applications. However, many Web applications go through rapid development phases with extremely short turnaround time, making it difficult to eliminate vulnerabilities. Here we analyze the design of Web application security assessment mechanisms in order to identify poor coding practices that render Web applications vulnerable to attacks such as SQL injection and cross-site scripting. We describe the use of a number of software-testing techniques (including dynamic analysis, black-box testing, fault injection, and behavior monitoring), and suggest mechanisms for applying these techniques to Web applications. Real-world situations are used to test a tool we named the Web Application Vulnerability and Error Scanner (WAVES, an open-source project available at http://waves.sourceforge.net) and to compare it with other tools. Our results show that WAVES is a feasible platform for assessing Web application security. More
ABSTRACT by Chung-Hung Tsai
Department of Computer Science and Information Engineering, National Chiao Tung Universityapplication_vulnerability
As a large and complex application platform, the World Wide Web is capable of delivering a broad range of sophisticated applications. However, many Web applications go through rapid development phases with extremely short turnaround time, making it difficult to eliminate vulnerabilities. Here we analyze the design of Web application security assessment mechanisms in order to identify poor coding practices that render Web applications vulnerable to attacks such as SQL injection and cross-site scripting. We describe the use of a number of software-testing techniques (including dynamic analysis, black-box testing, fault injection, and behavior monitoring), and suggest mechanisms for applying these techniques to Web applications. Real-world situations are used to test a tool we named the Web Application Vulnerability and Error Scanner (WAVES, an open-source project available at http://waves.sourceforge.net) and to compare it with other tools. Our results show that WAVES is a feasible platform for assessing Web application security.  More
injectionInsider and Ousider Threat-Sensitive SQL Injection Vulnerability Analysis in PHP
Ettore Merlo; Dominic Letarte; Giuliano Antoniol
Summary:
In general, SQL-injection attacks rely on some weak validation of textual input used to build database queries. Maliciously crafted input may threaten the confidentiality and the security policies of Web sites relying on a database to store and retrieve information. Furthermore, insiders may introduce malicious code in a Web application, code that, when triggered by some specific input, for example, would violate security policies. This paper presents an original approach based on static analysis to automatically detect statements in PHP applications that may be vulnerable to SQL-injections triggered by either malicious input (outsider threats) or malicious code (insider threats). Original flow analysis equations, that propagate and combine security levels along an inter-procedural control flow graph (CFG), are presented. The computation of security levels presents linear execution time and memory complexity More
Insider and Ousider Threat-Sensitive SQL Injection Vulnerability Analysis in PHP
Ettore Merlo; Dominic Letarte; Giuliano Antoniol
Summary:
injectionIn general, SQL-injection attacks rely on some weak validation of textual input used to build database queries. Maliciously crafted input may threaten the confidentiality and the security policies of Web sites relying on a database to store and retrieve information. Furthermore, insiders may introduce malicious code in a Web application, code that, when triggered by some specific input, for example, would violate security policies.
This paper presents an original approach based on static analysis to automatically detect statements in PHP applications that may be vulnerable to SQL-injections triggered by either malicious input (outsider threats) or malicious code (insider threats). Original flow analysis equations, that propagate and combine security levels along an inter-procedural control flow graph (CFG), are presented. The computation of security levels presents linear execution time and memory complexity
More

s2avatarsetting

standards

by
Gary Wassermann

SENCAW | AUTHOR

ABSTRACT by Gary Wassermann
Department of Computer Science
University of California, Davis
Software systems interact with outside environments (e.g., by taking inputs from a user) and usually have particular assumptions about these environments. Unchecked or im- properly checked assumptions can affect security and reli- ability of the systems. A major class of such problems is the improper validation of user inputs. In this paper, we present the design of a static analysis framework to address these input related problems in the context of web applica- tions. In particular, we study how to prevent the class of SQL command injection attacks. In our framework, we use an abstract model of a source program that takes user in- puts and dynamically constructs SQL queries. In particular, we conservatively approximate the set of SQL queries that a program may generate as a finite state automaton. Our framework then applies some novel checking algorithms on this automaton to indicate or verify the absence of security violations in the original application program. Work is in progress to build a prototype of our analysis. Mor
Department of Computer Science
University of California, Davis
Gary Wasserman
Software systems interact with outside environments (e.g., by taking inputs from a user) and usually have particular assumptions about these environments. Unchecked or im- properly checked assumptions can affect security and reli- ability of the systems. A major class of such problems is the improper validation of user inputs. In this paper, we present the design of a static analysis framework to address these input related problems in the context of web applica- tions. In particular, we study how to prevent the class of SQL command injection attacks.
In our framework, we use an abstract model of a source program that takes user in- puts and dynamically constructs SQL queries. In particular, we conservatively approximate the set of SQL queries that a program may generate as a finite state automaton. Our framework then applies some novel checking algorithms on this automaton to indicate or verify the absence of security violations in the original application program. Work is in progress to build a prototype of our analysis.
More