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.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 B19BCC433DB for ; Tue, 5 Jan 2021 15:13:51 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 6748122B45 for ; Tue, 5 Jan 2021 15:13:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6748122B45 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 16B7D85FB2; Tue, 5 Jan 2021 15:13:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rgdZXrui-OSz; Tue, 5 Jan 2021 15:13:47 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id D386585E28; Tue, 5 Jan 2021 15:13:47 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id BBDBF1BF30A for ; Tue, 5 Jan 2021 15:13:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 94166203A0 for ; Tue, 5 Jan 2021 15:13:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uf4T5bH+YNTl for ; Tue, 5 Jan 2021 15:13:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by silver.osuosl.org (Postfix) with ESMTPS id 98BFA20367 for ; Tue, 5 Jan 2021 15:13:43 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 2A7F622BEA for ; Tue, 5 Jan 2021 15:13:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609859623; bh=MqjUnFM1qYEObcIxrdd40/0DMydoq94Cw/5OgAF6XdQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=GZv2zla4ypW06eAfrJi92frTdXt0lhbGzjbH29kDP4dNy0lhFmvx3XhALSaO7j2Z2 uBi/8Jsq2eT4NavSR003v3IOEbcD3sSBkR3QsMLYMg/uqJuTC0jUjkvTG8VdRdQnn8 pGQc7EI9WMCsI2/eofBo9ndpTbEFKbUj7Y/2LWdJzaSJJg3fcCfj9VkcNedmLON9zV +63rbx1Zpfs2SgXgCvdfvYpqsteWIaTN2+fAM8DG6nQBIHj+UHgWkI+N4A7d/NVSNj rv76qmOCLAOI+4remgxDsqVqIqrkjvbJbuVZxeyaAiylt/OYVPVbbUQNuH8nZL8Vg+ fV6IQBifzWwyg== Received: by mail-ot1-f51.google.com with SMTP id q25so29502906otn.10 for ; Tue, 05 Jan 2021 07:13:43 -0800 (PST) X-Gm-Message-State: AOAM533eqfZtOO54lqm5MWC8lGfwDNbvRQGNiGNlV/768PO6vXCI/YmD m4UcvjJ3oxuzYtPd8lvGO0iVEUNMh8Wv/azd6cU= X-Google-Smtp-Source: ABdhPJwA/H6p1+9QS0+62bmdYvonCnuUEkpfFFejSz5J7qObD+Mf5NjjnMtEb9bfHGx0tQq5sDW7E98x19TIBphGafA= X-Received: by 2002:a9d:7a4b:: with SMTP id z11mr56376299otm.305.1609859622523; Tue, 05 Jan 2021 07:13:42 -0800 (PST) MIME-Version: 1.0 References: <20210104120929.294063-1-phil@raspberrypi.com> <20210104120929.294063-2-phil@raspberrypi.com> <20210104183134.GV2809@kadam> <989ef44f-2afe-5147-1277-74df56797a4c@raspberrypi.com> <20210105110140.GW2809@kadam> In-Reply-To: From: Arnd Bergmann Date: Tue, 5 Jan 2021 16:13:26 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] staging: vchiq: Fix bulk userdata handling To: Phil Elwell X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: driverdevel , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , Arnd Bergmann , Greg Kroah-Hartman , "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , Dan Carpenter , Nicolas Saenz Julienne , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" On Tue, Jan 5, 2021 at 12:53 PM Phil Elwell wrote: > On Tue, 5 Jan 2021 at 11:04, Dan Carpenter wrote: > > > > Mixing __user pointers and regular pointers is dangerous and has lead to > > security problems in this driver in the past. But also mixing mixing > > tokens with pointers just makes the code hard to read. Instead of > > undoing Arnd's work where he split the user space and kernel pointers > > apart we should go ahead and spit it up even more. At least add a giant > > FIXME comment and an item in the TODO list so we don't forget to do this > > before removing the code from staging. > > Those all sound like valid comments to have made against the original > patch, but that seems to have received little attention. > > I'll just leave this here - perhaps Arnd has the patience to finish the job. I don't really have an interest in this driver. I did a larger cleanup in order to kill off copy_in_user() from the kernel, and then cleaned it up some more for good measure, but I would hope someone else can finish the address space mismatch. Arnd _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel 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=-4.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 748CCC433DB for ; Tue, 5 Jan 2021 15:15:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 3684322B49 for ; Tue, 5 Jan 2021 15:15:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3684322B49 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=E1DLBXQmy33Q7OEexZwb9EcAECRG0PrcdhPU6OjSbwM=; b=R8O71JJMXe5fvOyJMI3BznmMg HszKlqsbW1meBSBSPL2WXC616eJy1R+C5CT8kY0UiCwWTPoJ5qzSsk5FrCqAL1gd6nQqaDd5ajppg swLsyM1iKMwWyTghL2VjNO2CJ2hu8CFV+XHIBIEzI1fTqoQMjmvx5FaquiWxWq78EIIl8OX39JA/Y Z0Lq0tn0TkB6EHx9X6hJ7KzXydgKf5edNSbivxvxINsgfPL7KMVAplSiecmeS+iTueDzGkfIWmdmB s5qfNOA8WGAZDJe/xsZvELlM5CREU6GXGfS2eJ7o9wDuLXxKjHsHz53HV2/RT6zCBRHzYgHVxxsqc 8KPjy8Vug==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kwo1r-0006lx-TT; Tue, 05 Jan 2021 15:13:48 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kwo1p-0006l5-5V; Tue, 05 Jan 2021 15:13:46 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1DFA822B4B; Tue, 5 Jan 2021 15:13:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609859623; bh=MqjUnFM1qYEObcIxrdd40/0DMydoq94Cw/5OgAF6XdQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=GZv2zla4ypW06eAfrJi92frTdXt0lhbGzjbH29kDP4dNy0lhFmvx3XhALSaO7j2Z2 uBi/8Jsq2eT4NavSR003v3IOEbcD3sSBkR3QsMLYMg/uqJuTC0jUjkvTG8VdRdQnn8 pGQc7EI9WMCsI2/eofBo9ndpTbEFKbUj7Y/2LWdJzaSJJg3fcCfj9VkcNedmLON9zV +63rbx1Zpfs2SgXgCvdfvYpqsteWIaTN2+fAM8DG6nQBIHj+UHgWkI+N4A7d/NVSNj rv76qmOCLAOI+4remgxDsqVqIqrkjvbJbuVZxeyaAiylt/OYVPVbbUQNuH8nZL8Vg+ fV6IQBifzWwyg== Received: by mail-ot1-f45.google.com with SMTP id a109so29541166otc.1; Tue, 05 Jan 2021 07:13:43 -0800 (PST) X-Gm-Message-State: AOAM532IfH+tczDL3NdpWo+fmCKQL75cM2tpE6jAciP49KmuobKT66S7 NWYmZdpY6CmbKqCGzD2FOIX51kLYU7MsvMtaNdg= X-Google-Smtp-Source: ABdhPJwA/H6p1+9QS0+62bmdYvonCnuUEkpfFFejSz5J7qObD+Mf5NjjnMtEb9bfHGx0tQq5sDW7E98x19TIBphGafA= X-Received: by 2002:a9d:7a4b:: with SMTP id z11mr56376299otm.305.1609859622523; Tue, 05 Jan 2021 07:13:42 -0800 (PST) MIME-Version: 1.0 References: <20210104120929.294063-1-phil@raspberrypi.com> <20210104120929.294063-2-phil@raspberrypi.com> <20210104183134.GV2809@kadam> <989ef44f-2afe-5147-1277-74df56797a4c@raspberrypi.com> <20210105110140.GW2809@kadam> In-Reply-To: From: Arnd Bergmann Date: Tue, 5 Jan 2021 16:13:26 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] staging: vchiq: Fix bulk userdata handling To: Phil Elwell X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210105_101345_292408_65EB1647 X-CRM114-Status: GOOD ( 19.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: driverdevel , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , Arnd Bergmann , Greg Kroah-Hartman , "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , Dan Carpenter , Nicolas Saenz Julienne , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jan 5, 2021 at 12:53 PM Phil Elwell wrote: > On Tue, 5 Jan 2021 at 11:04, Dan Carpenter wrote: > > > > Mixing __user pointers and regular pointers is dangerous and has lead to > > security problems in this driver in the past. But also mixing mixing > > tokens with pointers just makes the code hard to read. Instead of > > undoing Arnd's work where he split the user space and kernel pointers > > apart we should go ahead and spit it up even more. At least add a giant > > FIXME comment and an item in the TODO list so we don't forget to do this > > before removing the code from staging. > > Those all sound like valid comments to have made against the original > patch, but that seems to have received little attention. > > I'll just leave this here - perhaps Arnd has the patience to finish the job. I don't really have an interest in this driver. I did a larger cleanup in order to kill off copy_in_user() from the kernel, and then cleaned it up some more for good measure, but I would hope someone else can finish the address space mismatch. Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel