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]
Date:	Mon, 13 Oct 2008 23:49:06 +0200
From:	Hans Verkuil <hverkuil@...all.nl>
To:	Robert William Fuller <hydrologiccycle@...il.com>
Cc:	Németh Márton <nm127@...email.hu>,
	video4linux-list@...hat.com, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] video: simplify cx18_get_input() and	ivtv_get_input()

On Monday 13 October 2008 23:40:48 Robert William Fuller wrote:
> Hans Verkuil wrote:
> > On Monday 13 October 2008 22:54:06 Németh Márton wrote:
> >> From: Márton Németh <nm127@...email.hu>
> >>
> >> The cx18_get_input() and ivtv_get_input() are called
> >> once from the VIDIOC_ENUMINPUT ioctl() and once from
> >> the *_log_status() functions. In the first case the
> >> struct v4l2_input is already filled with zeros,
> >> so doing this again is unnecessary.
> >
> > And in the second case no one cares whether the struct is zeroed.
> > And the same situation is also true for ivtv_get_output().
>
> Yeah, 'cos there's nothing better than uninitialized fields, like the
> recent report of a control that returns minimum and maximum values of
> zero, but a step-size of 9.  Why are we optimizing code paths that
> are not performance critical by uninitializing memory?

It's already initialized to 0 in v4l2-ioctl.c. No need to do it twice. 

Regards,

	Hans
--
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