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.DEB.2.11.1506021808420.20347@nanos>
Date:	Tue, 2 Jun 2015 21:20:08 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Baolin Wang <baolin.wang@...aro.org>
cc:	arnd@...db.de, linux-kernel@...r.kernel.org, y2038@...ts.linaro.org
Subject: Re: [PATCH v4 06/25] time/posix-timers:Introduce {get,put}_timespec
 and {get,put}_itimerspec

On Mon, 1 Jun 2015, Baolin Wang wrote:

> These are new helper functions that convert between a user timespec/
> itimerspec and a kernel timespec64/itimerspec64 structure.

These are not functions, these are macros.
 
> These macros can change the types underneath from both ends and it
> will work efficiently on both 32-bit and 64-bit that can avoid the
> CONFIG_64BIT macro in syscall functions, and also it can make the
> syscall functions more simple.

Lots of useless blurb which fails to explain WHY this works and WHY
this magically converts the types.

And you fail to mention WHY dropping type safety is a good choice and
WHY dropping the might_fault() check is a proper thing to do.

I also doubt the efficiency part as you replace a linear
copy_to_user() with four seperate ones for an itimerspec.
  
This can be done proper with typesafe inline helpers, if you want to
spare the ifdef in the syscall implementation.

Thanks,

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