lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 28 May 2011 16:21:39 +0200
From:	Takashi Iwai <tiwai@...e.de>
To:	Ralf Baechle <ralf@...ux-mips.org>
Cc:	linux-arch@...ux-mips.org, linux-kernel@...r.kernel.org,
	alsa-devel@...a-project.org, Jaroslav Kysela <perex@...ex.cz>
Subject: Re: i8253 locking and PC speaker on non-{mips,x86}

At Sat, 28 May 2011 12:21:20 +0100,
Ralf Baechle wrote:
> 
> No longer terribly relevant these days but ...
> 
> drivers/input/misc/pcspkr.c:
> 
> #if defined(CONFIG_MIPS) || defined(CONFIG_X86)
> /* Use the global PIT lock ! */
> #include <asm/i8253.h>
> #else
> #include <asm/8253pit.h>
> static DEFINE_RAW_SPINLOCK(i8253_lock);
> #endif
> 
> sound/drivers/pcsp/pcsp.h:
> 
> #if defined(CONFIG_MIPS) || defined(CONFIG_X86)
> /* Use the global PIT lock ! */
> #include <asm/i8253.h>
> #else
> #include <asm/8253pit.h>
> static DEFINE_RAW_SPINLOCK(i8253_lock);
> 
> $ git grep -F pcsp.h sound/drivers/pcsp
> sound/drivers/pcsp/pcsp.c:#include "pcsp.h"
> sound/drivers/pcsp/pcsp_input.c:#include "pcsp.h"
> sound/drivers/pcsp/pcsp_lib.c:#include "pcsp.h"
> sound/drivers/pcsp/pcsp_mixer.c:#include "pcsp.h"
> $ git grep -w i8253_lock sound/drivers/pcsp/
> sound/drivers/pcsp/pcsp.h:static DEFINE_RAW_SPINLOCK(i8253_lock);
> sound/drivers/pcsp/pcsp_input.c:        raw_spin_lock_irqsave(&i8253_lock, flags
> sound/drivers/pcsp/pcsp_input.c:        raw_spin_unlock_irqrestore(&i8253_lock, 
> sound/drivers/pcsp/pcsp_lib.c:          raw_spin_lock_irqsave(&i8253_lock, flags
> sound/drivers/pcsp/pcsp_lib.c:          raw_spin_unlock_irqrestore(&i8253_lock, 
> sound/drivers/pcsp/pcsp_lib.c:  raw_spin_lock(&i8253_lock);
> sound/drivers/pcsp/pcsp_lib.c:  raw_spin_unlock(&i8253_lock);
> sound/drivers/pcsp/pcsp_lib.c:  raw_spin_lock(&i8253_lock);
> sound/drivers/pcsp/pcsp_lib.c:  raw_spin_unlock(&i8253_lock);
> 
> Locks are great, everybody should have their own lock!

Yeah, if they were actually built.  But snd-pcsp driver is built only
for x86:

config SND_PCSP
	tristate "PC-Speaker support (READ HELP!)"
	depends on PCSPKR_PLATFORM && X86 && HIGH_RES_TIMERS
	depends on INPUT
	depends on EXPERIMENTAL

So, the current code in sound/drivers/pcsp/pcsp.h is harmless, but
just confusing because of copy-and-paste from
drivers/input/misc/pcspkr.c.
The part for non-x86 should be removed or commented better.


thanks,

Takashi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ