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] [day] [month] [year] [list]
Message-ID: <CAKi4VAJuvrpBdCecG=xcZt3K5r2ffnRAXsh_Yj=85eE+ey-t0w@mail.gmail.com>
Date:	Tue, 10 Sep 2013 00:55:01 -0300
From:	Lucas De Marchi <lucas.de.marchi@...il.com>
To:	Tom Gundersen <teg@...m.no>
Cc:	linux-modules <linux-modules@...r.kernel.org>,
	lkml <linux-kernel@...r.kernel.org>, Kay Sievers <kay@...y.org>,
	Lucas De Marchi <lucas.demarchi@...fusion.mobi>
Subject: Re: [PATCH] depmod: warn on invalid devname specification

Hi Tom,

On Mon, Sep 9, 2013 at 3:01 PM, Tom Gundersen <teg@...m.no> wrote:
> During the last merge window (3.12) a couple of modules gained devname
> aliases, but without the necessary major and minor information. These were
> then silently ignored when generating modules.devname.
>
> Complain loudly to avoid such errors sneaking in undetected in the future:
>
>     depmod: ERROR: Module 'zram' has devname (zram) but lacks major and minor information. Ignoring.
>     depmod: ERROR: Module 'uhid' has devname (uhid) but lacks major and minor information. Ignoring.
>
> Cc: Kay Sievers <kay@...y.org>
> Cc: Lucas De Marchi <lucas.demarchi@...fusion.mobi>
> ---
>  tools/depmod.c | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/tools/depmod.c b/tools/depmod.c
> index 985cf3a..5855b2a 100644
> --- a/tools/depmod.c
> +++ b/tools/depmod.c
> @@ -2120,11 +2120,18 @@ static int output_devname(struct depmod *depmod, FILE *out)
>                                 minor = min;
>                         }
>
> -                       if (type != '\0' && devname != NULL) {
> +                       if (type != '\0' && devname != NULL)
> +                               break;
> +               }
> +
> +               if (devname != NULL) {
> +                       if (type != '\0')
>                                 fprintf(out, "%s %s %c%u:%u\n", mod->modname,
>                                         devname, type, major, minor);
> -                               break;
> -                       }
> +                       else
> +                               ERR("Module '%s' has devname (%s) but "
> +                                   "lacks major and minor information. "
> +                                   "Ignoring.\n", mod->modname, devname);
>                 }
>         }
>
> --

Patch has been applied. Thanks.

Lucas De Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ