mercoledì 10 luglio 2013

Chrome: problema audio ("saltellante") nelle riproduzioni video

Soluzione:
  • Scrivere chrome://plugins nella barra degli indirizzi; premere invio
  • A destra, cliccate su "+ Dettagli"
  • Nella categoria di plugins Flash ci saranno 2 o 3 plugins; bisogna disabilitare quello in cui nel percorso c'è scritto "Pepperflash"
  • Chiudere Chrome e riaprirlo
  • Se ci sono ancora dei problemi, cliccare sulla chiave inglese -> strumenti -> cancella dati di navigazione -> selezionare solo la cache e dare l' OK

giovedì 4 luglio 2013

Disabling reverse DNS lookups in ssh


Disabling reverse DNS lookups in ssh

Reverse DNS lookup is the procedure used by sshd and other login daemons (i.e. telnet, ftp, etc.) for checking the truth of IP addresses of the incoming connection.

Often in embedded systems networks there is no Internet connection, and no DNS server: in this case, ssh login may require a lot of time (30 sec. or more) or can even be impossible (if sshd has been compiled with the PARANOID option).

Reverse DNS lookup can be disabled on the sshd server side:
First of all, you can make "UseDNS no" in /etc/ssh/sshd_config file, default answer is yes and if this line not shown in your config file, just add it to as below:

UseDNS no

This directive tells sshd process to check resolved host name for the connected client's ip address maps back to the very same ip address or not.

However, it does not prevent the sshd server from performing any DNS lookups at all. That's not the purpose of that directive.

In order to remove dns lookups completely, you have to use -u0 options when starting sshd server. You can easily add this options to /etc/default/ssh or /etc/sysconfig/sshd or elsewhere suitable for your distribution.

-u0 option's means that it will not put hostnames into the utmp structure (i.e. what you see when you type "who" at the shell prompt), which means that sshd will not perform DNS lookups for that purpose. However there are still cases where a lookup has to be performed when a user has

"from=<hostname>"

like entries in his authorized_keys file, or when authentication methods or configuration directives are used that involve hostnames.

With this method you can disable ssh reverse DNS lookup for most situations; it's not a system-wide disable, anyway.
For a system-wide solution, you should consider installing a local DNS cache server like dnsmasq and configure it to false the DNS check results in local networks (bogus-priv option), like described here:

http://forums.gentoo.org/viewtopic-t-455597-start-0.html
http://wiki.debian.org/HowTo/dnsmasq



martedì 18 giugno 2013

The printf recursive substitution trap (bug)

Working with embedded linux boards make me use systems that are often not so much up-to-dated.
Kernel is often dated, compiler is often dated, libraries are often dated.

On a system I'm using, the cross compiler is gcc 3.3.2 and the glibc version is 2.2.5.
On this system I've found a bug in the glibc printf family functions, quite difficult to track.

The bug seems to be caused by a recursive substitution in the printf arguments: in printf("%s", text), if the text string includes itself the string "%s" again, the program on my embedded system crashes (with a no more specified "Killed" message).

No help with core dump, strace and dbg: I had to track down step by step to find that the crash happens on a snprintf call, ONLY if the substitution argument string contains a "%s".

So, what I think happens (but I'm not 100% sure) is that the substitution is made recursively also on the second "%s" found, and the program is killed by the kernel OOM Killer (Out-Of-Memory Killer) because the resulting string can't be allocated.

Nice.

Experimenting workarounds, I've found that the bug affects also the strcat functions (maybe it's based on sprintf). I had to use memcpy.

This bug is not present on another embedded system I'm using with a more recent glibc.

lunedì 17 giugno 2013

Nexus7: WiFi Hotspot app (che funziona!)

L'abilitazione delle opzioni per Tethering/WiFi Hotspot sul Nexus7 e' stato un problema fin dalla sua uscita.

Ora finalmente e' disponibile una app che rende il WiFi Hotspot attivo e funzionante: WiFi Tether Router di Fabio Grasso.

Lo sviluppatore e' italiano, attivo e disponibile a rispondere alle email degli utenti rapidamente e con efficienza.
Il router WiFi creato e' di tipo "infrastruttura" e quindi supporta la connessione di piu' dispositivi client.

L'applicazione richiede i permessi di root, e a tal proposito rimando al mio articolo relativo: Nexus 7: rooting da un PC Linux

Con questa applicazione si completano le capacita' di tethering del Nexus7:

martedì 19 marzo 2013

ARM7 GNU Toolchain: GCC 4.3.3


Here are some updated (090615) informations for 4.3.3 GNU gcc arm-elf compilation; this time I want to rebuild the toolchain with strip dead code abilty enabled in newlib.
Please read the previous 4.2.2 compilation info before, because this is only an update.

sabato 2 marzo 2013

Nexus 7: Linux Tethering Bluetooth DUN con PdaNet & wvdial


DUN e' l'interfaccia bluetooth per il Dial Up Networking, cioe' per usare il dispositivo bluetooth (in questo caso il Nexus 7) come se fosse un modem per collegarsi in ppp (point-to-point protocol) ad Internet, uno dei metodi che possono essere usati per il tethering.
Bluetooth offre diversi tipi di servizi, divisi su canali differenti; solitamente l'interfaccia DUN viene fornita sul canale bluetooth 3.
Non tutti i telefoni/smatrphone/tablet offrono l'interfaccia DUN: per esempio il Nexus 7, se non si e' installata la patch XDA non-ufficiale per il tethering Abilitazione delle opzioni per Tethering/WiFi Hotspot, non la fornisce. E' possibile pero' installare una app che la aggiunge, che non necessita dei permessi di root: PdaNet.


giovedì 28 febbraio 2013

ARM7 GNU Toolchain for Linux


Moooolto tempo fa (2008) ho lavorato alla compilazione di una toolchain cross-compiler per ARM7 su Linux (che tutt'ora utilizzo), e da questo ne ho tratto una specie di how-to che ho gia' allora pubblicato sul sito della mia azienda PRECMA S.r.l.

Quella qui di seguito e' la prima parte, a cui segue la seconda relativa alla compilazione della toolchain 4.3.3 GNU con abilitata l'opzione "strip dead code"  in newlib.