pabs3 is currently certified at Master level.

Name: Paul Wise
Member since: 2005-06-22 15:16:22
Last Login: 2012-09-04 13:45:48

FOAF RDF Share This

Homepage: http://bonedaddy.net/pabs3/

Notes:

Recent blog entries by pabs3

Syndication: RSS 2.0

Join the Process Identifier Preservation Society today!

Process Identifiers (PIDs) are a scarce resource. On Linux they are only 15 bits by default. The Process Identifier Preservation Society (PIPS) aims to reduce abuse and wastage of the PID space. To join the society please read the following advice.

Common issues

Several languages generally allow you to run all your code in one process. Some of the code that you might want to incorporate or use is not available in the form of ELF libraries or language specific libraries but only in the form of ELF binaries or interpreted scripts. As a result using additional PID space is sometimes unavoidable. Many languages have multiple methods of starting external processes and usually some of them waste PID space by running commands in a shell. You can avoid those methods or use the exec builtin to preserve the shell PID. It might be tempting to explicitly use shell in languages that don't allow implicit shell use but that just wastes extra PIDs.

Several languages allow you to fork one process into two, this uses an extra PID and is to be avoided unless nessecary.

Shell

Programs written in the shell languages use a lot of PIDs. Even shells that have a lot of shell builtins (like busybox sh) appear to use the PID space by forking a child process. To join PIPS you should just stop writing programs in shell or use as many builtins as possible and use exec to preserve PIDs.

Init

Several init systems are written in or use shell extensively and thus eat huge bowls of PIDs for breakfast. To join the PIPS you should switch away from sysvinit, openrc, init=/bin/sh etc.

C/C++

The common issues section applies to the C/C++ language. To join PIPS you should rewrite your code to use fork()+exec() or libpipeline instead of the system() and popen() functions.

Perl

The common issues section applies to the Perl language. To join PIPS you should rewrite your code to avoid backticks and only pass arrays to the system(), open(), open2(), open3() functions.

PHP

The common issues section applies to the PHP language. To join PIPS you should rewrite your code to use pcntl_exec() instead of backticks, exec(), system(), passthru(), shell_exec(), popen() and proc_open(). Apparently pcntl_exec() is disabled by default on Debian and pcntl_* are often unavailable so you should just not spawn processes. You could also just drop PHP already.

Python

The common issues section applies to the Python language. To join PIPS you should rewrite your code to use the subprocess module and avoid passing shell=True to the subprocess.Popen() function. The os.system(), os.popen() functions and the commands module all run their commands in a shell, wasting PID space. The popen2 module requires passing arrays instead of strings in order to avoid the command being run in a shell.

Haskell

The common issues section applies to the Haskell language. To join PIPS you should only ever pass a RawCommand to createProcess and never use the shell, system, runCommand or runInteractiveCommand functions from the System.Process and System.Cmd libraries.

OCaml

The common issues section applies to the OCaml language. To join PIPS you should rewrite your code to use fork+exec or the create_process* wrappers instead of system, open_process, open_process_in, open_process_out and open_process_full.

Go

Go allows running external processes but doesn't allow you to waste PID space by running commands in shell. Avoid explicitly running the shell though.

Rust

Rust allows running external processes but doesn't allow you to waste PID space by running commands in shell. Avoid explicitly running the shell though.

Erlang

The common issues section applies to the Erlang language. To join PIPS you should rewrite your code to use erlang:open_port({spawn_executable, ...}, ...) instead of os:cmd or the other options to erlang:open_port.

Node.js

The common issues section applies to the Node.js language. To join PIPS you should rewrite your code to use the child_process.execFile() function (or other child_process functions) instead of child_process.exec().

Julia

Julia allows running external processes but doesn't allow you to waste PID space by running commands in shell. It emulates a lot of shell features instead. Avoid explicitly running the shell though.

Dart

The common issues section applies to the Dart language. To join PIPS simply do not enable the runInShell parameter of the Process object.

PS

Let me know if I missed something in one of these languages. You should also do most of the above to avoid shell metacharacter injection attacks that usually allow arbitrary code execution. Dear language authors, don't allow running external processes in shell, kthxbye!

Syndicated 2014-02-17 03:38:47 from Advogato

OpenPGP keysigning: alternate encodings for fingerprint exchange

I think that hexadecimal is a fairly poor pre-encoding for information exchange via data to speech and speech to data engines (aka voice boxes, brains and fingers). Reading out and typing long strings of hexadecimal digits at OpenPGP keysignings is tedious and annoying.

There have been some experiments using photography and QR codes for this, which I think is pretty cool but not always practical since not everyone has a camera and QR code software installed.

An alternative to this might be to pre-encode using a different scheme that encodes to less words in English speech. Diceware is one possibility that I recently experimented with. Diceware is a password generation scheme that encodes data from a random number generator (aka some dice) using a list of 7776 words. Each word thus represents a 5 digit number in base 6. Diceware is mainly used for generating strong and easier to remember passwords. So Diceware is the coupling between a non-digital random number generator and an interesting encoding scheme.

Below are my fingerprints in Diceware and Hexadecimal form. The Diceware form is longer to type at 69 characters, 40 for hex. The Diceware form has the advantage that it is only 16 words to say while the hexadecimal form is 40. I don't know if this will be more practical than hex but I can almost remember my entire fingerprint after reading it a few times so hopefully that will translate to practical use. A rough script for encoding your fingerprint in the Diceware encoding is available but I haven't implemented the reverse yet. I would be glad if someone could check it for correctness.

  Diceware:    frame maze bear usgs deter wag prissy bush hoyt mayo upton child indy
Hexadecimal: 610B 28B5 5CFC FE45 EA1B  563B 3116 BA5E 9FFA 69A3

If you want to discuss this topic and try it out in person and attempt to understand my accent, I'll be at DebConf13 and OHM2013. Some downsides that I can think of are accents, multiple spellings and the inclusion of non-words and special characters in the wordlist. These can be solved by using a different wordlist created specifically for OpenPGP fingerprint exchange that only includes suitable words.

This post was inspired by the screenshots for RedPhone. You can comment on this post on debian-project.

Syndicated 2013-06-28 05:42:59 from Advogato

23 Feb 2013 (updated 10 Apr 2013 at 09:09 UTC) »

Inadequate software

Just 168 of the 4961 packages (3%) I have installed are inadequate. Unfortunately those packages collectively have 3440 inadequacies. How much of the software on your system has these inadequacies?

  • broken symlinks
  • missing copyright files
  • obsolete conffiles
  • Python modules not byte-compiled
  • /bin and /sbin binaries requiring /usr/lib libraries
  • undefined symbols.

You can find out today by installing Jakub Wilk's software, which is appropriately named adequate. It is now available in Debian experimental. I recommend enabling the apt hook which notifies you when software you are installing is inadequate. Other ways of being notified when you are installing inadequate software include apt-listbugs and debsecan.

If you are interested in software quality, Debian's QA activities wiki page provides a good overview of the quality assurance activities that are being worked on within the context of Debian. If you want to provide better quality software for Debian, please keep an eye on the PTS pages for software you maintain. You can also run various automated checks on your software before you make new releases or upload them to the Debian archive.

More people are needed to improve and expand upon Debian's existing quality assurance activities and infrastructure. Come join us today!

Syndicated 2013-02-23 07:07:17 (Updated 2013-04-10 09:09:33) from Advogato

Debian on mobile devices

Debian on Samsung Galaxy S

It is possible to put Debian on smartphones like the Samsung Galaxy S:

  • Find a friendly Android distro that supports your device, install it with fastboot or heimdall and play around.
  • Be sad that the proprietary bootloader doesn't support dual boot.
  • Reformat the "sdcard" as ext3 and install Debian in a chroot on it.
  • "Tether" your device via USB using the Android settings menu & add a default route with adb: adb shell ip add route default via 192.168.XXX.XXX. Then use one or other USB network script on your PC.
  • Install OpenSSH, copy some commands from the usb.rc to /etc/rc.local so that you will have a way to access your Debian system over USB.
  • Hack up the initramfs to mount the sdcard partition and then run the Debian init in the chroot instead of the Replicant init.
  • Install some sort of graphical environment such as Enlightenment and nodm.
  • Realise that the touchscreen driver is buggy, which means that udev and thus Xorg do not recognise it as an input device. Find out that the same device seems to also be supported by a different driver that is in Linux mainline. Boggle.
  • Work around the buggy touchscreen driver by using x2x (orphaned) to send your laptop input devices over SSH to Xorg running on the phone.
  • Click through the Enlightenment startup wizard, work around desktop-base not supporting E17 and install a touchscreen-friendly app like intone.
  • Marvel at the speed and flashyness of Enlightenment even though it does not use OpenGL because there are no open drivers for PowerVR devices.
  • Take a photo and blog about it to create some bzzt.
  • Get depressed about the rediculousness of all that and proceed to drinking over 9000 litres of beer.
  • Think about just using Replicant plus f-droid.

Linux mainline doesn't run on any of the mobile devices I have. It probably doesn't run on any of the mobile devices you have either. There has been some effort by the OpenMoko community to merge the gta02 kernel patches but it is not yet complete. I doubt Samsung will spend money on merging support for old devices obsoleted by more recent devices. There is Linaro but they are focused on things the hardware vendors pay them for and probably would not have the resources anyway. Therefore I would guess the timeframe for supporting the OpenMoko FreeRunner and the Samsung Galaxy S in Linux mainline is between many years and never. For better or worse, the Debian Linux kernel maintainers prefer not to include non-mainline stuff and Debian as a whole generally prefers to include one copy of each package instead of 9. The procedures I documented above are not a great way to support mobile devices at all and could break at any moment anyway. So everyone, please become a kernel developer and help merge all of the many many versions of Android Linux into Linux mainline so that you can have your favourite distribution on your devices.

Syndicated 2012-12-03 03:39:07 from Advogato

62 older entries...

 

pabs3 certified others as follows:

  • pabs3 certified pabs3 as Apprentice
  • pabs3 certified frob as Journeyer
  • pabs3 certified rc as Journeyer

Others have certified pabs3 as follows:

  • pabs3 certified pabs3 as Apprentice
  • wingo certified pabs3 as Apprentice
  • richdawe certified pabs3 as Apprentice
  • lerdsuwa certified pabs3 as Apprentice
  • mpr certified pabs3 as Apprentice
  • zx80user certified pabs3 as Apprentice
  • rc certified pabs3 as Journeyer
  • yosch certified pabs3 as Master
  • glasseyes certified pabs3 as Journeyer
  • codehelp certified pabs3 as Journeyer
  • badvogato certified pabs3 as Journeyer

[ Certification disabled because you're not logged in. ]

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

X
Share this page