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-next>] [day] [month] [year] [list]
Message-ID: <20130627061419.GE15455@arwen.pp.htv.fi>
Date:	Thu, 27 Jun 2013 09:14:19 +0300
From:	Felipe Balbi <balbi@...com>
To:	"Yann E. MORIN" <yann.morin.1998@...e.fr>,
	Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
	Arnd Bergmann <arnd@...db.de>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Sam Ravnborg <sam@...nborg.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Linux OMAP Mailing List <linux-omap@...r.kernel.org>,
	Nishanth Menon <nm@...com>
Subject: regression caused by commit 8357b48549e17b3e4e402c7f977b65708922e60f

Hi,

after commit 8357b48549e17b3e4e402c7f977b65708922e60f,
omap2plus_defconfig doesn't 'hold' the answer to USB Gadget Drivers
anymore. Everytime I run oldconfig, it asks me again and again what USB
Gadget Drivers should be (M/y/?).

That's certainly not expected considering it wasn't like that before.

Here's what happens:

$ make -j18 O=/home/build/arm ARCH=arm CONFIG_DEBUG_SECTION_MISMATCH=y CROSS_COMPILE="ccache arm-linux-" omap2plus_defconfig
  GEN     /home/build/arm/Makefile
#
# configuration written to .config
#
$ make -j18 O=/home/build/arm ARCH=arm CONFIG_DEBUG_SECTION_MISMATCH=y CROSS_COMPILE="ccache arm-linux-" oldconfig
  GEN     /home/build/arm/Makefile
scripts/kconfig/conf --oldconfig Kconfig
*
* Restart config...
*
*
* USB Gadget Support
*
USB Gadget Support (USB_GADGET) [Y/n/m/?] y
  Debugging messages (DEVELOPMENT) (USB_GADGET_DEBUG) [Y/n/?] y
  Debugging information files (DEVELOPMENT) (USB_GADGET_DEBUG_FILES) [Y/n/?] y
  Debugging information files in debugfs (DEVELOPMENT) (USB_GADGET_DEBUG_FS) [Y/n/?] y
  Maximum VBUS Power usage (2-500 mA) (USB_GADGET_VBUS_DRAW) [2] 2
  Number of storage pipeline buffers (USB_GADGET_STORAGE_NUM_BUFFERS) [2] 2
  *
  * USB Peripheral Controller
  *
  Faraday FUSB300 USB Peripheral Controller (USB_FUSB300) [N/m/y/?] n
  Faraday FOTG210 USB Peripheral Controller (USB_FOTG210_UDC) [N/m/y/?] n
  Renesas R8A66597 USB Peripheral Controller (USB_R8A66597) [N/m/y/?] n
  PXA 27x (USB_PXA27X) [N/m/y/?] n
  Marvell USB2.0 Device Controller (USB_MV_UDC) [N/m/y/?] n
  MARVELL PXA2128 USB 3.0 controller (USB_MV_U3D) [N/m/y/?] n
  Renesas M66592 USB Peripheral Controller (USB_M66592) [N/m/y/?] n
  PLX NET2272 (USB_NET2272) [N/m/y/?] n
  Dummy HCD (DEVELOPMENT) (USB_DUMMY_HCD) [N/m/y/?] n
  USB Gadget Drivers [M/y/?] (NEW) m
    USB functions configurable through configfs (USB_CONFIGFS) [N/m/?] n
    Gadget Zero (DEVELOPMENT) (USB_ZERO) [M/n/?] m
    Audio Gadget (USB_AUDIO) [N/m/?] n
    Ethernet Gadget (with CDC Ethernet support) (USB_ETH) [N/m/?] n
    Network Control Model (NCM) support (USB_G_NCM) [N/m/?] n
    Gadget Filesystem (USB_GADGETFS) [N/m/?] n
    Function Filesystem (USB_FUNCTIONFS) [N/m/?] n
    Mass Storage Gadget (USB_MASS_STORAGE) [N/m/?] n
    Serial Gadget (with CDC ACM and CDC OBEX support) (USB_G_SERIAL) [N/m/?] n
    MIDI Gadget (USB_MIDI_GADGET) [N/m/?] n
    Printer Gadget (USB_G_PRINTER) [N/m/?] n
    CDC Composite Device (Ethernet and ACM) (USB_CDC_COMPOSITE) [N/m/?] n
    CDC Composite Device (ACM and mass storage) (USB_G_ACM_MS) [N/m/?] n
    Multifunction Composite Gadget (USB_G_MULTI) [N/m/?] n
    HID Gadget (USB_G_HID) [N/m/?] n
    EHCI Debug Device Gadget (USB_G_DBGP) [N/m/?] n
#
# configuration written to .config
#
$ make -j18 O=/home/build/arm ARCH=arm CONFIG_DEBUG_SECTION_MISMATCH=y CROSS_COMPILE="ccache arm-linux-" oldconfig
  GEN     /home/build/arm/Makefile
scripts/kconfig/conf --oldconfig Kconfig
*
* Restart config...
*
*
* USB Gadget Support
*
USB Gadget Support (USB_GADGET) [Y/n/m/?] y
  Debugging messages (DEVELOPMENT) (USB_GADGET_DEBUG) [Y/n/?] y
  Debugging information files (DEVELOPMENT) (USB_GADGET_DEBUG_FILES) [Y/n/?] y
  Debugging information files in debugfs (DEVELOPMENT) (USB_GADGET_DEBUG_FS) [Y/n/?] y
  Maximum VBUS Power usage (2-500 mA) (USB_GADGET_VBUS_DRAW) [2] 2
  Number of storage pipeline buffers (USB_GADGET_STORAGE_NUM_BUFFERS) [2] 2
  *
  * USB Peripheral Controller
  *
  Faraday FUSB300 USB Peripheral Controller (USB_FUSB300) [N/m/y/?] n
  Faraday FOTG210 USB Peripheral Controller (USB_FOTG210_UDC) [N/m/y/?] n
  Renesas R8A66597 USB Peripheral Controller (USB_R8A66597) [N/m/y/?] n
  PXA 27x (USB_PXA27X) [N/m/y/?] n
  Marvell USB2.0 Device Controller (USB_MV_UDC) [N/m/y/?] n
  MARVELL PXA2128 USB 3.0 controller (USB_MV_U3D) [N/m/y/?] n
  Renesas M66592 USB Peripheral Controller (USB_M66592) [N/m/y/?] n
  PLX NET2272 (USB_NET2272) [N/m/y/?] n
  Dummy HCD (DEVELOPMENT) (USB_DUMMY_HCD) [N/m/y/?] n
  USB Gadget Drivers [M/y/?] (NEW) m
    USB functions configurable through configfs (USB_CONFIGFS) [N/m/?] n
    Gadget Zero (DEVELOPMENT) (USB_ZERO) [M/n/?] m
    Audio Gadget (USB_AUDIO) [N/m/?] n
    Ethernet Gadget (with CDC Ethernet support) (USB_ETH) [N/m/?] n
    Network Control Model (NCM) support (USB_G_NCM) [N/m/?] n
    Gadget Filesystem (USB_GADGETFS) [N/m/?] n
    Function Filesystem (USB_FUNCTIONFS) [N/m/?] n
    Mass Storage Gadget (USB_MASS_STORAGE) [N/m/?] n
    Serial Gadget (with CDC ACM and CDC OBEX support) (USB_G_SERIAL) [N/m/?] n
    MIDI Gadget (USB_MIDI_GADGET) [N/m/?] n
    Printer Gadget (USB_G_PRINTER) [N/m/?] n
    CDC Composite Device (Ethernet and ACM) (USB_CDC_COMPOSITE) [N/m/?] n
    CDC Composite Device (ACM and mass storage) (USB_G_ACM_MS) [N/m/?] n
    Multifunction Composite Gadget (USB_G_MULTI) [N/m/?] n
    HID Gadget (USB_G_HID) [N/m/?] n
    EHCI Debug Device Gadget (USB_G_DBGP) [N/m/?] n
#
# configuration written to .config
#

Reverting that patch alone on linux-next helps:

$ git show
commit ddbf0162837ce7ada497f9bf2143f20c73e96c20
Author: Stephen Rothwell <sfr@...b.auug.org.au>
Date:   Wed Jun 26 17:57:47 2013 +1000

    Add linux-next specific files for 20130626
    
    Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>

$ git revert 8357b48549e17b3e4e402c7f977b65708922e60f

$ make -j18 O=/home/build/arm ARCH=arm CONFIG_DEBUG_SECTION_MISMATCH=y CROSS_COMPILE="ccache arm-linux-" omap2plus_defconfig
  GEN     /home/build/arm/Makefile
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
$ make -j18 O=/home/build/arm ARCH=arm CONFIG_DEBUG_SECTION_MISMATCH=y CROSS_COMPILE="ccache arm-linux-" oldconfig
  GEN     /home/build/arm/Makefile
scripts/kconfig/conf --oldconfig Kconfig
#
# configuration written to .config
#
$ make -j18 O=/home/build/arm ARCH=arm CONFIG_DEBUG_SECTION_MISMATCH=y CROSS_COMPILE="ccache arm-linux-" oldconfig
  GEN     /home/build/arm/Makefile
scripts/kconfig/conf --oldconfig Kconfig
#
# configuration written to .config
#

Here's bisection log:

8357b48549e17b3e4e402c7f977b65708922e60f is the first bad commit
commit 8357b48549e17b3e4e402c7f977b65708922e60f
Author: Yann E. MORIN <yann.morin.1998@...e.fr>
Date:   Tue Jun 18 19:35:29 2013 +0200

    kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG
    
    Currently, randconfig does randomise choice entries, unless KCONFIG_ALLCONFIG
    is specified.
    
    For example, given those two files (Thomas' test-case):
    
        ---8<--- Config.test.in
        config OPTIONA
            bool "Option A"
    
        choice
            prompt "This is a choice"
    
        config CHOICE_OPTIONA
            bool "Choice Option A"
    
        config CHOICE_OPTIONB
            bool "Choice Option B"
    
        endchoice
    
        config OPTIONB
            bool "Option B"
        ---8<--- Config.test.in
    
        ---8<--- config.defaults
        CONFIG_OPTIONA=y
        ---8<--- config.defaults
    
    And running:
        ./scripts/kconfig/conf --randconfig Config.test.in
    
    does properly randomise the two choice symbols (and the two booleans).
    
    However, running:
        KCONFIG_ALLCONFIG=config.defaults \
        ./scripts/kconfig/conf --randconfig Config.test.in
    
    does *not* reandomise the two choice entries, and only CHOICE_OPTIONA
    will ever be selected. (OPTIONA will always be set (expected), and
    OPTIONB will be be properly randomised (expected).)
    
    This patch defers setting that a choice has a value until a symbol for
    that choice is indeed set, so that choices are properly randomised when
    KCONFIG_ALLCONFIG is set, but not if a symbol for that choice is set.
    
    Reported-by: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
    Signed-off-by: "Yann E. MORIN" <yann.morin.1998@...e.fr>
    Cc: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
    Cc: Michal Marek <mmarek@...e.cz>
    Cc: Sam Ravnborg <sam@...nborg.org>
    Cc: Sedat Dilek <sedat.dilek@...il.com>
    Cc: Arnd Bergmann <arnd@...db.de>
    Cc: Stephen Rothwell <sfr@...b.auug.org.au>
    
    ---
    Changes v3 -> v4
      - fix previous issue where some choices would not be set, which would
        cause silentoldconfig to ask for them and was then breaking this
        workflow (as reported by Arnd and Sedat):
            KCONFIG_ALLCONFIG=foo.defconfig make randconfig
            make silentoldconfig </dev/nullo
        which I have tested (3h28min!) with:
            touch defconfig
            for(( i=0; i<10000; i++ )); do
                KCONFIG_ALLCONFIG=$(pwd)/defconfig make randconfig >/dev/null 2>&1
                make silentoldconfig </dev/null >/dev/null 2>&1 || break
            done
        which did not break at all.
      - change done in v3 (below) is already fixed by a previous patch
    
    Changes v2 -> v3
      - ensure only one symbol is set in a choice
    
    Changes v1 -> v2:
      - further postpone setting that a choice has a value until
        one is indeed set
      - do not print symbols that are part of an invisible choice
:040000 040000 cf18e4740ade73c191d8905f35b2c97abdf4bfcf be417fef0c309c2301b671ca8c19ca5b27ce8486 M      scripts


$ git bisect log
git bisect start
# good: [9e895ace5d82df8929b16f58e9f515f6d54ab82d] Linux 3.10-rc7
git bisect good 9e895ace5d82df8929b16f58e9f515f6d54ab82d
# bad: [ddbf0162837ce7ada497f9bf2143f20c73e96c20] Add linux-next specific files for 20130626
git bisect bad ddbf0162837ce7ada497f9bf2143f20c73e96c20
# bad: [68f1af44fb82f16925e50ef4f15998c9933759a2] Merge remote-tracking branch 'md/for-next'
git bisect bad 68f1af44fb82f16925e50ef4f15998c9933759a2
# bad: [dcef7c4c971c7f299f097cc78776b4845a7f5bb2] Merge remote-tracking branch 'slave-dma/next'
git bisect bad dcef7c4c971c7f299f097cc78776b4845a7f5bb2
# good: [5fafb18bbf542079abfaf91bf405a9ede33c511a] Merge remote-tracking branch 'vfs/for-next'
git bisect good 5fafb18bbf542079abfaf91bf405a9ede33c511a
# good: [563709c0f179278edfa4518e9b53ae3054d1cb36] Merge remote-tracking branch 'v4l-dvb/master'
git bisect good 563709c0f179278edfa4518e9b53ae3054d1cb36
# bad: [1e701aae3f0cbe714ee3e5feb84e830fc4688634] Merge remote-tracking branch 'pm/linux-next'
git bisect bad 1e701aae3f0cbe714ee3e5feb84e830fc4688634
# good: [414ca3e0fdfbb18b7871bf526fc94c3ca8220d6e] Merge branch 'fixes' into linux-next
git bisect good 414ca3e0fdfbb18b7871bf526fc94c3ca8220d6e
# good: [6c685e78be5ea91c7e938e29d7ba1fcaa77bd58f] Merge branch 'pm-cpufreq-next' into linux-next
git bisect good 6c685e78be5ea91c7e938e29d7ba1fcaa77bd58f
# good: [930ed52c88da2229040caabe975fc5f2e4350d22] Merge branch 'for-3.11' into for-next
git bisect good 930ed52c88da2229040caabe975fc5f2e4350d22
# bad: [8357b48549e17b3e4e402c7f977b65708922e60f] kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG
git bisect bad 8357b48549e17b3e4e402c7f977b65708922e60f
# good: [1278ebdbc3167883f32095491990fbdc7cdf8b5e] mconf/nconf: mark empty menus/menuconfigs different from non-empty ones
git bisect good 1278ebdbc3167883f32095491990fbdc7cdf8b5e
# good: [a5f6d795f5941e97e757b643a6482968a66c6150] kconfig/conf: print the seed used to initialise the RNG for randconfig
git bisect good a5f6d795f5941e97e757b643a6482968a66c6150
# good: [a1ce636f560336ba007bfabb15b167ff31b592cf] kconfig/[mn]conf: make it explicit in the search box that a regexp is possible
git bisect good a1ce636f560336ba007bfabb15b167ff31b592cf
# good: [3b9a19e08960e5cdad5253998637653e592a3c29] kconfig: loop as long as we changed some symbols in randconfig
git bisect good 3b9a19e08960e5cdad5253998637653e592a3c29

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ