Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752673AbbFBTWK (ORCPT ); Tue, 2 Jun 2015 15:22:10 -0400 Received: from www.linutronix.de ([62.245.132.108]:52627 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752191AbbFBTUG (ORCPT ); Tue, 2 Jun 2015 15:20:06 -0400 Date: Tue, 2 Jun 2015 21:20:08 +0200 (CEST) From: Thomas Gleixner To: Baolin Wang cc: arnd@arndb.de, linux-kernel@vger.kernel.org, y2038@lists.linaro.org Subject: Re: [PATCH v4 06/25] time/posix-timers:Introduce {get,put}_timespec and {get,put}_itimerspec In-Reply-To: <1433159708-4780-1-git-send-email-baolin.wang@linaro.org> Message-ID: References: <1433159708-4780-1-git-send-email-baolin.wang@linaro.org> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1190 Lines: 32 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/