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: <20180109154803.GA10213@kroah.com>
Date:   Tue, 9 Jan 2018 16:48:03 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Johan Hovold <johan@...nel.org>
Cc:     Rob Herring <robh@...nel.org>, Jiri Slaby <jslaby@...e.com>,
        linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
        Frédéric Danis 
        <frederic.danis.oss@...il.com>
Subject: Re: [PATCH 1/2] serdev: do not generate modaliases for controllers

On Mon, Jan 08, 2018 at 01:42:32PM +0100, Johan Hovold wrote:
> Serdev controllers are not bound to any drivers and it therefore makes
> no sense to generate modaliases for them.
> 
> This has already been fixed separately for ACPI controllers for which
> uevent errors were also being logged during probe due to the missing
> ACPI companions (from which ACPI modaliases are generated).
> 
> This patch moves the modalias handling from the bus type to the client
> device type. Specifically, this means that only serdev devices (a.k.a.
> clients or slaves) will have have MODALIAS fields in their uevent
> environments and corresponding modalias sysfs attributes.
> 
> Reported-by: Hans de Goede <hdegoede@...hat.com>
> Signed-off-by: Johan Hovold <johan@...nel.org>
> ---
>  drivers/tty/serdev/core.c | 72 ++++++++++++++++++++++-------------------------
>  1 file changed, 34 insertions(+), 38 deletions(-)
> 
> diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
> index 5dc88f61f506..61c85e49e178 100644
> --- a/drivers/tty/serdev/core.c
> +++ b/drivers/tty/serdev/core.c
> @@ -19,6 +19,38 @@
>  static bool is_registered;
>  static DEFINE_IDA(ctrl_ida);
>  
> +static ssize_t modalias_show(struct device *dev,
> +			     struct device_attribute *attr, char *buf)
> +{
> +	int len;
> +
> +	len = acpi_device_modalias(dev, buf, PAGE_SIZE - 1);
> +	if (len != -ENODEV)
> +		return len;
> +
> +	return of_device_modalias(dev, buf, PAGE_SIZE);
> +}
> +DEVICE_ATTR_RO(modalias);

static?

Sorry, minor nit :(

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ