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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 3 Nov 2012 05:53:39 +0100
From:	Richard Cochran <richardcochran@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	yuanhan.liu@...ux.intel.com, changlongx.xie@...el.com,
	fengguang.wu@...el.com, netdev@...r.kernel.org
Subject: Re: [net-next:master 122/152] drivers/ptp/ptp_chardev.c:36
 ptp_ioctl() warn: 'sysoff' puts 832 bytes on stack

On Fri, Nov 02, 2012 at 09:39:28PM -0400, David Miller wrote:
> > I am aware that these methods use large stack buffers, but I thought
> > it was okay seeing as they are both under the 1k limit.
> 
> I think you should avoid such a local stack variable here.
> 
> It's not that big of a deal to use kmalloc or whatever so just
> do that and add the necessary kfree cleanups et al.

The usage pattern will be that the user calls these again and
again. For the sysoff it will be at least once every second, and for
the events it could be ASAP in a tight loop.

Isn't it being nicer to the memory allocation code not to repeatedly
request small chunks?

Thanks,
Richard
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ