From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753658AbdLMTbI (ORCPT ); Wed, 13 Dec 2017 14:31:08 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:54877 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751644AbdLMTbF (ORCPT ); Wed, 13 Dec 2017 14:31:05 -0500 Date: Wed, 13 Dec 2017 11:31:00 -0800 From: Matthew Wilcox To: Jeff Moyer Cc: Zhen Lei , Alexander Viro , Benjamin LaHaise , linux-fsdevel , linux-aio , linux-kernel , Tianhong Ding , Hanjun Guo , Libin , Kefeng Wang , Deepa Dinamani Subject: Re: [PATCH 1/1] aio: make sure the input "timeout" value is valid Message-ID: <20171213193100.GA19700@bombadil.infradead.org> References: <1513172572-16724-1-git-send-email-thunder.leizhen@huawei.com> <20171213141112.GA11217@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 13, 2017 at 11:27:00AM -0500, Jeff Moyer wrote: > Matthew Wilcox writes: > > > On Wed, Dec 13, 2017 at 09:42:52PM +0800, Zhen Lei wrote: > >> Below information is reported by a lower kernel version, and I saw the > >> problem still exist in current version. > > > > I think you're right, but what an awful interface we have here! > > The user must not only fetch it, they must validate it separately? > > And if they forget, then userspace is provoking undefined behaviour? Ugh. > > Why not this: > > Why not go a step further and have get_timespec64 check for validity? > I wonder what caller doesn't want that to happen... There are some which don't today. I'm hoping Deepa takes this and goes off and fixes them all up.