19 Aug, 2019

1 commit

  • Pull SPDX fixes from Greg KH:
    "Here are four small SPDX fixes for 5.3-rc5.

    A few style fixes for some SPDX comments, added an SPDX tag for one
    file, and fix up some GPL boilerplate for another file.

    All of these have been in linux-next for a few weeks with no reported
    issues (they are comment changes only, so that's to be expected...)"

    * tag 'spdx-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx:
    i2c: stm32: Use the correct style for SPDX License Identifier
    intel_th: Use the correct style for SPDX License Identifier
    coccinelle: api/atomic_as_refcounter: add SPDX License Identifier
    kernel/configs: Replace GPL boilerplate code with SPDX identifier

    Linus Torvalds
     

10 Aug, 2019

4 commits

  • Since commit ff9b45c55b26 ("kbuild: modpost: read modules.order instead
    of $(MODVERDIR)/*.mod"), a module is no longer built in the following
    pattern:

    [Makefile]
    subdir-y := some-module

    [some-module/Makefile]
    obj-m := some-module.o

    You cannot write Makefile this way in upstream because modules.order is
    not correctly generated. subdir-y is used to descend to a sub-directory
    that builds tools, device trees, etc.

    For external modules, the modules order does not matter. So, the
    Makefile above was known to work.

    I believe the Makefile should be re-written as follows:

    [Makefile]
    obj-m := some-module/

    [some-module/Makefile]
    obj-m := some-module.o

    However, people will have no idea if their Makefile suddenly stops
    working. In fact, I received questions from multiple people.

    Show a warning for a while if obj-m is specified in a Makefile visited
    by subdir-y or subdir-m.

    I touched the %/ rule to avoid false-positive warnings for the single
    target.

    Cc: Jan Kiszka
    Cc: Tom Stonecypher
    Signed-off-by: Masahiro Yamada
    Tested-by: Jan Kiszka

    Masahiro Yamada
     
  • The modules.order files in directories visited by the chain of obj-y
    or obj-m are merged to the upper-level ones, and become parts of the
    top-level modules.order. On the other hand, there is no need to
    generate modules.order in directories visited by subdir-y or subdir-m
    since they would become orphan anyway.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • The current implementation of need-builtin is false-positive,
    for example, in the following Makefile:

    obj-m := foo/
    obj-y := foo/bar/

    ..., where foo/built-in.a is not required.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • I removed the single target %.ko in commit ff9b45c55b26 ("kbuild:
    modpost: read modules.order instead of $(MODVERDIR)/*.mod") because
    the modpost stage does not work reliably. For instance, the module
    dependency, modversion, etc. do not work if we lack symbol information
    from the other modules.

    Yet, some people still want to build only one module in their interest,
    and it may be still useful if it is used within those limitations.

    Fixes: ff9b45c55b26 ("kbuild: modpost: read modules.order instead of $(MODVERDIR)/*.mod")
    Reported-by: Don Brace
    Reported-by: Arend Van Spriel
    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

04 Aug, 2019

1 commit

  • Prior to this commit, starting nconfig, xconfig or gconfig, and saving
    the .config file more than once caused data loss, where a .config file
    that contained only comments would be written to disk starting from the
    second save operation.

    This bug manifests itself because the SYMBOL_WRITTEN flag is never
    cleared after the first call to conf_write, and subsequent calls to
    conf_write then skip all of the configuration symbols due to the
    SYMBOL_WRITTEN flag being set.

    This commit resolves this issue by clearing the SYMBOL_WRITTEN flag
    from all symbols before conf_write returns.

    Fixes: 8e2442a5f86e ("kconfig: fix missing choice values in auto.conf")
    Cc: linux-stable # 4.19+
    Signed-off-by: M. Vefa Bicakci
    Signed-off-by: Masahiro Yamada

    M. Vefa Bicakci
     

31 Jul, 2019

6 commits

  • If the particular version of clang a user has doesn't enable
    -Werror=unknown-warning-option by default, even though it is the
    default[1], then make sure to pass the option to the Kconfig cc-option
    command so that testing options from Kconfig files works properly.
    Otherwise, depending on the default values setup in the clang toolchain
    we will silently assume options such as -Wmaybe-uninitialized are
    supported by clang, when they really aren't.

    A compilation issue only started happening for me once commit
    589834b3a009 ("kbuild: Add -Werror=unknown-warning-option to
    CLANG_FLAGS") was applied on top of commit b303c6df80c9 ("kbuild:
    compute false-positive -Wmaybe-uninitialized cases in Kconfig"). This
    leads kbuild to try and test for the existence of the
    -Wmaybe-uninitialized flag with the cc-option command in
    scripts/Kconfig.include, and it doesn't see an error returned from the
    option test so it sets the config value to Y. Then the Makefile tries to
    pass the unknown option on the command line and
    -Werror=unknown-warning-option catches the invalid option and breaks the
    build. Before commit 589834b3a009 ("kbuild: Add
    -Werror=unknown-warning-option to CLANG_FLAGS") the build works fine,
    but any cc-option test of a warning option in Kconfig files silently
    evaluates to true, even if the warning option flag isn't supported on
    clang.

    Note: This doesn't change cc-option usages in Makefiles because those
    use a different rule that includes KBUILD_CFLAGS by default (see the
    __cc-option command in scripts/Kbuild.incluide). The KBUILD_CFLAGS
    variable already has the -Werror=unknown-warning-option flag set. Thanks
    to Doug for pointing out the different rule.

    [1] https://clang.llvm.org/docs/DiagnosticsReference.html#wunknown-warning-option
    Cc: Peter Smith
    Cc: Nick Desaulniers
    Cc: Douglas Anderson
    Signed-off-by: Stephen Boyd
    Reviewed-by: Nathan Chancellor
    Signed-off-by: Masahiro Yamada

    Stephen Boyd
     
  • Since commit ff9b45c55b26 ("kbuild: modpost: read modules.order instead
    of $(MODVERDIR)/*.mod"), 'make vmlinux' emits a warning, like this:

    $ make defconfig vmlinux
    [ snip ]
    LD vmlinux.o
    cat: modules.order: No such file or directory
    MODPOST vmlinux.o
    MODINFO modules.builtin.modinfo
    KSYM .tmp_kallsyms1.o
    KSYM .tmp_kallsyms2.o
    LD vmlinux
    SORTEX vmlinux
    SYSMAP System.map

    When building only vmlinux, KBUILD_MODULES is not set. Hence, the
    modules.order is not generated. For the vmlinux modpost, it is not
    necessary at all.

    Separate scripts/Makefile.modpost for the vmlinux/modules stages.
    This works more efficiently because the vmlinux modpost does not
    need to include .*.cmd files.

    Fixes: ff9b45c55b26 ("kbuild: modpost: read modules.order instead of $(MODVERDIR)/*.mod")
    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • __modpost is a phony target. The dependency on FORCE is pointless.
    All the objects have been built in the previous stage, so the
    dependency on the objects are not necessary either.

    Count the number of modules in a more straightforward way.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • KBUILD_EXTRA_SYMBOLS makes sense only when building external modules.
    Moreover, the modpost sets 'external_module' if the -e option is given.

    I replaced $(patsubst %, -e %,...) with simpler $(addprefix -e,...)
    while I was here.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • If a build rule fails, the .DELETE_ON_ERROR special target removes the
    target, but does nothing for the .*.cmd file, which might be corrupted.
    So, .*.cmd files should be included only when the corresponding targets
    exist.

    Commit 392885ee82d3 ("kbuild: let fixdep directly write to .*.cmd
    files") missed to fix up this file.

    Fixes: 392885ee82d3 ("kbuild: let fixdep directly write to .*.cmd")
    Cc: # v5.0+
    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Add the missing GPLv2 SPDX license identifier.

    It appears this single file was missing from 7f904d7e1f3e ("treewide:
    Replace GPLv2 boilerplate/reference with SPDX - rule 505"), which
    addressed all other files in scripts/coccinelle. Hence I added
    GPL-2.0-only consitently with the mentioned patch.

    Cc: linux-spdx@vger.kernel.org
    Cc: Elena Reshetova
    Signed-off-by: Matthias Maennich
    Acked-by: Julia Lawall
    Signed-off-by: Greg Kroah-Hartman

    Matthias Maennich
     

29 Jul, 2019

2 commits

  • UAPI headers licensed under GPL are supposed to have exception
    "WITH Linux-syscall-note" so that they can be included into non-GPL
    user space application code.

    Unfortunately, people often miss to add it. Break 'make headers'
    when any of exported headers lacks the exception note so that the
    0-day bot can easily catch it.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • …asahiroy/linux-kbuild

    Pull Kbuild fixes from Masahiro Yamada:

    - add compile_commands.json to .gitignore

    - fix false-positive warning from gen_compile_commands.py after
    allnoconfig build

    - remove unused code

    * tag 'kbuild-fixes-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kbuild: remove unused single-used-m
    gen_compile_commands: lower the entry count threshold
    .gitignore: Add compilation database file
    kbuild: remove unused objectify macro

    Linus Torvalds
     

27 Jul, 2019

3 commits


23 Jul, 2019

1 commit


21 Jul, 2019

1 commit

  • Pull more Kbuild updates from Masahiro Yamada:

    - match the directory structure of the linux-libc-dev package to that
    of Debian-based distributions

    - fix incorrect include/config/auto.conf generation when Kconfig
    creates it along with the .config file

    - remove misleading $(AS) from documents

    - clean up precious tag files by distclean instead of mrproper

    - add a new coccinelle patch for devm_platform_ioremap_resource
    migration

    - refactor module-related scripts to read modules.order instead of
    $(MODVERDIR)/*.mod files to get the list of created modules

    - remove MODVERDIR

    - update list of header compile-test

    - add -fcf-protection=none flag to avoid conflict with the retpoline
    flags when CONFIG_RETPOLINE=y

    - misc cleanups

    * tag 'kbuild-v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (25 commits)
    kbuild: add -fcf-protection=none when using retpoline flags
    kbuild: update compile-test header list for v5.3-rc1
    kbuild: split out *.mod out of {single,multi}-used-m rules
    kbuild: remove 'prepare1' target
    kbuild: remove the first line of *.mod files
    kbuild: create *.mod with full directory path and remove MODVERDIR
    kbuild: export_report: read modules.order instead of .tmp_versions/*.mod
    kbuild: modpost: read modules.order instead of $(MODVERDIR)/*.mod
    kbuild: modsign: read modules.order instead of $(MODVERDIR)/*.mod
    kbuild: modinst: read modules.order instead of $(MODVERDIR)/*.mod
    scsi: remove pointless $(MODVERDIR)/$(obj)/53c700.ver
    kbuild: remove duplication from modules.order in sub-directories
    kbuild: get rid of kernel/ prefix from in-tree modules.{order,builtin}
    kbuild: do not create empty modules.order in the prepare stage
    coccinelle: api: add devm_platform_ioremap_resource script
    kbuild: compile-test headers listed in header-test-m as well
    kbuild: remove unused hostcc-option
    kbuild: remove tag files by distclean instead of mrproper
    kbuild: add --hash-style= and --build-id unconditionally
    kbuild: get rid of misleading $(AS) from documents
    ...

    Linus Torvalds
     

18 Jul, 2019

5 commits

  • Currently, *.mod is created as a side-effect of obj-m.

    Split out *.mod as a dedicated build rule, which allows to unify
    the %.c -> %.o rule, and remove the single-used-m rule.

    This also makes the incremental build of allmodconfig faster because
    it saves $(NM) invocation when there is no change in the module.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • The current format of *.mod is like this:

    line 1: directory path to the .ko file
    line 2: a list of objects linked into this module
    line 3: unresolved symbols (only when CONFIG_TRIM_UNUSED_KSYMS=y)

    Now that *.mod and *.ko are created in the same directory, the line 1
    provides no valuable information. It can be derived by replacing the
    extension .mod with .ko. In fact, nobody uses the first line any more.

    Cut down the first line.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • While descending directories, Kbuild produces objects for modules,
    but do not link final *.ko files; it is done in the modpost.

    To keep track of modules, Kbuild creates a *.mod file in $(MODVERDIR)
    for every module it is building. Some post-processing steps read the
    necessary information from *.mod files. This avoids descending into
    directories again. This mechanism was introduced in 2003 or so.

    Later, commit 551559e13af1 ("kbuild: implement modules.order") added
    modules.order. So, we can simply read it out to know all the modules
    with directory paths. This is easier than parsing the first line of
    *.mod files.

    $(MODVERDIR) has a flat directory structure, that is, *.mod files
    are named only with base names. This is based on the assumption that
    the module name is unique across the tree. This assumption is really
    fragile.

    Stephen Rothwell reported a race condition caused by a module name
    conflict:

    https://lkml.org/lkml/2019/5/13/991

    In parallel building, two different threads could write to the same
    $(MODVERDIR)/*.mod simultaneously.

    Non-unique module names are the source of all kind of troubles, hence
    commit 3a48a91901c5 ("kbuild: check uniqueness of module names")
    introduced a new checker script.

    However, it is still fragile in the build system point of view because
    this race happens before scripts/modules-check.sh is invoked. If it
    happens again, the modpost will emit unclear error messages.

    To fix this issue completely, create *.mod with full directory path
    so that two threads never attempt to write to the same file.

    $(MODVERDIR) is no longer needed.

    Since modules with directory paths are listed in modules.order, Kbuild
    is still able to find *.mod files without additional descending.

    I also killed cmd_secanalysis; scripts/mod/sumversion.c computes MD4 hash
    for modules with MODULE_VERSION(). When CONFIG_DEBUG_SECTION_MISMATCH=y,
    it occurs not only in the modpost stage, but also during directory
    descending, where sumversion.c may parse stale *.mod files. It would emit
    'No such file or directory' warning when an object consisting a module is
    renamed, or when a single-obj module is turned into a multi-obj module or
    vice versa.

    Signed-off-by: Masahiro Yamada
    Acked-by: Nicolas Pitre

    Masahiro Yamada
     
  • Towards the goal of removing MODVERDIR aka .tmp_versions, read out
    modules.order to get the list of modules to be processed. This is
    simpler than parsing *.mod files in .tmp_versions.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Towards the goal of removing MODVERDIR, read out modules.order to get
    the list of modules to be processed. This is simpler than parsing *.mod
    files in $(MODVERDIR).

    For external modules, $(KBUILD_EXTMOD)/modules.order should be read.

    I removed the single target %.ko from the top Makefile. To make sure
    modpost works correctly, vmlinux and the other modules must be built.
    You cannot build a particular .ko file alone.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

17 Jul, 2019

16 commits

  • Merge more updates from Andrew Morton:
    "VM:
    - z3fold fixes and enhancements by Henry Burns and Vitaly Wool

    - more accurate reclaimed slab caches calculations by Yafang Shao

    - fix MAP_UNINITIALIZED UAPI symbol to not depend on config, by
    Christoph Hellwig

    - !CONFIG_MMU fixes by Christoph Hellwig

    - new novmcoredd parameter to omit device dumps from vmcore, by
    Kairui Song

    - new test_meminit module for testing heap and pagealloc
    initialization, by Alexander Potapenko

    - ioremap improvements for huge mappings, by Anshuman Khandual

    - generalize kprobe page fault handling, by Anshuman Khandual

    - device-dax hotplug fixes and improvements, by Pavel Tatashin

    - enable synchronous DAX fault on powerpc, by Aneesh Kumar K.V

    - add pte_devmap() support for arm64, by Robin Murphy

    - unify locked_vm accounting with a helper, by Daniel Jordan

    - several misc fixes

    core/lib:
    - new typeof_member() macro including some users, by Alexey Dobriyan

    - make BIT() and GENMASK() available in asm, by Masahiro Yamada

    - changed LIST_POISON2 on x86_64 to 0xdead000000000122 for better
    code generation, by Alexey Dobriyan

    - rbtree code size optimizations, by Michel Lespinasse

    - convert struct pid count to refcount_t, by Joel Fernandes

    get_maintainer.pl:
    - add --no-moderated switch to skip moderated ML's, by Joe Perches

    misc:
    - ptrace PTRACE_GET_SYSCALL_INFO interface

    - coda updates

    - gdb scripts, various"

    [ Using merge message suggestion from Vlastimil Babka, with some editing - Linus ]

    * emailed patches from Andrew Morton : (100 commits)
    fs/select.c: use struct_size() in kmalloc()
    mm: add account_locked_vm utility function
    arm64: mm: implement pte_devmap support
    mm: introduce ARCH_HAS_PTE_DEVMAP
    mm: clean up is_device_*_page() definitions
    mm/mmap: move common defines to mman-common.h
    mm: move MAP_SYNC to asm-generic/mman-common.h
    device-dax: "Hotremove" persistent memory that is used like normal RAM
    mm/hotplug: make remove_memory() interface usable
    device-dax: fix memory and resource leak if hotplug fails
    include/linux/lz4.h: fix spelling and copy-paste errors in documentation
    ipc/mqueue.c: only perform resource calculation if user valid
    include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures
    scripts/gdb: add helpers to find and list devices
    scripts/gdb: add lx-genpd-summary command
    drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl
    kernel/pid.c: convert struct pid count to refcount_t
    drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings
    select: shift restore_saved_sigmask_unless() into poll_select_copy_remaining()
    select: change do_poll() to return -ERESTARTNOHAND rather than -EINTR
    ...

    Linus Torvalds
     
  • Towards the goal of removing MODVERDIR, read out modules.order to get
    the list of modules to be signed. This is simpler than parsing *.mod
    files in $(MODVERDIR).

    The modules_sign target is only supported for in-kernel modules.
    So, this commit does not take care of external modules.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Towards the goal of removing MODVERDIR, read out modules.order to get
    the list of modules to be installed. This is simpler than parsing *.mod
    files in $(MODVERDIR).

    For external modules, $(KBUILD_EXTMOD)/modules.order should be read.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Currently, only the top-level modules.order drops duplicated entries.

    The modules.order files in sub-directories potentially contain
    duplication. To list out the paths of all modules, I want to use
    modules.order instead of parsing *.mod files in $(MODVERDIR).

    To achieve this, I want to rip off duplication from modules.order
    of external modules too.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Removing the 'kernel/' prefix will make our life easier because we can
    simply do 'cat modules.order' to get all built modules with full paths.

    Currently, we parse the first line of '*.mod' files in $(MODVERDIR).
    Since we have duplicated functionality here, I plan to remove MODVERDIR
    entirely.

    In fact, modules.order is generated also for external modules in a
    broken format. It adds the 'kernel/' prefix to the absolute path of
    the module, like this:

    kernel//path/to/your/external/module/foo.ko

    This is fine for now since modules.order is not used for external
    modules. However, I want to sanitize the format everywhere towards
    the goal of removing MODVERDIR.

    We cannot change the format of installed module.{order,builtin}.
    So, 'make modules_install' will add the 'kernel/' prefix while copying
    them to $(MODLIB)/.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Currently, $(objtree)/modules.order is touched in two places.

    In the 'prepare0' rule, scripts/Makefile.build creates an empty
    modules.order while processing 'obj=.'

    In the 'modules' rule, the top-level Makefile overwrites it with
    the correct list of modules.

    While this might be a good side-effect that modules.order is made
    empty every time (probably this is not intended functionality),
    I personally do not like this behavior.

    Create modules.order only when it is sensible to do so.

    This avoids creating the following pointless files:

    scripts/basic/modules.order
    scripts/dtc/modules.order
    scripts/gcc-plugins/modules.order
    scripts/genksyms/modules.order
    scripts/mod/modules.order
    scripts/modules.order
    scripts/selinux/genheaders/modules.order
    scripts/selinux/mdp/modules.order
    scripts/selinux/modules.order

    Going forward, $(objtree)/modules.order lists the modules that
    was built in the last successful build.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Use recently introduced devm_platform_ioremap_resource
    helper which wraps platform_get_resource() and
    devm_ioremap_resource() together. This helps produce much
    cleaner code and remove local `struct resource` declaration.

    Signed-off-by: Himanshu Jha
    Signed-off-by: Julia Lawall
    Signed-off-by: Masahiro Yamada

    Himanshu Jha
     
  • It will be useful to control the header-test by a tristate option.

    If CONFIG_FOO is a tristate option, you can write like this:

    header-test-$(CONFIG_FOO) += foo.h

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • We can re-add this whenever it is needed. At this moment, it is unused.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Since commit 00c864f8903d ("kconfig: allow all config targets to write
    auto.conf if missing"), Kconfig creates include/config/auto.conf in the
    defconfig stage when it is missing.

    Joonas Kylmälä reported incorrect auto.conf generation under some
    circumstances.

    To reproduce it, apply the following diff:

    | --- a/arch/arm/configs/imx_v6_v7_defconfig
    | +++ b/arch/arm/configs/imx_v6_v7_defconfig
    | @@ -345,14 +345,7 @@ CONFIG_USB_CONFIGFS_F_MIDI=y
    | CONFIG_USB_CONFIGFS_F_HID=y
    | CONFIG_USB_CONFIGFS_F_UVC=y
    | CONFIG_USB_CONFIGFS_F_PRINTER=y
    | -CONFIG_USB_ZERO=m
    | -CONFIG_USB_AUDIO=m
    | -CONFIG_USB_ETH=m
    | -CONFIG_USB_G_NCM=m
    | -CONFIG_USB_GADGETFS=m
    | -CONFIG_USB_FUNCTIONFS=m
    | -CONFIG_USB_MASS_STORAGE=m
    | -CONFIG_USB_G_SERIAL=m
    | +CONFIG_USB_FUNCTIONFS=y
    | CONFIG_MMC=y
    | CONFIG_MMC_SDHCI=y
    | CONFIG_MMC_SDHCI_PLTFM=y

    And then, run:

    $ make ARCH=arm mrproper imx_v6_v7_defconfig

    You will see CONFIG_USB_FUNCTIONFS=y is correctly contained in the
    .config, but not in the auto.conf.

    Please note drivers/usb/gadget/legacy/Kconfig is included from a choice
    block in drivers/usb/gadget/Kconfig. So USB_FUNCTIONFS is a choice value.

    This is probably a similar situation described in commit beaaddb62540
    ("kconfig: tests: test defconfig when two choices interact").

    When sym_calc_choice() is called, the choice symbol forgets the
    SYMBOL_DEF_USER unless all of its choice values are explicitly set by
    the user.

    The choice symbol is given just one chance to recall it because
    set_all_choice_values() is called if SYMBOL_NEED_SET_CHOICE_VALUES
    is set.

    When sym_calc_choice() is called again, the choice symbol forgets it
    forever, since SYMBOL_NEED_SET_CHOICE_VALUES is a one-time aid.
    Hence, we cannot call sym_clear_all_valid() again and again.

    It is crazy to repeat set and unset of internal flags. However, we
    cannot simply get rid of "sym->flags &= flags | ~SYMBOL_DEF_USER;"
    Doing so would re-introduce the problem solved by commit 5d09598d488f
    ("kconfig: fix new choices being skipped upon config update").

    To work around the issue, conf_write_autoconf() stopped calling
    sym_clear_all_valid().

    conf_write() must be changed accordingly. Currently, it clears
    SYMBOL_WRITE after the symbol is written into the .config file. This
    is needed to prevent it from writing the same symbol multiple times in
    case the symbol is declared in two or more locations. I added the new
    flag SYMBOL_WRITTEN, to track the symbols that have been written.

    Anyway, this is a cheesy workaround in order to suppress the issue
    as far as defconfig is concerned.

    Handling of choices is totally broken. sym_clear_all_valid() is called
    every time a user touches a symbol from the GUI interface. To reproduce
    it, just add a new symbol drivers/usb/gadget/legacy/Kconfig, then touch
    around unrelated symbols from menuconfig. USB_FUNCTIONFS will disappear
    from the .config file.

    I added the Fixes tag since it is more fatal than before. But, this
    has been broken since long long time before, and still it is.
    We should take a closer look to fix this correctly somehow.

    Fixes: 00c864f8903d ("kconfig: allow all config targets to write auto.conf if missing")
    Cc: linux-stable # 4.19+
    Reported-by: Joonas Kylmälä
    Signed-off-by: Masahiro Yamada
    Tested-by: Joonas Kylmälä

    Masahiro Yamada
     
  • The translations guide need Noto CJK fonts. So, add a logic that
    would suggest its install for distros.

    It also fix a few other issues while testing the script
    with several distributions.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • On Gentoo, the portage changes for ImageMagick to work are
    always suggested, even if already applied. While the two
    extra commands should be harmless, add a check to avoid
    reporting it without need.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • The name of the package with carries latexmk is different
    on two distros:

    - On OpenSUSE, latexmk is packaged as "texlive-latexmk-bin"
    - On Mageia, latexmk is packaged at "texlive-collection-basic"

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • There aren't enough texlive packages for LaTeX-based builds
    to work on CentOS/RHEL

    Mauro Carvalho Chehab
     
  • There's a missing parenthesis at the script, with causes it to
    fail to detect non-Fedora releases (e. g. RHEL/CentOS).

    Tested with Centos 7.6.1810.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Add helper commands and functions for finding pointers to struct device
    by enumerating linux device bus/class infrastructure. This can be used
    to fetch subsystem and driver-specific structs:

    (gdb) p *$container_of($lx_device_find_by_class_name("net", "eth0"), "struct net_device", "dev")
    (gdb) p *$container_of($lx_device_find_by_bus_name("i2c", "0-004b"), "struct i2c_client", "dev")
    (gdb) p *(struct imx_port*)$lx_device_find_by_class_name("tty", "ttymxc1")->parent->driver_data

    Several generic "lx-device-list" functions are included to enumerate
    devices by bus and class:

    (gdb) lx-device-list-bus usb
    (gdb) lx-device-list-class
    (gdb) lx-device-list-tree &platform_bus

    Similar information is available in /sys but pointer values are
    deliberately hidden.

    Link: http://lkml.kernel.org/r/c948628041311cbf1b9b4cff3dda7d2073cb3eaa.1561492937.git.leonard.crestez@nxp.com
    Signed-off-by: Leonard Crestez
    Reviewed-by: Stephen Boyd
    Cc: Kieran Bingham
    Cc: Jan Kiszka
    Cc: "Rafael J. Wysocki"
    Cc: Greg Kroah-Hartman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Leonard Crestez