From patchwork Tue Jan 5 16:20:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Elwell X-Patchwork-Id: 11999723 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 282FEC433E0 for ; Tue, 5 Jan 2021 16:22:36 +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 C70F322C9D for ; Tue, 5 Jan 2021 16:22:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C70F322C9D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=raspberrypi.com 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:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kqmUEY9u4w4Ug76mFZD/K/bssaflnXIcRK/UzPqew50=; b=r4SsML8HKgoK/9vj/WsSkbZXZ TGhVPiWxob3GiyILojT0ZcP+5zXYhpCxoSbNCG9niL4JD2LpEPCrNjUsZqXnsHosU4rPPBLVCikqc 4T6qQvU/YsCrvxoQSeGv1B1/unKS3CAXvX3wqFAJsjkxXVs6IIe1mV9xJ5hQgMjC+OlxUy8JiGf0D 2WOjq03LA/it/jcjOncR1CnmsdXgXFlc7v1DMJ1JQ43wYqPSt/glXNe3shAtuFi+e4DtG3ly4+v+9 kUHDy2iYxtptJcgxw+gzmHBLoEViZVWq88cBg4X8wnztcs+Y0ktjIEliLfUQHek2tNVJu2QJMhWF3 FiQv4JneQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kwp4g-0000Db-G7; Tue, 05 Jan 2021 16:20:46 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kwp4d-0000CV-50 for linux-arm-kernel@lists.infradead.org; Tue, 05 Jan 2021 16:20:44 +0000 Received: by mail-wr1-x42e.google.com with SMTP id y17so36730469wrr.10 for ; Tue, 05 Jan 2021 08:20:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=31WFzOSKmhxLpwB1rhJjCKmLgA51L1dzh5S2ypQ2fbA=; b=oVwoUPH0zFhrsWDYXv3FK0nym+VJOpUOX6S3lqL+MgyxSgopOsuTb4dCX+d64QjSZ3 eiucYsrbG8xP7joxz1UaPbUAKXVXXNxDK0jb+mBkcQor5fRkhZZqq04uLmH5K/TID4Tj f3O+xd/EEi5vnctLFkJdtyL/PmazRAN1iial6Xt0gY0tlZJ/LlSS32iNYFFLNDEyYM5d iQNsjNbpdbF1bMap46zXDvhHhCvBZ4QoFLaAb0lusFnm90RIu1XUJ6thtPbT9mUJIhUC xh+SWaxrp4HuYlcvg3kfX3IS908WUn7w3TmRtY8CK3eJooXlkuzyitbZF6GSXuFMQPSc acTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=31WFzOSKmhxLpwB1rhJjCKmLgA51L1dzh5S2ypQ2fbA=; b=XZcSZ71JfL7J+p5HFhw7TMJ6Vgt0BLmHEf2WETJ9HUht6eit4tjt9ZCmWkbDDZqQdL 7zbP5oeA7QCLOaNHtQrYx0wQKeOo4VqzG31AF2VSgzmvyrxQw5V9+rDz9tjMV99h9Gv1 JZb1Kv0BpKSZBUrR+p9RZfsoiGbRJy4kCTOeelxK7w8wb2Ho0gG7fxtHYISUy3m4XAZ0 Y2kcpPEFDzPUppYuaH/2PcFn2F29jdirGNEweK3wAbYA8SPMuGPD1FujTTfG6FvvV1oI IbaRG2JOxYZK25Bmv9GadUkSPL50ejH77DkPIDfDqXvplKgHLNKIBpn9cviRI1aOw7S6 Fz2w== X-Gm-Message-State: AOAM531Zl1bt7B9zeYJa3V928aO4ImCsjGB95XaMOk8ZynShT9GqXFn/ 49qvIlVNopsp8YyHpUl3zXR0Bcw9Ws0Nkg== X-Google-Smtp-Source: ABdhPJzY39igqV3VJCJtIiuRebqqId1DxcdoUxPlf7vThovnNfWjEMZLXqTNUGEgODC9wrP0xZAogw== X-Received: by 2002:adf:a3c3:: with SMTP id m3mr346384wrb.105.1609863641916; Tue, 05 Jan 2021 08:20:41 -0800 (PST) Received: from buildbot.pitowers.org ([2a00:1098:3142:14:ae1f:6bff:fedd:de54]) by smtp.gmail.com with ESMTPSA id r82sm6654wma.18.2021.01.05.08.20.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jan 2021 08:20:41 -0800 (PST) From: Phil Elwell To: Nicolas Saenz Julienne , Greg Kroah-Hartman , Arnd Bergmann , Dan Carpenter , Stefan Wahren , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org Subject: [PATCH v2 1/3] staging: vchiq: Fix bulk userdata handling Date: Tue, 5 Jan 2021 16:20:28 +0000 Message-Id: <20210105162030.1415213-2-phil@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210105162030.1415213-1-phil@raspberrypi.com> References: <20210105162030.1415213-1-phil@raspberrypi.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210105_112043_219020_44A5364F X-CRM114-Status: GOOD ( 15.13 ) 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: Phil Elwell Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The addition of the local 'userdata' pointer to vchiq_irq_queue_bulk_tx_rx omitted the case where neither BLOCKING nor WAITING modes are used, in which case the value provided by the caller is not returned to them as expected, but instead it is replaced with a NULL. This lack of a suitable context may cause the application to crash or otherwise malfunction. Fixes: 4184da4f316a ("staging: vchiq: fix __user annotations") Signed-off-by: Phil Elwell Tested-by: Stefan Wahren --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index f500a7043805..2a8883673ba1 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -958,7 +958,7 @@ static int vchiq_irq_queue_bulk_tx_rx(struct vchiq_instance *instance, struct vchiq_service *service; struct bulk_waiter_node *waiter = NULL; bool found = false; - void *userdata = NULL; + void *userdata; int status = 0; int ret; @@ -997,6 +997,8 @@ static int vchiq_irq_queue_bulk_tx_rx(struct vchiq_instance *instance, "found bulk_waiter %pK for pid %d", waiter, current->pid); userdata = &waiter->bulk_waiter; + } else { + userdata = args->userdata; } /* From patchwork Tue Jan 5 16:20:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Elwell X-Patchwork-Id: 11999725 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 BB6B3C433DB for ; Tue, 5 Jan 2021 16:22:45 +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 73A0822CA0 for ; Tue, 5 Jan 2021 16:22:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 73A0822CA0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=raspberrypi.com 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:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kMIqOMEhGJGtlrEoa6vepPO0ix0Jh0Wue/bCRC02usQ=; b=sTr4gKiNABrl7OiRLWh5IvVB/ 2b6lxuqycoZH9A0qYoN0+YsKiR7siaEHOngmZPU43+N8RLLXb2xMEGAwMoTLhvLCvcFtjvgTns45F TN3cid99IUFz/6Pq8rEiGnCVv4Q5K7bGXU4P3LddmCa6GxuL3k4nv9j7uCCFilYfOmfC9D3MkbZY+ O9RSj6YCOXox0f55T1gB0l8tXF4lS3o+eCpEYEMP7Ya6bfwsMn7IP9Ibv95nOY5RBU36UU+KueH5h 1jI9csRt+MUzmrVG7AyHLc0Op/Eh4xcNg3WN6PpvkqNnpVZM257Fs3GlTyRHe29wJ1Q+ZOoRQj50b FgRGmjRNQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kwp5C-0000Ke-El; Tue, 05 Jan 2021 16:21:18 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kwp5A-0000Jl-6E for linux-arm-kernel@lists.infradead.org; Tue, 05 Jan 2021 16:21:16 +0000 Received: by mail-wm1-x32a.google.com with SMTP id y23so102007wmi.1 for ; Tue, 05 Jan 2021 08:21:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NX9GgUhvrdFINxLCVAgA1k2tN4aNPfLwDkftpmTakS4=; b=DHjLS8IzLeEntGuAA9wXm1+luX3XSq9lobGlMYt7iBi9Qp+p7MfB5jmYIjD1vvB/KR SBBKZe6YT/jr3MA2evkNYq1lxxfOgBFioOWFDSUIAsN3ksjsLwaCwigVC7UhosecFosE VZ3/o1CyAEY3yCfD3CyuudgTqDncB2vOGKON2gnLWvSS+rzvacwEhMCM2WdGesj/u9vs ZxlYlfRXUbGuoy/LbzxZA05hdzMa8kUSvNVDhvD1Unp4ZblxV/yoDKdbvRUnYg+tSTso 6Tlr6tHyowr5W7coUDdWVhMumnNz0tazEbSntWa/HcTg711kh7WWboia42hU4xInLcVp FDHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NX9GgUhvrdFINxLCVAgA1k2tN4aNPfLwDkftpmTakS4=; b=tmtjx8N4cjM8lu1eKH6FOK0fBgBluNkupXSOzQlBCSgaMG1hQG9A2Mp3szO+fCVvLp 8/tiPni7kv7BdIQOWEqaLfYSpXPfmYQd+8TI/OB9FnqQpT4EwqTjpYMKYHu06G+/tJSC mUpXdXbycV6QmENByu+u6TkQailmmXXgQLnWaGe2Y2ayIgJ2dOQE5Iod7iiL+3JqQz/D QVDCYkLT5a8wWqZvTtBkfvXRZxVsvjARgXCXE4Rh1TbRuAGSmVA7dNqO9Gq0/b56VCaG PY68vpr0WBee4d7ivlKoFqp1Tl1rBndOoYu+CW3vzsaN4aW874Tsio68oX5QYrJmCJN2 dwtQ== X-Gm-Message-State: AOAM530sV+7kYDQz/eOjaBi6QOq04oKUeo5JsVCbffVDapiCN2z9Vv8a grpCAnwz88IL2o/77F4K7wEKRA== X-Google-Smtp-Source: ABdhPJxeQeNlXlsMq20TUsc4rPZnAT1HbVfOQWK/vG6xY2/s75TU8LKviTj0s3Y811fzpLHq42i5OA== X-Received: by 2002:a1c:4107:: with SMTP id o7mr27511wma.69.1609863675416; Tue, 05 Jan 2021 08:21:15 -0800 (PST) Received: from buildbot.pitowers.org ([2a00:1098:3142:14:ae1f:6bff:fedd:de54]) by smtp.gmail.com with ESMTPSA id r82sm6654wma.18.2021.01.05.08.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jan 2021 08:21:14 -0800 (PST) From: Phil Elwell To: Nicolas Saenz Julienne , Greg Kroah-Hartman , Arnd Bergmann , Dan Carpenter , Stefan Wahren , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org Subject: [PATCH v2 2/3] staging: vchiq: Fix bulk transfers on 64-bit builds Date: Tue, 5 Jan 2021 16:20:29 +0000 Message-Id: <20210105162030.1415213-3-phil@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210105162030.1415213-1-phil@raspberrypi.com> References: <20210105162030.1415213-1-phil@raspberrypi.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210105_112116_275786_3A02FD84 X-CRM114-Status: GOOD ( 13.92 ) 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: Phil Elwell Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The recent change to the bulk transfer compat function missed the fact the relevant ioctl command is VCHIQ_IOC_QUEUE_BULK_TRANSMIT32, not VCHIQ_IOC_QUEUE_BULK_TRANSMIT, as any attempt to send a bulk block to the VPU would have shown. Fixes: a4367cd2b231 ("staging: vchiq: convert compat bulk transfer") Signed-off-by: Phil Elwell Acked-by: Arnd Bergmann --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 2a8883673ba1..2ca5805b2fce 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -1717,7 +1717,7 @@ vchiq_compat_ioctl_queue_bulk(struct file *file, { struct vchiq_queue_bulk_transfer32 args32; struct vchiq_queue_bulk_transfer args; - enum vchiq_bulk_dir dir = (cmd == VCHIQ_IOC_QUEUE_BULK_TRANSMIT) ? + enum vchiq_bulk_dir dir = (cmd == VCHIQ_IOC_QUEUE_BULK_TRANSMIT32) ? VCHIQ_BULK_TRANSMIT : VCHIQ_BULK_RECEIVE; if (copy_from_user(&args32, argp, sizeof(args32))) From patchwork Tue Jan 5 16:20:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Elwell X-Patchwork-Id: 11999727 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 4EAD4C433E0 for ; Tue, 5 Jan 2021 16:22:48 +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 06A6122C9D for ; Tue, 5 Jan 2021 16:22:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 06A6122C9D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=raspberrypi.com 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:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZmyVdR8az15sF7wBWZdpQwUI9jCvb3VjLEcWBDpzq/4=; b=aSnokDIeQcFBgpLpra2cSoSNR HUSsG6bdeeHtae6QTIdB1m1BHRg4UugAsEdv6SlTla27xMeBuLczNo4M1osPK5tSt4VN8jdVEEVVo SXzSZQww4iBOC78NcONw0RMCGNmOM/R08eszs6tSK9NleUu2m2gSrNUaxhVLupIfLssONe2jm8J+/ vh6MZA4yw+rfNrlfkiAleaEIfU4dlxEk8lhAB4141QMsaGQk/kuMzTA46VNN6vePKl/6+pH3UfCoA lbcvToBh6s3RZuFLXyD109Emtsgwur2bktx2t8/y9pGgZMd0T08xbwbDkfzmsVKzCeT8bK0xX3PfB H8M403NMg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kwp5H-0000MQ-0b; Tue, 05 Jan 2021 16:21:23 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kwp5D-0000Kh-0J for linux-arm-kernel@lists.infradead.org; Tue, 05 Jan 2021 16:21:20 +0000 Received: by mail-wm1-x329.google.com with SMTP id c133so76087wme.4 for ; Tue, 05 Jan 2021 08:21:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NCnvHAHkzUFnoq0ovTDscrNRoGR9Jfo5kX1KshXgTPQ=; b=GcGVJ5DiKgpyGN650ea3kJ3OqoxuRBt3m7JNWj6eRU7OrMTpwp8DBIDryiiLPGVdI/ dh50hlfyhdatZLCfeyLtFz6liCbmwUjAZA0paYVlkEe+if3IcA7GuWHfoon1CtYzibn7 NOJMisZwgH+sXGWdR8FoOkd9toE8qZbuw+bC0o1tvWeJhYaLIWrHV241Ksh5WrdHDisQ jleRvutwfmTLsRhQY3sPLgHRUVd8bHeUPoJmKoQAyH1Tj3OU1ZjPML6j/XVr5/d2GHRi OnAtNjQ0BO44HCrGMEgJQvlcM/LOdwjdiym4a3zEP29UuYEMyFJoGg8StowwQ1hMI4be 0IhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NCnvHAHkzUFnoq0ovTDscrNRoGR9Jfo5kX1KshXgTPQ=; b=reuLtgRVfCvyPfeg3eDhKEn7YGkUOQzyehNu2mhQESGcv6Ho60ezEu6OL0qAbT/coN nT2a4bR2pWNvErsn4aCIv8PCS/7TIqQPGQz8kZEkM6WyH5mA4nXN6lWLoVa31zHj9u/x aHUKJdCZXvMlkjlSZeIJ+6c29pyLWLEWK3LXGteziyxChlEaH5iIfEEy8362cV06Rgvw Pg0h5QZCtxzMLmce+kNr4PZvZ7wrrbq3IUFUqKxq/Evp+/vfJzeyQBIgxe6Uy0PQZ54+ /zZav/KYXCCOuPU+x90E2+usV2IEPvWbQXyddNXdbCDEXGMRFPt/J8ijseBnG8A5Im3R v0aw== X-Gm-Message-State: AOAM532kFQTgXHaaBCZj0U73P1GbY0aSW7bOfFRcwp7BUTNkpcnT6+g3 KRQeVxDntkHgsjaGROxGilyaCQ== X-Google-Smtp-Source: ABdhPJzJVka5prqJOPLT5+7ebYaW2AjwFFLUlLmL+aeR3cbuNjNdTMNyHZLDLIGue0s1kqlGKOCXRg== X-Received: by 2002:a1c:6208:: with SMTP id w8mr57053wmb.96.1609863677626; Tue, 05 Jan 2021 08:21:17 -0800 (PST) Received: from buildbot.pitowers.org ([2a00:1098:3142:14:ae1f:6bff:fedd:de54]) by smtp.gmail.com with ESMTPSA id r82sm6654wma.18.2021.01.05.08.21.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jan 2021 08:21:17 -0800 (PST) From: Phil Elwell To: Nicolas Saenz Julienne , Greg Kroah-Hartman , Arnd Bergmann , Dan Carpenter , Stefan Wahren , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org Subject: [PATCH v2 3/3] staging: vc04_services: Add a note to the TODO Date: Tue, 5 Jan 2021 16:20:30 +0000 Message-Id: <20210105162030.1415213-4-phil@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210105162030.1415213-1-phil@raspberrypi.com> References: <20210105162030.1415213-1-phil@raspberrypi.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210105_112119_157842_3FC8C5D0 X-CRM114-Status: GOOD ( 13.59 ) 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: Phil Elwell Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Record in the TODO file that the address of "&waiter->bulk_waiter" should never be returned to userspace. Signed-off-by: Phil Elwell --- drivers/staging/vc04_services/interface/TODO | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/staging/vc04_services/interface/TODO b/drivers/staging/vc04_services/interface/TODO index fc2752bc95b2..0bcb8f158afc 100644 --- a/drivers/staging/vc04_services/interface/TODO +++ b/drivers/staging/vc04_services/interface/TODO @@ -91,3 +91,7 @@ The first thing one generally sees in a probe function is a memory allocation for all the device specific data. This structure is then passed all over the driver. This is good practice since it makes the driver work regardless of the number of devices probed. + +14) Clean up Sparse warnings from __user annotations. See +vchiq_irq_queue_bulk_tx_rx(). Ensure that the address of "&waiter->bulk_waiter" +is never disclosed to userspace.