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=-3.6 required=3.0 tests=BAYES_00,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 71C1FC433E0 for ; Tue, 12 Jan 2021 07:30:06 +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 CF89422CA2 for ; Tue, 12 Jan 2021 07:30:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF89422CA2 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.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94) (envelope-from ) id 1kzE7o-0007M0-Bv; Tue, 12 Jan 2021 02:29:56 -0500 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kzE7l-0007Lv-QM for kernelnewbies@kernelnewbies.org; Tue, 12 Jan 2021 02:29:54 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 7C1C91DD0; Tue, 12 Jan 2021 02:29:50 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 12 Jan 2021 02:29:50 -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=FF+Iomu2i166YKKxaKIlz9E8tu+ zwwb103uXnDq+CMk=; b=c78VLKVPnwVE/M/NHkodt3i8AHrryFUJDLPo0bD9ng0 xgiIVqZf28qeqyxLv1OSGlH7xT8gtHoRZpVS/6xC+k0GVL3Nh4n4XMt1CZEOUTAz woCSEl0dZrLCrRR2/Y+/zh/aM2owFrwRUbM1x39HDE896FMD6fFSqpYW0VpZa0NN zWR8Qry/3hgiaaw1Mpe++qVrLBhrGR1jYWgZ8vfiiT9nIbgyNsFfH2CCr4JhWixh HYpzL7QBU0cYcYrlCGglBUSTcBoSlT+OT6r2jdr9RsBkPimCWx6LzkDAek2SaeP2 /obzbRDWggYWXC7gpAkPv21/p7adQEpAP6pH/tIq9PQ== 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=FF+Iom u2i166YKKxaKIlz9E8tu+zwwb103uXnDq+CMk=; b=f7QdlYAvHfnkIFCTubt9oF 19fXh3oi7JJwSV71lRFi7zFIYR86TOvg8woejDsrP99KMWuyBFoEwPwqcdTH1Pbi zTak5IiLAH4BqBrToAK6X2nch+kBbIDPrimRg2Mv+t3Lai/IQLObVmJEVTwxH03J a2QGM9QVYH9dyjIGWqVPRQgi8AmQqHdqoYpQrHprY1U0fQkckKlDX5n/vst5nTUJ y/Oss38xXki8rs8cq9W93bs0A4rMVszCwrru35HfWWZJnf05+BEcmXQZW7rI7xSP qy8Wg+HWVElmntGoD+mrsvmGUT2t4r/xx/aHGYgTN6Frvco4st5SyQDvzurkqvEA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdehvddguddtkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepifhrvghg ucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecuggftrfgrthhtvghrnhepveeuhe ejgfffgfeivddukedvkedtleelleeghfeljeeiueeggeevueduudekvdetnecukfhppeek fedrkeeirdejgedrieegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepghhrvghgsehkrhhorghhrdgtohhm X-ME-Proxy: Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) by mail.messagingengine.com (Postfix) with ESMTPA id 9E4BC108005C; Tue, 12 Jan 2021 02:29:49 -0500 (EST) Date: Tue, 12 Jan 2021 08:29:46 +0100 From: Greg KH To: Jorge Fernandez Monteagudo Subject: Re: How to replace set_fs(KERNEL_DS) for a kernel 5.10.x module driver version Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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.org On Tue, Jan 12, 2021 at 07:21:46AM +0000, Jorge Fernandez Monteagudo wrote: > Hi all, this is my first post in this mailing list... I hope to find an answer. I've post the question in stackoverflow with the same tittle with no answers yet. Since then, I've been able to reduce the demo kernel module to minimum in order to show but I see. The minimum kernel module code is attached at the end. > > My kernel module was working ok up to kernel 5.10.x. My kernel module adds a layer above the cdc-acm class driver to use all the infrastructure this driver because the hardware it controls has a ttyACMx device. The minimum kernel module code attached shows how I open the ttyACMx device and try to set the baudrate. Once the device is opened I use the unlocked_ioctl function with TCSETS to set the new device properties. > > ret = fd->f_op->unlocked_ioctl(fd, TCSETS, (unsigned long int) &newtio); Ick, why do all of this from the kernel and not just do it from userspace? Do you have a pointer to the source of your whole module so we can help with solving the root problem and not mess with this specific implementation which is not the correct thing to do at all. thanks, greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies