lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <14213195-29fa-48d9-8fc4-ccdc9b6f7ecc@kernel.org>
Date: Sat, 18 Oct 2025 19:24:25 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Kumari Pallavi <kumari.pallavi@....qualcomm.com>,
 kpallavi@....qualcomm.com, srini@...nel.org, amahesh@....qualcomm.com,
 arnd@...db.de, gregkh@...uxfoundation.org
Cc: quic_bkumar@...cinc.com, ekansh.gupta@....qualcomm.com,
 linux-kernel@...r.kernel.org, quic_chennak@...cinc.com,
 dri-devel@...ts.freedesktop.org, linux-arm-msm@...r.kernel.org,
 jingyi.wang@....qualcomm.com, aiqun.yu@....qualcomm.com,
 ktadakam@....qualcomm.com
Subject: Re: [PATCH v2 2/3] misc: fastrpc: Add support for new DSP IOVA
 formatting

On 15/10/2025 06:57, Kumari Pallavi wrote:
>  static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
>  {
>  	struct device *rdev = &rpdev->dev;
> @@ -2291,6 +2319,22 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
>  	const char *domain;
>  	bool secure_dsp;
>  	unsigned int vmids[FASTRPC_MAX_VMIDS];
> +	struct device_node *root;
> +	const struct of_device_id *match;
> +	const struct fastrpc_soc_data *soc_data = NULL;
> +
> +	root = of_find_node_by_path("/");
> +	if (!root)
> +		return -ENODEV;
> +
> +	match = of_match_node(qcom_soc_match_table, root);

This is really odd way of doing things. You want to check machine, not
some node. Use proper API for that.

OTOH, I don't understand why you are checking machine in the first
place. If your device is different, then please follow writing bindings
- it explains exactly this case here.

> +	of_node_put(root);
> +	if (!match || !match->data) {
> +		 soc_data = &default_soc_data;
> +		 dev_dbg(rdev, "no compatible SoC found at root node\n");
> +	} else {
> +		 soc_data = match->data;
> +	}
>  


Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ