[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y+3Ou02LwsfS0TLl@kroah.com>
Date: Thu, 16 Feb 2023 07:35:39 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Elliot Berman <quic_eberman@...cinc.com>
Cc: Alex Elder <elder@...aro.org>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Prakruthi Deepak Heragu <quic_pheragu@...cinc.com>,
Murali Nalajala <quic_mnalajal@...cinc.com>,
Trilok Soni <quic_tsoni@...cinc.com>,
Srivatsa Vaddagiri <quic_svaddagi@...cinc.com>,
Carl van Schaik <quic_cvanscha@...cinc.com>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Arnd Bergmann <arnd@...db.de>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Jonathan Corbet <corbet@....net>,
Bagas Sanjaya <bagasdotme@...il.com>,
Catalin Marinas <catalin.marinas@....com>,
Jassi Brar <jassisinghbrar@...il.com>,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v10 13/26] gunyah: vm_mgr: Add ioctls to support basic
non-proxy VM boot
On Tue, Feb 14, 2023 at 01:24:26PM -0800, Elliot Berman wrote:
> + case GH_VM_SET_DTB_CONFIG: {
> + struct gh_vm_dtb_config dtb_config;
> +
> + if (copy_from_user(&dtb_config, argp, sizeof(dtb_config)))
> + return -EFAULT;
> +
> + dtb_config.size = PAGE_ALIGN(dtb_config.size);
> + ghvm->dtb_config = dtb_config;
Do you really mean to copy this tiny structure twice (once from
userspace and the second time off of the stack)? If so, why?
And where are the values of the structure checked for validity? Can any
64bit value work for size and "gpa"?
thanks,
greg k-h
Powered by blists - more mailing lists