Skip to main content

Posts

SELinux: How to create a CIL from a TE file

For a project, I needed to compile and install a SELinux module only when necessary. Unfortunatelly, there is no versioning on stored modules; I can't check and compare with the source module. I came up with an idea: using MD5 signatures. Modules are stored in /var/lib/selinux/ Policy /active/modules/400/ ModuleName /cil The Policy can be found with sestatus : # sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted ... Stored modules are actually compressed CIL, which can easily been dumped with bzcat : # bzcat /var/lib/selinux/targeted/active/modules/400/my-httpd/cil (typeattributeset cil_gen_require httpd_t) (typeattributeset cil_gen_require default_t) (typeattributeset cil_gen_require sysstat_log_t) (typeattributeset cil_gen_require usr_t) (allow httpd_t usr_t (file (write create unlink setattr))) (allow httpd_t default_t (file (open re...

Une semaine à Washington

Profitant d'une semaine de vacances, nous avons décidé de la passer dans la capitale américaine. Nous y avions déjà passé un week-end il y a quelques années, mais jamais aussi longtemps. J'ai un lien particulier avec Washington car un oncle y a longtemps travaillé (ils habitaient Alexandria, juste au sud). Washington est une belle ville. Son plan a été déssiné originellement par Pierre-Charles l'Enfant, mais à cause de son intransigeance et son caractère irrascible, ce dernier a été remercié avant la fin du projet. Néanmoins, ses plans dans l'ensemble ont été assez bien respectés. L'emplacement était un terrain isolé, fait de de forêts et de marécages, choisi car étant situé à peu près au milieu des états d'origine; dès le début, la ville avait une vocation admi...

Calculer un pourcentage

"Pfff! Les prix n'arrêtent pas d'augmenter. Regarde ça. Depuis l'année dernière ça a augmenté de..., enfin de ... de quel pourcentage en fait ?" Pour calculer un pourcentage d'augmentation, la formule est: Par exemple, si ce qui coûtait 275 $ l'année dernière coute cette année 325 $, ça représente une augmentation d'un peu moins de 18.2 %:

La vérité sur l'affaire Harry Quebert

Durant mes vacances, j'ai lu La vérité sur l'affaire Harry Quebert , de Joel Dicker. 844 pages, que j'ai dévoré en quelques jours. Ce bouquin est une mise en abîme, le livre portant sur l'écriture d'un livre intitulé ... la vérité sur l'affaire Harry Quebert . L'action se passe en 2008, avec des flashback en 2002, dans les années 90, en 1975, et même en 1969. Le livre met en scène un écrivain (inspiré par Stephen King ?), Marcus Goldman, qui vit une crise de la page blanche après le succès de son premier livre. Crise accentuée par la pression de Roy Barnaski, son éditeur, personnage impétueux et détestable, mais qui réussi à nous asséner quelques leçons sur la réalités du marché de l'édition. Marcus téléphone donc à son ancien professeur, devenu mentor et ami, Harry Quebert qui l'invite dans sa propriété de Goose Cove de la petite ville d'Aurora, Massachussets. Harry Quebert, professeur à l'unversité de Concord, est une célébrité loc...

Behringer X32/Midas M32 config.bak

Warning The info in the blog are based on my own experience and for information only. If you f**k up your board by editing the file, it's your choice and your responsability. Introduction The X32/M32 core engine is a PC board running a customized Linux. What is cool with this is most configuration files are actually text files, that can be stored on an USB bey and edited. If you know a little bit of vi and awk , you can edit the files directly. console.bak This file contains a backup of the board configuration (all parameters). It's a text file, divided in multiple sections. Links How a channel (odd) is linked to the next one (even). There is one toggle ( ON or OFF ) for 2 channels. /config/chlink ON ON ON OFF ON ON OFF OFF ON ON ON ON ON OFF ON OFF /config/auxlink ON ON ON ON /config/fxlink ON ON ON ON /config/buslink ON ON ON ON ON ON OFF OFF /config/mtxlink ON OFF OFF For example, ON on the first position indicates Channel 1 and 2 are linked: /config/chlink ...

Issue with Soundpool MO4

I have a Atari STe with a Soundpool MO4 MIDI extension. It used to work very well, but unfortunatelly doesn't anymore: Cubase still detects it, and I can output MIDI to it but nothing is coming out from any MIDI Out. It took me a while to tackle it (lack of time, lack of tool, other items to play with), but I gave a glance last week-end. The parallel port on the Atari uses only the following signals: Pin 1 : Strobe (Atari -> MO4) Pin 2 : Data 0 (Atari -> MO4) Pin 3 : Data 1 (Atari -> MO4) Pin 4 : Data 2 (Atari -> MO4) Pin 5 : Data 3 (Atari -> MO4) Pin 6 : Data 4 (Atari -> MO4) Pin 7 : Data 5 (Atari -> MO4) Pin 8 : Data 6 (Atari -> MO4) Pin 9 : Data 7 (Atari -> MO4) Pin 11: Busy (MO4 -> Atari) The MO4 also decodes few other pins, but since the Atari doesn't, my guess is the MO4 was also targeted for PC. Inside the box, the MO4 is architectured around a CPLD (IspLSI1016 from Lattice) which contains the logi...

Compiling TSE3 on Raspberry Pi

Goal and background This project is a follow up on my previous project to emulate a floppy disk controller for the Yamaha QX1. The new goal is to study the possibility to replace the entire motherboard with a custom board and a Raspberry Pi. Doing so should provide: An upgradable system USB STM32F103C8T6 Blue pill as 8 channel UART (bit banging) 8 * ATTiny4313 128 concurrent MIDI channels (8*16), instead of only 8 More and non-volatile memory (with a F-RAM from Cypress Semiconductor such as FM24V05-GTR) Better workflow with less confirmation message Ability to connect a PC keyboard, USB Key, Monitor, ... Identified steps Compile the sequencer engine (TSE3) Program a 8 channel bit banging UART (MIDI out) and the embedded UART (for MIDI In) on the Blue pill Program a basic SPI protocol between the RPI and Blue pill Connect the STM32 to board JK Program a basic UI to test MIDI In and Out Decode the protocol between board DM ...