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:	Fri, 3 Jul 2009 08:45:18 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
Cc:	lennart@...ttering.net, linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] vt: add an event interface


* Alan Cox <alan@...rguk.ukuu.org.uk> wrote:

> Lennart how does this fit your needs - this replaces the existing wait
> active hack with a race free one and adds other events with a proper
> infrastructure for them.
> 
> From: Alan Cox <alan@...ux.intel.com>
> 
> This is needed and requested in various forms for ConsoleKit, screenblank
> handling and the like so do the job with a single interface. Also build the
> interface so that unlike VT_WAITACTIVE and friends it won't miss events.
> 
> Signed-off-by: Alan Cox <alan@...ux.intel.com>
> ---
> 
>  drivers/char/vt.c       |    4 +
>  drivers/char/vt_ioctl.c |  181 ++++++++++++++++++++++++++++++++++-------------
>  include/linux/vt.h      |   14 ++++
>  include/linux/vt_kern.h |    3 +
>  kernel/power/console.c  |    4 +
>  5 files changed, 152 insertions(+), 54 deletions(-)

Just a side-note, please run new patches through 
scripts/checkpatch.pl:

    total: 4 errors, 2 warnings, 0 checks, 294 lines checked

all four errors it flagged should be fixed.

Even the two warnings about over-long lines show real problem areas 
that could be improved:

 - the copy_from_user() in vt_event_wait_ioctl() could be shortened 
   if we didnt pass in an unsigned long (which is pointless anyway).
   The cast to void __user * should be done in the ioctl 
   demultiplexer vt_ioctl(), and the ioctl ugliness should not 
   invade cleaner child functions such as vt_event_wait_ioctl().

 - same for vt_event_wait_ioctl() - it passes in a type damaged by 
   ioctl's limitations. Such type limitations and ioctl demuxing 
   artifacts should be kept local to vt_ioctl().

Thanks,

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