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]
Date:   Mon, 20 Jan 2020 11:59:32 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Zhenzhong Duan <zhenzhong.duan@...il.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: Question about dynamic minor number of misc device

On Mon, Jan 20, 2020 at 11:26 AM Zhenzhong Duan
<zhenzhong.duan@...il.com> wrote:
> On Mon, Jan 20, 2020 at 6:03 PM Arnd Bergmann <arnd@...db.de> wrote:
> > On Mon, Jan 20, 2020 at 9:33 AM Zhenzhong Duan <zhenzhong.duan@...il.com> wrote:
> > On a  related note, I checked for drivers that call misc_register()
> > with a minor number that is not defined in include/linux/misc.h
> > and found a bunch, including some that have conflicting numbers,
> > conflicting names  or numbers from the dynamic range:
> >
> > drivers/staging/speakup/devsynth.c:#define SYNTH_MINOR 25
> > drivers/staging/speakup/speakup_soft.c:#define SOFTSYNTH_MINOR 26 /*
> > drivers/staging/speakup/speakup_soft.c:#define SOFTSYNTHU_MINOR 27 /*
> > drivers/macintosh/via-pmu.c:#define PMU_MINOR           154
> > drivers/macintosh/ans-lcd.h:#define ANSLCD_MINOR                156
> > drivers/auxdisplay/charlcd.c:#define LCD_MINOR          156
> > drivers/char/applicom.c:#define AC_MINOR 157
> > drivers/char/nwbutton.h:#define BUTTON_MINOR 158
> > arch/arm/include/asm/nwflash.h:#define FLASH_MINOR               160
> > drivers/sbus/char/envctrl.c:#define ENVCTRL_MINOR       162
> > drivers/sbus/char/flash.c:#define FLASH_MINOR   152
> > drivers/sbus/char/uctrl.c:#define UCTRL_MINOR   174
> > drivers/char/toshiba.c:#define TOSH_MINOR_DEV 181
> > arch/um/drivers/random.c:#define RNG_MISCDEV_MINOR
> > drivers/auxdisplay/panel.c:#define KEYPAD_MINOR         185
> > drivers/video/fbdev/pxa3xx-gcu.c:#define MISCDEV_MINOR  197
> > kernel/power/user.c:#define SNAPSHOT_MINOR      231
> > drivers/parisc/eisa_eeprom.c:#define    EISA_EEPROM_MINOR 241
> >
> > If you would like to help clean that up, you are definitely welcome
> > to send patches.
>
> Ok, should that be a patch for all drivers or seperate patch for each driver?

I think one patch to move the ones with unique names would be fine,
but then separate patches for

- FLASH_MINOR move and rename to avoid conflict
- change speakup to dynamic minors
- support for high dynamic minor numbers if you are really motivated
  (probably nobody needs these)

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ