Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1262887rdg; Fri, 11 Aug 2023 15:50:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEMOo4RQDCktfgEyTInH0h/FynQ+DHyoCwR2TEcH9MqEupkVlUhxbzUjenIIG53Ik7D+wXf X-Received: by 2002:a17:907:1622:b0:99c:572:c0e4 with SMTP id hb34-20020a170907162200b0099c0572c0e4mr7156210ejc.7.1691794211456; Fri, 11 Aug 2023 15:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691794211; cv=none; d=google.com; s=arc-20160816; b=0u3j4ec4x1gh0b1iDPQ8M6VvvAiFKu2mMoO2PGhbC92xxG633gcjNzT/wQ0w6Mh6mT 0JYLOjhcsr0EBd3atCYHYrSsGc2AwyRMxwXAGMamcVSi7UnhkOps9KhjBj2hCFvImfuf f+zLZpj+2nvHUXQOgUauka5AseQ7zo+DmTXgZhV+4ZwAlmuTM29Lnp2LdPk66DiLKhjX qt671lQaLHWxfiRVzMuHwgYbI7rX9lHkVCjR9JQSSTwJE66El7+xc77rR/nkKFBKfvwz Bw4DNnmbOKXLswf7ogy0H1H0ylW3xdxWK6o+qrxdRyYPT3r2aFtgviFipzd9avhTHwKI MpTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/Jpy95QT2Gj0P5lCOqBdXXUs2+WPR8bargTYgOq+jIE=; fh=mtdQ59qYqATJb4gPphme4tGaDwiPyxQYR7F/rZgivog=; b=H+sdXdqweNTilgcdqZ3ZPYX7ewZ6IlvWP5PZpP7wzGf8ZGwlSwKrHVWvHpbJ9AKU/a /7++L9NupZfhm7u5wS5E4wCViw9v3ZSZcTxG/FE9HnYmbGr/ZYnrn87nJ0aRCjaLUNoV eXrC6SxTy0he+R7wH2eF13Gp9NTMP1puv8LvgjEr7Osr8+kh4ZsRalL9VAqS3SjucGVn NjXmg28SMO9wyjxBqHLejXwcsBXbUIKsJLCstGwOPRC17xrlRwvb3e1tsvBr412Fqq4N 47WOmMjedrDdTR8BEW7K+Sy2kWB3gLhxSQ8perXcbDnjcN5eLPAUzQnxIAAyV1VKWY5+ FrRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=tKzL+KVT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cb1-20020a170906a44100b0098f564f636esi4332230ejb.132.2023.08.11.15.49.47; Fri, 11 Aug 2023 15:50:11 -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; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=tKzL+KVT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236739AbjHKVCD (ORCPT + 99 others); Fri, 11 Aug 2023 17:02:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236814AbjHKVB7 (ORCPT ); Fri, 11 Aug 2023 17:01:59 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE8C5E7E; Fri, 11 Aug 2023 14:01:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=/Jpy95QT2Gj0P5lCOqBdXXUs2+WPR8bargTYgOq+jIE=; b=tKzL+KVTlHYFtLvSuw1fpzMkAi Dow3493P0T+n8+qGJA7IrMXwCn7NFXJ7o93JSJtCNW5gcaD4lIGaThl5SPSmO56He5VbIrMGZWGfR kBwoUeGgIPT25AxvVRlZiAvzhJ4/6rJJsePtFPIhRcSJpOeFQvTE7QFDrMyVJs16PPKI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qUZGY-003qQb-CL; Fri, 11 Aug 2023 23:01:50 +0200 Date: Fri, 11 Aug 2023 23:01:50 +0200 From: Andrew Lunn To: Bjorn Andersson Cc: Bjorn Andersson , Konrad Dybcio , Chris Lew , Alex Elder , "David S. Miller" , Jakub Kicinski , Mathieu Poirier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org Subject: Re: [PATCH v2 2/4] soc: qcom: aoss: Add debugfs interface for sending messages Message-ID: References: <20230811205839.727373-1-quic_bjorande@quicinc.com> <20230811205839.727373-3-quic_bjorande@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230811205839.727373-3-quic_bjorande@quicinc.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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 > +static ssize_t qmp_debugfs_write(struct file *file, const char __user *userstr, > + size_t len, loff_t *pos) > +{ > + struct qmp *qmp = file->private_data; > + char buf[QMP_MSG_LEN]; > + int ret; > + > + if (!len || len >= QMP_MSG_LEN) > + return -EINVAL; > + > + if (copy_from_user(buf, userstr, len)) > + return -EFAULT; > + buf[len] = '\0'; > + > + ret = qmp_send(qmp, buf); > + if (ret < 0) > + return ret; Sorry, but you still appear to be sending binary blobs from userspace to the firmware. This is not liked. The documentation you pointed to has three commands. Please implement three debugfs files, one per command. Andrew --- pw-bot: cr