new sndiod to test

2012-10-03 Thread Alexandre Ratchov
Here's a new sndiod daemon derived from aucat; it's simpler,
smaller, faster and -- most importantly -- easier to develop. It
has almost the same features, and uses almost the same options. So
it can replace the current sndiod binary.

The new code is not polished yet and there may be few bugs
remaining, so I'm very interested any regressions or usability
problems it may cause. Code  manual review appreciated as well.

To test it:

cd /usr/src/usr.bin
ftp http://caoua.org/alex/obsd/sndiod.tar.gz
tar -xzvf sndiod.tar.gz
cd sndiod
make obj
make depend
make
make install

Note that this requires libsndio form at least 3 sep. 2012.

Thanks in advance

-- Alexandre



Re: add basic support for ivy bridge graphics

2012-10-03 Thread Mark Kettenis
 Date: Mon, 1 Oct 2012 23:15:18 +1000
 From: Jonathan Gray j...@jsg.id.au
 
 The following adds basic support for ivy bridge in xf86-video-intel.
 As per sandy bridge the rings aren't enabled so this is just modesetting
 and shadowfb basically.  Tests on all hardware with intel video
 appreciated.

One small issue below.  ok kettenis@ with that bit fixed.


 Index: src/intel_driver.h
 ===
 RCS file: /cvs/xenocara/driver/xf86-video-intel/src/intel_driver.h,v
 retrieving revision 1.2
 diff -u -p -r1.2 intel_driver.h
 --- src/intel_driver.h21 Dec 2011 21:25:02 -  1.2
 +++ src/intel_driver.h1 Oct 2012 13:10:56 -
 @@ -190,6 +190,7 @@
  #define PCI_CHIP_IVYBRIDGE_D_GT1 0x0152
  #define PCI_CHIP_IVYBRIDGE_D_GT2 0x0162
  #define PCI_CHIP_IVYBRIDGE_S_GT1 0x015a
 +#define PCI_CHIP_IVYBRIDGE_S_GT2 0x016a
  
  #endif
  
 @@ -242,6 +243,15 @@
  #define IS_IVYBRIDGE_M(pI810) (DEVICE_ID(pI810-PciInfo) == 
 PCI_CHIP_IVYBRIDGE_M_GT1  || \
   DEVICE_ID(pI810-PciInfo) == PCI_CHIP_IVYBRIDGE_M_GT2)
  
 +#define IS_IVYBRIDGE_D(pI810) (DEVICE_ID(pI810-PciInfo) == 
 PCI_CHIP_IVYBRIDGE_D_GT1 || \
 + DEVICE_ID(pI810-PciInfo) == PCI_CHIP_IVYBRIDGE_D_GT2)
 +
 +#define IS_IVYBRIDGE_S(pI810) (DEVICE_ID(pI810-PciInfo) == 
 PCI_CHIP_IVYBRIDGE_S_GT1 || \
 + DEVICE_ID(pI810-PciInfo) == PCI_CHIP_IVYBRIDGE_S_GT2)
 +
 +#define IS_IVYBRIDGE(dev) (IS_IVYBRIDGE_M(dev) || IS_IVYBRIDGE_D(dev) || \
 + IS_IVYBRIDGE_D(dev))

Looks like that last one should be IS_IVYBRIDGE_S instead of listing
IS_IVYBRIDGE_D twice.



Hinweis: Ihre Kreditkarte wird aus Sicherheitsgr�nden gesperrt!

2012-10-03 Thread Kreditkarte Sicherheits-Team
Sehr geehrter Inhaber der Kreditkarte,

Aus Gründen der Sicherheit Ihrer Kreditkarte wurde gesperrt.
Wir haben unsere Sicherheits-Datenbank erneuert, so dass wir alle 
Kreditkarten gesperrt haben, bis Sie Ihre persönlichen Daten mit 
uns zu bestätigen.

Um reaktive Ihre Karte laden Sie bitte das beigefügte Formular 
aus und befolgen Sie alle Schritte.

Ihre Kreditkarte wird automatisch entriegelt und komplett für den 
Einsatz gesichert.

Danke,
© Copyright Visa Europe 2012

[demime 1.01d removed an attachment of type application/octet-stream which had 
a name of attachments.zip]



Re: [PATCH, TEST] Make functions in random.c thread safe

2012-10-03 Thread Alexey Suslikov
Hi.

Is there any progress/comments on this?

On Fri, Sep 28, 2012 at 11:29 PM, Alexey Suslikov
alexey.susli...@gmail.com wrote:
 Hi.

 With input from tedu@, guenther@ and others, below are:
 1) test case;
 2) backtrace for test case;
 3) locking diff;
 4) dmesg (amd64 GENERIC.MP built from 2012-09-28 CVS).

 Diff introduces no changes to srandomdev(): correct me if I'm wrong,
 but no mutex can be used since sysctl can sleep.

 Rebuild and reinstall in src/lib/librthread and src/lib/libc after applying
 the diff.

 Expect test case (and Kannel port of course) not crashing after rebuild
 and reinstall.

 Cheers,
 Alexey

 1) test case.

 #include pthread.h
 #include stdio.h
 #include stdlib.h
 #include assert.h
 #include unistd.h

 #define NUM_THREADS1800

 void *TaskCode(void *argument)
 {
 struct timeval  tv;

 gettimeofday(tv, 0);
 srandom((getpid()  16) ^ getuid() ^ tv.tv_sec ^ tv.tv_usec);

 return NULL;
 }

 int main(void)
 {
 pthread_t threads[NUM_THREADS];
 int thread_args[NUM_THREADS];
 int rc, i;

 /* create all threads */
 for (i=0; iNUM_THREADS; ++i) {
 thread_args[i] = i;
 rc = pthread_create(threads[i], NULL, TaskCode, (void *) 
 thread_args[i]);
 assert(0 == rc);
 }

 /* wait for all threads to complete */
 for (i=0; iNUM_THREADS; ++i) {
 rc = pthread_join(threads[i], NULL);
 assert(0 == rc);
 }

 printf(Test srandom success\n);
 exit(EXIT_SUCCESS);
 }

 2) backtrace for test case.

 Program received signal SIGSEGV, Segmentation fault.
 [Switching to thread 1030380]
 0x19d34d618f8e in random () at /usr/src/lib/libc/stdlib/random.c:387
 387 *fptr += *rptr;

 (gdb) bt
 #0  0x19d34d618f8e in random () at /usr/src/lib/libc/stdlib/random.c:387
 #1  0x19d34d619169 in srandom (x=Variable x is not available.
 ) at /usr/src/lib/libc/stdlib/random.c:216
 #2  0x19d14fe1 in TaskCode (argument=0x7f7ea004) at
 test_srandom.c:14
 #3  0x19d34999d11e in _rthread_start (v=Variable v is not available.
 ) at /usr/src/lib/librthread/rthread.c:122
 #4  0x19d34d5f0f9b in __tfork_thread () at
 /usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:75
 Cannot access memory at address 0x19d344efb000

 3) locking diff.

 Index: lib/libc/include/thread_private.h
 ===
 RCS file: /cvs/src/lib/libc/include/thread_private.h,v
 retrieving revision 1.25
 diff -u -p -r1.25 thread_private.h
 --- lib/libc/include/thread_private.h   16 Oct 2011 06:29:56 -  1.25
 +++ lib/libc/include/thread_private.h   27 Sep 2012 10:48:45 -
 @@ -172,4 +172,16 @@ void   _thread_arc4_unlock(void);
 _thread_arc4_unlock();\
 } while (0)

 +void   _thread_random_lock(void);
 +void   _thread_random_unlock(void);
 +
 +#define _RANDOM_LOCK() do {\
 +   if (__isthreaded)   \
 +   _thread_random_lock();  \
 +   } while (0)
 +#define _RANDOM_UNLOCK()   do {\
 +   if (__isthreaded)   \
 +   _thread_random_unlock();\
 +   } while (0)
 +
  #endif /* _THREAD_PRIVATE_H_ */
 Index: lib/libc/stdlib/random.c
 ===
 RCS file: /cvs/src/lib/libc/stdlib/random.c,v
 retrieving revision 1.17
 diff -u -p -r1.17 random.c
 --- lib/libc/stdlib/random.c1 Jun 2012 01:01:57 -   1.17
 +++ lib/libc/stdlib/random.c27 Sep 2012 10:48:45 -
 @@ -35,6 +35,10 @@
  #include stdio.h
  #include stdlib.h
  #include unistd.h
 +#include thread_private.h
 +
 +static void srandom_unlocked(unsigned int);
 +static long random_unlocked(void);

  /*
   * random.c:
 @@ -186,8 +190,8 @@ static int rand_sep = SEP_3;
   * introduced by the L.C.R.N.G.  Note that the initialization of randtbl[]
   * for default usage relies on values produced by this routine.
   */
 -void
 -srandom(unsigned int x)
 +static void
 +srandom_unlocked(unsigned int x)
  {
 int i;
 int32_t test;
 @@ -213,10 +217,18 @@ srandom(unsigned int x)
 fptr = state[rand_sep];
 rptr = state[0];
 for (i = 0; i  10 * rand_deg; i++)
 -   (void)random();
 +   (void)random_unlocked();
 }
  }

 +void
 +srandom(unsigned int x)
 +{
 +   _RANDOM_LOCK();
 +   srandom_unlocked(x);
 +   _RANDOM_UNLOCK();
 +}
 +
  /*
   * srandomdev:
   *
 @@ -273,12 +285,15 @@ initstate(u_int seed, char *arg_state, s
  {
 char *ostate 

[PATCH] Enable NTFS support on loongson

2012-10-03 Thread Donovan Watteau
Hello,

The following diff enables NTFS support on loongson.  I've
been using it with external drives on my Yeeloong without any
problem.

Index: src/sbin/mount_ntfs/Makefile
===
RCS file: /cvs/src/sbin/mount_ntfs/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- src/sbin/mount_ntfs/Makefile9 Dec 2007 19:48:55 -   1.7
+++ src/sbin/mount_ntfs/Makefile3 Oct 2012 20:10:32 -
@@ -1,6 +1,7 @@
 #  $OpenBSD: Makefile,v 1.7 2007/12/09 19:48:55 martin Exp $
 
-.if (${MACHINE} == alpha || ${MACHINE} == amd64 || ${MACHINE} == i386)
+.if (${MACHINE} == alpha || ${MACHINE} == amd64 || \
+ ${MACHINE} == i386 || ${MACHINE} == loongson) 
 PROG=  mount_ntfs
 SRCS=  mount_ntfs.c getmntopts.c
 .else
Index: sys/arch/loongson/conf/GENERIC
===
RCS file: /cvs/src/sys/arch/loongson/conf/GENERIC,v
retrieving revision 1.37
diff -u -p -r1.37 GENERIC
--- sys/arch/loongson/conf/GENERIC  27 Sep 2012 14:01:35 -  1.37
+++ sys/arch/loongson/conf/GENERIC  3 Oct 2012 20:10:55 -
@@ -22,6 +22,8 @@ optionWSDISPLAY_COMPAT_RAWKBD # provid
 option PCIVERBOSE
 option USBVERBOSE
 
+option NTFS# NTFS support
+
 config bsd swap generic
 
 #



Habilidades Gerenciales de ALTO IMPACTO

2012-10-03 Thread Kelvin Ruiz
Curso Ejecutivo de Habilidades Gerenciales del Alto Impacto
Lugar
Hotel Sheraton  Convention Center
Fecha
10, 11 y 12 de Octubre

Este curso le ofrece un programa que recargará sus habilidades y
capacidades de LIDERAZGO, desde el manejo del estrés y la desmotivación
del personal, hasta cómo hacer más con menos recursos, generar ideas
creadoras para sus desafíos más grandes y ganar la autoayuda sólida para
vencer cada obstáculo que se encuentra a su paso.

En este curso Aprenderá a:

  * Cómo responder a la presión abrumadora y a los problemas
aparentemente insuperables con confianza y serenidad.

  * Deje de preocuparse sobre qué camino de acción seguir… Tome las
decisiones del negocio de manera más rápida y efectiva.

  * Dirija con la confianza, el valor y la convicción que inspira a sus
colaboradores a dar su mayor esfuerzo.

  * Identifique y elimine las barreras de la productividad.

  * Cómo reconocer los puntoso débiles en su personal y saber con
seguridad cuándo dejar que las personas se vayan.

  * Reenfoque las prioridades sobre los asuntos que son más importantes y
cambie direcciones rápidamente si es necesario.

  * ¡Aprenda a negociar para GANAR!

  * Cómo hacer de su empresa una organización donde el cambio, el
aprendizaje y la evolución del individuo sean las bases de una
organización virtuosa.

  * Desarrolle habilidades para comunicarse con dinamismo y poder.

  * Comuníquese con tacto, profesionalismo y diplomacia hasta en los más
desafiantes momentos.

Toda empresa, por extraordinaria que sea, es susceptible de caer. No hay
ninguna ley de la naturaleza que garantice que los más poderosos puedan
permanecer en la cima inevitablemente... pero
¿CÓMO CAEN LOS PODEROSOS

¡Obtenga la Información Completa!
Respondiendo los siguientes datos:
-Empresa:
-Nombre:
-Puesto:
-Tel: ( )
-Fecha de Interés:

o Llame al (507)  2791083-279-0887

Kelvin Josmar Ruiz Bernal
Lider de Proyecto Panama y Centro America
Teléfonos (507)  2791083-279-0887

ESTE CORREO NO PUEDE SER CONSIDERADO INTRUSIVO YA QUE CUMPLE CON LAS
POLÍTICAS ANTISPAM INTERNACIONALES Y LOCALES: Responda este correo con el
Asunto unsushab y automáticamente quedará fuera de nuestras listas. Este
correo ha sido enviado a: tech@openbsd.org