Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4178571rwb; Mon, 31 Jul 2023 02:48:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlHtKXd9ho1BGVcJcQyPceraJUCT+eA1ICyO4awPORWujH3MnL9vBIr/EkwEFUKKCSCmVUTQ X-Received: by 2002:a05:6358:249f:b0:135:515c:38ee with SMTP id m31-20020a056358249f00b00135515c38eemr10696478rwc.25.1690796928174; Mon, 31 Jul 2023 02:48:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690796928; cv=none; d=google.com; s=arc-20160816; b=09dkJL5GQ/98Tn6iYUa7dGf+7Kpcrv4OReIxvlywJtvj4k3ltjWOqfGHZBWdPYqHj0 TIJQwrJqMKik8d79vO8Jl2DMCbOIboHHv85Ew5UO1PbxR5eBKjXo+I8E2FTUuSQnSnHk h5D8BGKT/ljzSxfoXZmtMjwqT519M33yUOHJFXjan1f2eCAkmZG90ZGp3Re8V7QUOUOG O3k2J4+/gnF6SXJR7GRIR7W8+IpnUr9D7otFI/SpkSWzwhh61kxp2DuARe+wGESzCdVu DDpkOYj+LB0QuEjit+pgoV2q3tDOOKJEUF7v5Mgd/MaUAKZkk05Xr+dUaSMxwDfrd/gW IwUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=mYG0LasLifyyUM7Rwt2a0NjqR/rKg7HRv/UVMGYC+s0=; fh=u8FNBzTD7PPmCCS6ytaoGcyOSB3wUBR1jDQZwmXE3V4=; b=hg+KCXgmwHKClOLUrDNPwd3PPDsdiDwwuBWbBuRVNUGkRKMFmSsqHHnzBRBdS5jA50 8eUO9mZpZa3WhJb1KsBTZ7IRCYU7NpzfiHqRZCcnybyRx8IJPsHhfLYUxKpEWYqiN+FR yM7rGIXTmPgEjvJm+pplvWBHwyS8Lhh4Rr+JsalbUVcsUUBT2+pAYZiR6dWmLSrhrm/K uuEzAFr1UUQSyYi1ZAd1t3TKhMHM2Nto9kzdSwcE9FI2yaMSS5BttXiLrSccHH/iZGNO 7mtk6yLJSmnzxvAVFOgsD9sjI6YDaurBvUotOIWm8Swj/Nn2p6VB0pek6hWOaYZrJ721 +2Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="bQvvl/B5"; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n14-20020a65488e000000b00563e87fe3dcsi3149571pgs.548.2023.07.31.02.48.36; Mon, 31 Jul 2023 02:48:48 -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=@linaro.org header.s=google header.b="bQvvl/B5"; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229893AbjGaISq (ORCPT + 99 others); Mon, 31 Jul 2023 04:18:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232132AbjGaISV (ORCPT ); Mon, 31 Jul 2023 04:18:21 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D18472111 for ; Mon, 31 Jul 2023 01:15:38 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-4fe1489ced6so6692673e87.0 for ; Mon, 31 Jul 2023 01:15:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690791337; x=1691396137; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=mYG0LasLifyyUM7Rwt2a0NjqR/rKg7HRv/UVMGYC+s0=; b=bQvvl/B5tmOti6yZEthNbWipKzs48ju0grUG9tHoZV/l+Ad9JAM4+FLF2dmQQMoz7M A+usfwRp8znkWl4k7fAOM8+pA7fR3iz1nN4Xuo0SVjeIo2h8NZGrP/D3uEjC3ujgN7lQ jpyw4hIsOM9xgl7weU4KmNVcFBztPJwgxhaIRs8T5rlSUVl1ZjzhTG+o6K6BrtHBugj3 ghwIVYBXqMTkLKBsgSgb24pfNladB4HFpw/qQ3EAA6jO3OtO/cSJvtETNb5SNZ+qW/DJ aOzfu8kqujjSjniHI6pUTarYdIoH+s4ZCOdbvGbF41lW+HlBAilP+9qDcwU9xs82PfbP aGlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690791337; x=1691396137; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mYG0LasLifyyUM7Rwt2a0NjqR/rKg7HRv/UVMGYC+s0=; b=RtVvHCBond/zILGJK1ziigRZiTjAoixxo/4lzkH+5k7CiayH19FcYqQrSEpBB1pVWj T/yuq3TZIjveZinNVR/JBxiTtowkMG/v/OS2D2PIuNMpJfKi4pkhhrdNeuS+R9HR+9W5 c+w8vvokX7yiOftP9n1IZTIcNM2O9jMWFwQ7vIPxQvcZW4ukfT6BliY8n1UP8w/liDyJ Ci/62AfAi/XuTTksDR8Fj5vLc6oagDa39p34XimXfYdla1caa6HcK+GBoCMxv+xLZBNH zRT/uMHjSPEGE5l+DrPwqNeqsj3qSws7y1tTxhUiKsBTAdZpwVQIsqIBV5HoLUcg2tLB OKCw== X-Gm-Message-State: ABy/qLZ5ix2tsOCTayW1w43l1W94BjxR/Gz4jXt3PkEm/Q99GoFSf7sI SB63cEBvp1txsU0T5ZeOMQHDLQ== X-Received: by 2002:a05:6512:1105:b0:4fe:8b5:588a with SMTP id l5-20020a056512110500b004fe08b5588amr6068382lfg.57.1690791336811; Mon, 31 Jul 2023 01:15:36 -0700 (PDT) Received: from [192.168.1.101] (abyk53.neoplus.adsl.tpnet.pl. [83.9.30.53]) by smtp.gmail.com with ESMTPSA id f14-20020ac2532e000000b004fb73bea65esm1975317lfh.25.2023.07.31.01.15.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Jul 2023 01:15:36 -0700 (PDT) Message-ID: <93dd0930-8699-9995-c9ac-d361c4c385f1@linaro.org> Date: Mon, 31 Jul 2023 10:15:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/4] soc: qcom: aoss: Add debugfs interface for sending messages Content-Language: en-US To: Bjorn Andersson , Bjorn Andersson , Chris Lew Cc: 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 References: <20230731041013.2950307-1-quic_bjorande@quicinc.com> <20230731041013.2950307-3-quic_bjorande@quicinc.com> From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27k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nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <20230731041013.2950307-3-quic_bjorande@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 31.07.2023 06:10, Bjorn Andersson wrote: > From: Chris Lew No QUIC email? [...] > +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) >=? Otherwise the last char may be overwritten by the NULL termination couple lines below > + return -EINVAL; > + > + if (copy_from_user(buf, userstr, len)) > + return -EFAULT; > + buf[len] = '\0'; > + > + ret = qmp_send(qmp, buf); > + if (ret < 0) > + return ret; > + > + return len; > +} Konrad