Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1127268rwi; Thu, 3 Nov 2022 01:07:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4rtjzxsVGfFb7vfGy1LdgFyQ2o8RIBSyn7Eaw/gHB4PA844pN7mmqgHAyoRYo9QN3Gi9Pq X-Received: by 2002:a17:90a:db93:b0:214:1671:a106 with SMTP id h19-20020a17090adb9300b002141671a106mr11820633pjv.4.1667462866912; Thu, 03 Nov 2022 01:07:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667462866; cv=none; d=google.com; s=arc-20160816; b=MYGgBIea+kncN6tTlKdMV3Rp04jxq2rXIdaYKgOWIWgn53G3BILD+xIohdcAADUuO0 sJ1D39bMk0HPG1amaw6KEp7UBkUsJtxBKSREY6Sk9JMXfA2f/B9MCHzt34A1DUETDViN 2ipbR/27oe5hF4FK/8gpZfxpA4XCK+c6irL8s3cYxk0/CWZJnCkvesMk4g7DsHpO3VLP 54hFnI98FxL8wTdKsYlAdeFrITZF3Sx7MOpwYRBDSIUAe116h8SbusttIYMDOwFJ/P7s BMEcdWPsIjogcJaYQvE6SIK6GgF/CTUzxcWPAGHRLUEzVIbjpa+8b1X3NVrmiYQKQ2ZT a/Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=wEODj6Cghf+eWC6Z+E3ith3BxfwQoSGNv6zdgic7S7o=; b=eRsibRJwzSUwaQlGXuW6nrnLKfHubjyo1A6N3EEeJCjwD4a4ULYo8chlpfTUpH0zSA eGM77ZITkcT3L8ZrormgNSUA4Y6Dqeff7X1B6jJxMSg45sTRClySsmuCec1UGEqyNG0e opMdy1JnOr2ZExT/bYlUCGzh6IK9OmDYwu8FLH352pHG7AAWiWJp6ahtEHZSX0e8g6v0 /KZbBqevrXMIRQUFHQjIupSxOlFPx3YgqgWz0vINGfFykheXxygNl26RtZa6DTAgnbyC 5Qr9W+goizlZpS/aQcY8Jfp4wc5EWziWDUTa2e7HSFwn4RMGqg5PHLX59hX90FxbD9rG 6NVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y11-20020a63180b000000b0046ef5b35735si211788pgl.654.2022.11.03.01.07.33; Thu, 03 Nov 2022 01:07:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230495AbiKCHrc (ORCPT + 98 others); Thu, 3 Nov 2022 03:47:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230368AbiKCHr3 (ORCPT ); Thu, 3 Nov 2022 03:47:29 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3395A2ACB; Thu, 3 Nov 2022 00:47:28 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 3149E68AA6; Thu, 3 Nov 2022 08:47:24 +0100 (CET) Date: Thu, 3 Nov 2022 08:47:24 +0100 From: Christoph Hellwig To: Luis Chamberlain Cc: Guillermo Rodriguez Garcia , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , Al Viro , Linus Torvalds , Matthew Wilcox , Kees Cook , Iurii Zaikin Subject: Re: fs: layered device driver to write to evdev Message-ID: <20221103074724.GA2685@lst.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 02, 2022 at 05:04:11PM -0700, Luis Chamberlain wrote: > On Wed, Nov 02, 2022 at 02:14:24PM +0100, Guillermo Rodriguez Garcia wrote: > > I understand that device drivers should implement ->write_iter if they > > need to be written from kernel space, but evdev does not support this. > > What is the recommended way to have a layered device driver that can > > talk to evdev ? > > Shouldn't just writing write_iter support make this work? Writing to evdev just sound like a lot of troble. evdev is a tiny wrapper to expose the in-kernel input API to userspace. Anything in-kernel should just directly interact with the input subsystem.