Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5811301ybp; Tue, 8 Oct 2019 08:39:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxBEwwENAZnD9sWFDvxZoMkXySFeuGtB/rrxT9yWAu5a3yzomtLiLo+oJ0fWcHihqRil4Z3 X-Received: by 2002:a17:906:52d1:: with SMTP id w17mr29659787ejn.58.1570549146375; Tue, 08 Oct 2019 08:39:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570549146; cv=none; d=google.com; s=arc-20160816; b=Lkns0jijZvB36MC58u/m7fQl2TfwnUJEH+PPGhZRopHhzTdmOVeO9Ta14y68L+uG2G Pfu62wJLZO11EbbFLjsAlri9OEiu7zNpeFTnCGrv/PD5y7GvVtQdfiCCi2JwmbAg9vCD 5dPSxtyoilKFIuPS6EERKC2ysvsWgw2s81gSfivYN3UnHrSVK0nv22LUlVOwUIRPhoJG rODlWwqScWk/IMcTs64dMdUVDkZ2DfHXCd20Q1ZZszJCTDIYwnxzRAL1xqDb4v3nKzCI 1unKNtPb4qISkYKJuDka038S+/pn36QQurdXA3Pn6bSdssV3r/3K/p3pUNEUDoSBX7vZ 1BMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=MsTTcf4WgMCa2oz8Rve5+ttcWuR9LxTANXHiCNyOL/c=; b=D/zHciouPOLmX+8xRjDyr/FO651mmYGKXMhlJbxoPMdhY9Az1qgesTLi+QAsB0fvdT 5HncNTBEINLxExrNDFmrrVzqONTCdJ+MEAWFvAlmkD9jALDB7GbFVUznuCY25ViAfs9H 4uVR3p3Rv6luv6ChYS4D4VldR7nqbPEsDQWxFtJnIpGrrdPFGrpfo+RRwb/6gE+X1HI0 sqhaIMzE9ObbwzC83MVvB2HD7cxFuWRPF1dkr6gCJEmx7oNrox5Tdp5BDno2k9Mp0vNv 3HmtCqGrj5bi4gO8rW7Ld1AWXFv2CLEauzkU2LuKDI/qFTnJRfNirfun6W7UGwhh3u6k 7znw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=g6Hw1hA8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m39si10822894edc.243.2019.10.08.08.38.43; Tue, 08 Oct 2019 08:39:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=g6Hw1hA8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727101AbfJHPih (ORCPT + 99 others); Tue, 8 Oct 2019 11:38:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:45858 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725908AbfJHPig (ORCPT ); Tue, 8 Oct 2019 11:38:36 -0400 Received: from localhost (unknown [89.205.136.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 02E902070B; Tue, 8 Oct 2019 15:38:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570549114; bh=gjdt14TlOZyesMNTH7/5zSE94bMrmk0OHHv7OXJGXaE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g6Hw1hA8MaxUCugwMm+KqWjnL4ueUeMaByU1o/g241xDYq/YvMvFCndcGgL6KBg/C CHK3kljSd/j9kMjl7/uRDDwzU2ShSfUUaXtN72uf53LWFMLpVY0qDHQRe7XZu0H+F7 SbqoQhju7xWNE5hakgvm6d5VXqDy9Jl7ziRTVI9k= Date: Tue, 8 Oct 2019 17:38:31 +0200 From: Greg KH To: Al Viro Cc: Linus Torvalds , Guenter Roeck , Linux Kernel Mailing List , linux-fsdevel Subject: Re: [PATCH] Convert filldir[64]() from __put_user() to unsafe_put_user() Message-ID: <20191008153831.GA2881123@kroah.com> References: <20191007012437.GK26530@ZenIV.linux.org.uk> <20191007025046.GL26530@ZenIV.linux.org.uk> <20191008032912.GQ26530@ZenIV.linux.org.uk> <20191008045712.GR26530@ZenIV.linux.org.uk> <20191008131416.GA2860109@kroah.com> <20191008152900.GT26530@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191008152900.GT26530@ZenIV.linux.org.uk> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 08, 2019 at 04:29:00PM +0100, Al Viro wrote: > On Tue, Oct 08, 2019 at 03:14:16PM +0200, Greg KH wrote: > > On Tue, Oct 08, 2019 at 05:57:12AM +0100, Al Viro wrote: > > > > > > OK... BTW, do you agree that the use of access_ok() in > > > drivers/tty/n_hdlc.c:n_hdlc_tty_read() is wrong? It's used as an early > > > cutoff, so we don't bother waiting if user has passed an obviously bogus > > > address. copy_to_user() is used for actual copying there... > > > > Yes, it's wrong, and not needed. I'll go rip it out unless you want to? > > I'll throw it into misc queue for now; it has no prereqs and nothing is going > to depend upon it. Great, thanks. > While looking for more of the same pattern: usb_device_read(). Frankly, > usb_device_dump() calling conventions look ugly - it smells like it > would be much happier as seq_file. Iterator would take some massage, > but that seems to be doable. Anyway, that's a separate story... That's just a debugfs file, and yes, it should be moved to seq_file. I think I tried it a long time ago, but given it's just a debugging thing, I gave up as it wasn't worth it. But yes, the access_ok() there also seems odd, and should be dropped. thanks, greg k-h