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: <Y6VV5d/V4MKDz2Te@kroah.com>
Date:   Fri, 23 Dec 2022 08:16:53 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Tomas Winkler <tomas.winkler@...el.com>
Cc:     Alexander Usyskin <alexander.usyskin@...el.com>,
        Vitaly Lubart <vitaly.lubart@...el.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [char-misc-next] mei: gsc_proxy: add gsc proxy driver

On Fri, Dec 23, 2022 at 12:02:14AM +0200, Tomas Winkler wrote:
> From: Alexander Usyskin <alexander.usyskin@...el.com>
> 
> Add GSC proxy driver. It to allows messaging between GSC component
> on Intel on board graphics card and CSME device.
> GSC and MEI
> 
> Signed-off-by: Alexander Usyskin <alexander.usyskin@...el.com>
> Signed-off-by: Tomas Winkler <tomas.winkler@...el.com>
> ---
>  MAINTAINERS                                |   2 +-
>  drivers/misc/mei/Kconfig                   |   1 +
>  drivers/misc/mei/Makefile                  |   1 +
>  drivers/misc/mei/gsc_proxy/Kconfig         |  13 ++
>  drivers/misc/mei/gsc_proxy/Makefile        |   7 +
>  drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c | 205 +++++++++++++++++++++

Why a whole new subdirectory for a tiny 200 line file?

> +static int mei_gsc_proxy_component_match(struct device *dev, int subcomponent, void *data)
> +{
> +	struct device *base = data;
> +
> +	if (!dev || !dev->driver ||
> +	    strcmp(dev->driver->name, "i915") ||

I thought I had objected to this "let's poke around in a driver name for
a magic value" logic in the past.  How do you know this is always going
to work?

> +	    subcomponent != I915_COMPONENT_GSC_PROXY)
> +		return 0;
> +
> +	base = base->parent;
> +	if (!base) /* mei device */
> +		return 0;

How can a device not have a parent?

> +
> +	base = base->parent; /* pci device */

You don't know this is a pci device :(

If it is, then pass in a REAL pci device structure please.

> +
> +	dev = dev->parent;
> +	return (base && dev && dev == base);

I do not understand this statement at all, what are you doing here?

confused,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ