Bric à brac
Un article de Haypo.
Cet espace me sert de bloc à note, et j'y inscrit tout et n'importe quoi. C'est un espace plus ou moins temporaire, mais peut-être que vous y trouverez des informations pertinentes ?
[modifier] Edenwall
- https://github.com/regit/pynetfilter_conntrack
- https://github.com/haypo/nufw_mirror
- https://github.com/haypo/macfly
- http://linuxfr.org/users/moules/journaux/edenwall-la-descente-aux-enfers
- http://people.symlink.me/~rom1/inl/
[modifier] Python, OpenIndiana
pkg install mercurial pkg install gcc-3 pkg install header-math
[modifier] Bugs
[modifier] Hardware
- CPU heat
- memory errors
mcelog
MCE 0 CPU 0 THERMAL EVENT TSC 198d1eb8325 TIME 1304222195 Sun May 1 05:56:35 2011 Processor 0 heated above trip temperature. Throttling enabled. Please check your system cooling. Performance will be impacted STATUS 8801000f MCGSTATUS 0 MCGCAP 806 APICID 0 SOCKETID 0 CPUID Vendor Intel Family 6 Model 23 HARDWARE ERROR. This is *NOT* a software problem! Please contact your hardware vendor
[modifier] Kernel bugs
- Linux 2.6.37, test_os
- Linux < 2.6.23, O_CLOEXEC
- Mac OS X, mmap
- Windows, ?
[modifier] libc bugs
- printf()
[modifier] Scope
- System
- The file system
- Named mutexes
- mmap() MAP_SHARED
- Process
- Locale: Windows allows to set the ANSI code page of a thread which can be different than the system ANSI code page (CP_THREAD_ACP vs CP_ACP)
- Current directory
- Mutex, semaphore
- Heap memory
- mmap() MAP_PRIVATE
- Thread
- Thread local storage (TLS)
- Stack memory
[modifier] Signals
- signal handler
- no malloc(): use the stack
- no printf(): write() + manual formatting of integers (base 10, 16)
- WARNING: data "shared" with the process, like the configuration: no realloc()
- save/restore errno
- signal handler: example of function not async-safe
- http://bugs.python.org/issue11768: signal_handler() is not reentrant: deadlock in Py_AddPendingCall() (http://hg.python.org/cpython/rev/319f7af9ee5e)
- SA_RESTART
- http://lwn.net/Articles/415712/
- it's not implemented appropriately everywhere (Linux is pretty good but Solaris, for example, is pretty bad)
- One assumes that signalfd() would not interrupt system calls
- http://lwn.net/Articles/415712/
- sigaltstack(), SA_ONSTACK
- Call previous handler
- signal prototype
- System signal handler and SIGSEGV on Windows
- SA_NODEFER
- register() not available on Windows: only SIGSEGV, SIGABRT and SIGILL can be handled by the process
- SetConsoleCtrlHandler() for CTRL+c and CTRL+break on Windows
- Threads and ptread_sigmask()
- Python
- PyGILState_GetThisThreadState() vs PyThreadState_Get()
- pending signals
- pthread_sigmask()
- Threads : pthread_kill(), Tcl "hidden" thread
- signalfd, wakeup fd
- signalfd
- Real time signals
- Ordered
- Pending: can be called more than once
- fork
- sigwait() behaves different on FreeBSD 6 after a fork, kernel bug? http://bugs.python.org/issue12303#msg139340
- http://bugs.python.org/issue11870
- Others
- PowerPC doesn't raise SIGFPE on a division by zero
- Signals is the WORST part of Unix
- Ghosts of Unix past, part 3: Unfixable designs
[modifier] Multidesk OS et LoseThos
- http://www.prince-warrior.com/index-3.php
- http://bluetouff.com/2010/10/24/multideskos-est-de-retour/
- http://www.system-livingos.org/
- http://www.losethos.com/
[modifier] Locales Ubuntu
- less /usr/share/i18n/SUPPORTED
- sudo vim /var/lib/locales/supported.d/local
- sudo dpkg-reconfigure locales
[modifier] Installer Fedora
yum install less screen vim-enhanced yum install nc yum install mercurial git-core yum install make gcc gdb yum install bzip2-devel ncurses-devel openssl-devel readline-devel sqlite-devel yum install @kde-desktop yum install yum-utils # yum-builddep
[modifier] Réinstaller Debian
apt-get install screen vim-gtk apt-get install subversion mercurial git-core git-svn manpages-dev exuberant-ctags meld apt-get install gdb strace ltrace lsof valgrind apt-get build-dep python2.6 apt-get install rst2pdf apt-get install chromium-browser mplayer apt-get install python-qt4 python-m2crypto python-ipy qt4-dev-tools pyqt4-dev-tools
[modifier] overip
[modifier] ANSI escape code
Séquences d'échappement :
- VT100
- ANSI escape code
- ansicode.txt
- Déplacer le curseur :
- "\r" : Retour au début de la ligne (n'efface pas les caractères)
- "\033[y;xH" : déplacer le curseur
- s et u ("\033[s", "\033[u") : sauver/restaurer la position du curseur
- Effacer des caractères :
- "\b" : Supprimer le caractère précédent
- "\033[2J" : effacer tout l'écran
- "\033[M" : effacer depuis le début de la ligne jusqu'au curseur (sans déplacer le curseur)
- "\033[K" : effacer depuis le curseur jusqu'à la fin de la ligne
- Couleur / mise en forme du texte :
- "\033[1m" : écrire en gras
- "\033[30m", "\033[31m", ..., "\033[37m" : changer la couleur du texte
- "\033[40m", "\033[41m", ..., "\033[47m" : changer la couleur de fond
- "\033[0m" : restaurer les attributs par défaut
- Mode 8 bits
- "\033[?1034h" : Activer le mode 8 bits
- "\033[?1034s", "\033[?1034r" : Sauver / restaurer le mode 8 bits
- Terminal vt102
En Python : module termios.
[modifier] Droit d'auteur
Article L113-8 du code de la propriété intellectuelle : « Sauf dispositions statutaires ou stipulations contraires, les droits patrimoniaux sur les logiciels et leur documentation créés par un ou plusieurs employés dans l'exercice de leurs fonctions ou d'après les instructions de leur employeur sont dévolus à l'employeur qui est seul habilité à les exercer. »
Moral : droit qu'on ne peut céder, protège l'image de l'auteur. Il peut s'en servir pour interdire la diffusion de son oeuvre.
Patrimonial : en gros, droit d'exploitation de l'oeuvre.
http://fr.wikipedia.org/wiki/Droit_d'auteur
changement de licence :
FSF et KDE exigent de céder son droit d'auteur [3]
[modifier] SPAM
[modifier] Attaque
[modifier] Physique
- Matériel : carte mère, processeur, mémoire, etc.
- Bug dans le silicium : bug dans le processeur ? voir errata Intel/AMD
- Fuite d'information : chaleur, émission électromagnétique, consommation électrique, bruit
- Injection de faute : via l'horloge, l'alimentation électrique, la lumière (laser), etc.
[modifier] Logicielle
- Firmware
- BIOS
- Hyperviseur
- Bug 32/64 bit d'un hypercall dans la Xbox 360
- Noyau
- GDI est dans le noyau Windows ! Voir bugs WMF/EMF
- Fuzzing appel système : sysfuzz, ioctlfuzz
- Bug d'un pilote : fuzzing système de fichier par ex.
- libc
- bibliothèques : libc, libxml, zlib, libx11, etc.
- machine virtuelle : JVM, Python, Perl, etc.
- serveur graphique
- applications
[modifier] Rsync
rsync :
sudo rsync \
--exclude /dev \
--exclude /proc \
--exclude /sys \
--exclude /tmp \
-a --update \
/ haypo@lisa:/data/marge
tar (envoi) :
sudo tar \ --exclude=/dev \ --exclude=/proc \ --exclude=/var/run \ --exclude=/sys \ --exclude=/sys \ -c / \ | nc lisa 12345
tar (réception) :
nc -l 0.0.0.0 12345|tar -x
[modifier] Blog utilisant un (D)VCS
- Intéressants :
- À trier :
- Ikiwiki : Perl, svn ou git, très moche
- Solution maison : reST + Sphinx + script pré/post commit. Menu et moteur de recherche intégré
- http://www.wikimatrix.org/
- développer un moteur à partir de zope
- MoinMoin
- Fonctionnalités requises :
- Éditable hors ligne (vim)
- Éditable en ligne (HTTP)
- Prévisualisation : au minimum pour l'édition en ligne
- Vérification de la syntaxe
- Insérer des images, redimensionnement automatique des images
- Syntaxe texte plat (syntaxe préféée : Wiki Créole)
- Historique
- Génération d'un sommaire dans une page
- Génération d'un menu
- Fonctionnalités souhaitables :
- Moteur de recherche
[modifier] Intel GMA 500 (Poulsbo)
[modifier] Info sur le matériel
- contrôleur intégré au jeu de composants (lui-même intégré à la carte mère)
- Mobile Intel IGPs, technology was licensed from PowerVR
- le GPU est un collage entre un i810 et un powervr SGX
- ne convient pas aux jeux 3D en raison de la faible fréquence d'horloge (100-200 MHz UL11L - US15) et des 4 shaders seulement. Le décodeur vidéo intégré accélère la lecture de vidéos HD (MPEG2, VC-1, AVC)
[modifier] Ordinateurs équipés de Poulsbo
- Dell Mini 12 : vendu sous Ubuntu
- Asus Eee PC 1101 HA : vendu sous Windows XP
- Eee PC T91
- MSI Wind U115
- Dell Inspiron Mini 10
- Packard Bell Dot M
- Acer Aspire One 751h
- Sony Vaio P.
- Archos 9 (chipset Poulsbo US15W)
[modifier] OS
- Mandriva : x11-driver-video-psb 0.31.0
- Debian : (no package yet) #533450 - ITP: xserver-xorg-video-psb
- Fedora : paquets pour Fedora 11 dans RPMFusion, travail d'Adam Williamson
- Ubuntu :
- Hardy : xserver-xorg-video-psb 0.2.1
- Karmic ? PPA for Nicolas DERIVE (xserver-xorg-video-psb, libva, ...)
- http://doc.ubuntu-fr.org/poulsbo
- https://wiki.ubuntu.com/HardwareSupportComponentsVideoCardsPoulsbo
[modifier] Pilote
- Pilote développé par Tungsten Graphics
- Dépôts git :
- http://koldfront.dk/gitweb?p=psb;a=summary : The Ubuntu Mobile Team Jaunty PPA packages modified for Debian unstable, dernier commit le 8 Jul 2009
- http://git.moblin.org/cgit.cgi/deprecated/psb-kmd/ : premier commit le 2007-07-05, dernier commit le 2008-03-13
- http://git.moblin.org/cgit.cgi/deprecated/xf86-video-psb/ : premier commit le 2007-02-19, dernier commit le 2008-03-11
- Paquet Ubuntu : xserver-xorg-video-psb
- Adam Williamson (AdamW) et Fedora
[modifier] Eee PC 1101HA
[modifier] Linux
[modifier] Matos
- CPU : Intel Atom CPU Z520 @ 1.33 GHz
- hyperthreading (1 coeur, 2 threads)
- Intel SpeedStep
- SSSE3
- 16 stage in-order pipeline
- Wifi : Atheros AR9285 Wireless
- Ethernet : Attansic (device 1062)
- Vidéo : Intel Poulsbo, GMA 500
- unified architecture
- supports 3.0+ Shaders
- hardware support for decoding of the H.264, MPEG2, MPEG4, VC1, and WMV9 formats
- Audio : (SCH Poulsbo) HD Audio Controller
- PCI : 8086:811b
00:1b.0 Audio device: Intel Corporation System Controller Hub (SCH Poulsbo) HD Audio Controller (rev 07) Subsystem: ASUSTeK Computer Inc. Device 83ce Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0, Cache Line Size: 32 bytes Interrupt: pin A routed to IRQ 23 Region 0: Memory at f3f38000 (64-bit, non-prefetchable) [size=16K] Capabilities: [50] Power Management version 2 Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold-) Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- Capabilities: [70] Express (v1) Root Complex Integrated Endpoint, MSI 00 DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us ExtTag- RBE- FLReset- DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported- RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop- MaxPayload 128 bytes, MaxReadReq 128 bytes DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend+ LnkCap: Port #0, Speed unknown, Width x0, ASPM unknown, Latency L0 <64ns, L1 <1us ClockPM- Surprise- LLActRep- BwNot- LnkCtl: ASPM L0s Enabled; Disabled- Retrain- CommClk- ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- LnkSta: Speed unknown, Width x0, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt- Capabilities: [100] Virtual Channel <?> Capabilities: [130] Root Complex Link <?> Kernel driver in use: HDA Intel Kernel modules: snd-hda-intel 00: 86 80 1b 81 06 00 10 00 07 00 03 04 08 00 00 00 10: 04 80 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 43 10 ce 83 30: 00 00 00 00 50 00 00 00 00 00 00 00 06 01 00 00
- Adi 1986
- ALC269
- Chipset : Poulsbo
- GMA graphics circuit (based on a PowerVR architecture)
- HD video playback
- memory controller
- HD Audio circuit (simplified, capable of operating only in two channels)
- P-ATA controller (Ultra DMA 5, 100 MB/s)
- two PCI-Express lanes
- three SDIO/MMC controllers
- support for 8 USB ports
Notes :
- SCH : System Controller Hub
[modifier] Ubuntu locales
* Ajouter la ligne "fr_FR@euro ISO-8859-15" au fichier /var/lib/locales/supported.d/fr * Lancer "dpkg-reconfigure locales" en root

