From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 947C3C2D0DB for ; Wed, 22 Jan 2020 19:06:34 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 591F12465A for ; Wed, 22 Jan 2020 19:06:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="PNy/17k4"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="s6/iM5Qy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 591F12465A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kroah.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces+kernelnewbies=archiver.kernel.org@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92.3) (envelope-from ) id 1iuLKj-0007OM-CL for kernelnewbies@archiver.kernel.org; Wed, 22 Jan 2020 14:06:33 -0500 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1iuLIz-0005Er-4D for kernelnewbies@kernelnewbies.org; Wed, 22 Jan 2020 14:04:45 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 718F9490; Wed, 22 Jan 2020 14:04:38 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 22 Jan 2020 14:04:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=7tBZAW5x0LX+W2Rp8SvJmfS2NtB RladRd4DhHrtqoTM=; b=PNy/17k4iEX4webTir94rwI7GlEN1MwvDIrGcyHPaMS pDfG6WVP33V1URFN+14QQPAaWg/EtJBtRCkZCwSwRawBneu2BE3kr51dNuUArbYg Rf72C16MKjzSXMrkmR2xpItIf8q22md52Pd6ZivfFktRjIdohw9u/GN4xX8E05+E bTdPLKwdnkPJXn9KZ48CCyv+1ft1+U1abRjKV9VDpvrYJfpyH9qKuweQOAIXKFF7 sBLOCe8g/viOan7ixmudlCfnXDVQ39oTSdt+pfKhLTZDECdkng29IJnGJ74XwevA J9aEV6n57eCJNg8AWBBB4dOjQRKr+Rab+/y0YCR59rA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=7tBZAW 5x0LX+W2Rp8SvJmfS2NtBRladRd4DhHrtqoTM=; b=s6/iM5QyWkLCb59JKI8xq4 Ji29w1F37jHFtq9O7BXxqI/nc9fhXc9HLQ0ai1cXfMkwpu2PwHkF4CMChS1n2c9e zWdSyPgXhB++azlehI8iIOvriq8ZIyp5wMHp+PvB29U2kF/H3O5ALRtTGpjWxv45 FxoQy54v0draW3t+zArWwFlSBXDHnL3PvkbPSZ+Gh+xHxnYZfNrtzWr0delCzRm9 CVs4eUydnb/wWt1HrI+rLqAV5ZUaJEg1WzMD+KZankJijtNQXYTCP2lvJae/jrlj +2p7FrtNGHZgcsLWfjdd9UImqL+eesLYcfKPj5isC/JtYrCP9RDBIuJhH71pV8bQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrvddtgdduudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesthdtre dttddtvdenucfhrhhomhepifhrvghgucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheq necuffhomhgrihhnpehlihhnuhigjhhouhhrnhgrlhdrtghomhdpkhgvrhhnvghlrdhorh hgnecukfhppeekfedrkeeirdekledruddtjeenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtghomh X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 8EB4A30609A0; Wed, 22 Jan 2020 14:04:37 -0500 (EST) Date: Wed, 22 Jan 2020 20:04:33 +0100 From: Greg KH To: WyoFlippa Subject: Re: Kernel drivers and IOCTLs Message-ID: <20200122190433.GA64264@kroah.com> References: <8969dfce-a295-c351-201c-4d8a0e90ac58@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <8969dfce-a295-c351-201c-4d8a0e90ac58@gmail.com> Cc: kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces+kernelnewbies=archiver.kernel.org@kernelnewbies.org On Tue, Jan 21, 2020 at 10:27:01PM -0600, WyoFlippa wrote: > Hi, > > I'm working on a driver that would verify a Linux or U-Boot image is secure > and I need to pass parameters such as the public key, starting address, etc. > I'd heard in talking to developers that IOCTLs are frowned upon. I also > found this article that seems to indicate that using sysfs or proc is a > better way to go. > > https://www.linuxjournal.com/article/8110 > > > but then I see this article from 2013 which is more recent than the article. > > https://www.kernel.org/doc/html/latest/process/botching-up-ioctls.html > > > So are IOCTLs discouraged or not? They are discouraged, except when they are necessary :) It all depends on exactly what you are trying to do. greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies