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] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.02.1305151141280.1388@ionos>
Date:	Wed, 15 May 2013 11:41:48 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	John Stultz <john.stultz@...aro.org>
cc:	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	Magnus Damm <magnus.damm@...il.com>
Subject: Re: [patch 06/15] clocksource: Split out user string input

On Mon, 29 Apr 2013, John Stultz wrote:
> On Thu, Apr 25, 2013 at 1:31 PM, Thomas Gleixner <tglx@...utronix.de> wrote:
> So you probably want something like the following patch to fix this.

Yep, stupid me.
 
> thanks
> -john
> 
> 
> 
> diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
> index e9c4f04..5f6c324 100644
> --- a/kernel/time/clocksource.c
> +++ b/kernel/time/clocksource.c
> @@ -836,6 +836,8 @@ sysfs_show_current_clocksources(struct device *dev,
> 
>  static size_t clocksource_get_uname(const char *buf, char *dst, size_t cnt)
>  {
> +	size_t ret = cnt;
> +
>  	/* strings from sysfs write are not 0 terminated! */
>  	if (!cnt || cnt >= CS_NAME_LEN)
>  		return -EINVAL;
> @@ -846,7 +848,7 @@ static size_t clocksource_get_uname(const char *buf, char
> *dst, size_t cnt)
>  	if (cnt > 0)
>  		memcpy(dst, buf, cnt);
>  	dst[cnt] = 0;
> -	return cnt;
> +	return ret;
>  }
> 
>  /**
> 
--
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