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]
Message-ID: <502EBA1E.2030807@suse.cz>
Date:	Fri, 17 Aug 2012 23:39:42 +0200
From:	Jiri Slaby <jslaby@...e.cz>
To:	mathieu.poirier@...aro.org
CC:	linux-kernel@...r.kernel.org, arve@...roid.com,
	kernel-team@...roid.com, dmitry.torokhov@...il.com,
	john.stultz@...aro.org
Subject: Re: [PATCH] [RFC]: drivers/tty: Folding Android's keyreset driver
 in sysRQ

On 08/17/2012 12:06 AM, mathieu.poirier@...aro.org wrote:
> +static int do_keyreset_event(struct sysrq_state *state,
> +					 unsigned int code, int value)
> +{
> +	int ret;
> +	int processed = 0;
> +
> +	/* Is the code is of interestest to us */
> +	if (!test_bit(code, state->keybit))
> +		return processed;
> +
> +	/* No need to take care of key up events */
> +	if (!test_bit(code, state->key) == !value)
> +		return processed;
> +
> +	/* Record new entry */
> +	__change_bit(code, state->key);

Hmm, this function is not atomic. Can do_keyreset_event be called
simultaneously from different CPUs? I suppose not...

> +	if (value && !state->restart_disabled &&
> +			state->key_down_ctn == state->key_down_target) {
> +		state->restart_disabled = 1;
> +		if (atomic_read(&restart_requested))
> +			panic(KERN_ERR "keyboard reset failed, %d - panic\n",
> +					 atomic_read(&restart_requested));

panic() does not take KERN_* prefixes.

regards,
-- 
js
suse labs
--
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