Skip to content
Snippets Groups Projects
  1. May 24, 2019
  2. May 21, 2019
  3. May 20, 2019
    • Sven Eckelmann's avatar
      scripts/spdxcheck.py: Fix path to deprecated licenses · e6d319f6
      Sven Eckelmann authored
      
      The directory name for other licenses was changed to "deprecated" in
      commit 62be257e ("LICENSES: Rename other to deprecated"). But it was
      not changed for spdxcheck.py. As result, checkpatch failed with
      
        FAIL: "Blob or Tree named 'other' not found"
        Traceback (most recent call last):
          File "scripts/spdxcheck.py", line 240, in <module>
            spdx = read_spdxdata(repo)
          File "scripts/spdxcheck.py", line 41, in read_spdxdata
            for el in lictree[d].traverse():
          File "/usr/lib/python2.7/dist-packages/git/objects/tree.py", line 298, in __getitem__
            return self.join(item)
          File "/usr/lib/python2.7/dist-packages/git/objects/tree.py", line 244, in join
            raise KeyError(msg % file)
        KeyError: "Blob or Tree named 'other' not found"
      
      Fixes: 62be257e ("LICENSES: Rename other to deprecated")
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      e6d319f6
  4. May 19, 2019
  5. May 18, 2019
  6. May 15, 2019
  7. May 14, 2019
  8. May 12, 2019
  9. May 10, 2019
    • Chris Packham's avatar
      gcc-plugins: arm_ssp_per_task_plugin: Fix for older GCC < 6 · 259799ea
      Chris Packham authored
      
      Use gen_rtx_set instead of gen_rtx_SET. The former is a wrapper macro
      that handles the difference between GCC versions implementing
      the latter.
      
      This fixes the following error on my system with g++ 5.4.0 as the host
      compiler
      
         HOSTCXX -fPIC scripts/gcc-plugins/arm_ssp_per_task_plugin.o
       scripts/gcc-plugins/arm_ssp_per_task_plugin.c:42:14: error: macro "gen_rtx_SET" requires 3 arguments, but only 2 given
                mask)),
                     ^
       scripts/gcc-plugins/arm_ssp_per_task_plugin.c: In function ‘unsigned int arm_pertask_ssp_rtl_execute()’:
       scripts/gcc-plugins/arm_ssp_per_task_plugin.c:39:20: error: ‘gen_rtx_SET’ was not declared in this scope
          emit_insn_before(gen_rtx_SET
      
      Signed-off-by: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
      Fixes: 189af465 ("ARM: smp: add support for per-task stack canaries")
      Cc: stable@vger.kernel.org
      Tested-by: default avatarDouglas Anderson <dianders@chromium.org>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      259799ea
    • Masahiro Yamada's avatar
      kconfig: make parent directories for the saved .config as needed · 580c5b3e
      Masahiro Yamada authored
      
      With menuconfig / nconfig, users can input any file path from the
      "Save" menu, but it fails if the parent directory does not exist.
      
      Why not create the parent directory automatically. I think this is
      a user-friendly behavior.
      
      I changed the error messages in menuconfig / nconfig.
      
      "Nonexistent directory" is no longer the most likely reason of the
      failure. Perhaps, the user specified the existing directory, or
      attempted to write to the location without write permission.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      580c5b3e
    • Masahiro Yamada's avatar
      kconfig: do not write .config if the content is the same · 67424f61
      Masahiro Yamada authored
      
      Kconfig updates the .config when it exits even if its content is
      exactly the same as before. Since its timestamp becomes newer than
      that of other build artifacts, additional processing is invoked,
      which is annoying.
      
      - syncconfig is invoked to update include/config/auto.conf, etc.
      
      - kernel/configs.o is recompiled if CONFIG_IKCONFIG is enabled,
        then vmlinux is relinked as well.
      
      If the .config is not changed at all, we do not have to even
      touch it. Just bail out showing "No change to .config".
      
        $ make allmodconfig
        scripts/kconfig/conf  --allmodconfig Kconfig
        #
        # configuration written to .config
        #
        $ make allmodconfig
        scripts/kconfig/conf  --allmodconfig Kconfig
        #
        # No change to .config
        #
      
      Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      67424f61
    • Masahiro Yamada's avatar
      kconfig: do not accept a directory for configuration output · ceb7f329
      Masahiro Yamada authored
      Currently, conf_write() can be called with a directory name instead
      of a file name. As far as I see, this can happen for menuconfig,
      nconfig, gconfig.
      
      If it is given with a directory path, conf_write() kindly appends
      getenv("KCONFIG_CONFIG"), but this ends up with hacky dir/basename
      handling, and screwed up in corner-cases like "what if KCONFIG_CONFIG
      is an absolute path?" as discussed before:
      
        https://patchwork.kernel.org/patch/9910037/
      
      
      
      Since conf_write() is already messed up, I'd say "do not do it".
      Please pass a file path all the time. If a directory path is specified
      for the configuration output, conf_write() will simply error out.
      
      Now that the tmp file is created in the same directory as the .config,
      the previously reported "what if KCONFIG_CONFIG points to a different
      file system?" has been solved.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Nicolas Porcel <nicolasporcel06@gmail.com>
      ceb7f329
  10. May 09, 2019
  11. May 07, 2019
    • Alexey Gladkov's avatar
      moduleparam: Save information about built-in modules in separate file · 898490c0
      Alexey Gladkov authored
      
      Problem:
      
      When a kernel module is compiled as a separate module, some important
      information about the kernel module is available via .modinfo section of
      the module.  In contrast, when the kernel module is compiled into the
      kernel, that information is not available.
      
      Information about built-in modules is necessary in the following cases:
      
      1. When it is necessary to find out what additional parameters can be
      passed to the kernel at boot time.
      
      2. When you need to know which module names and their aliases are in
      the kernel. This is very useful for creating an initrd image.
      
      Proposal:
      
      The proposed patch does not remove .modinfo section with module
      information from the vmlinux at the build time and saves it into a
      separate file after kernel linking. So, the kernel does not increase in
      size and no additional information remains in it. Information is stored
      in the same format as in the separate modules (null-terminated string
      array). Because the .modinfo section is already exported with a separate
      modules, we are not creating a new API.
      
      It can be easily read in the userspace:
      
      $ tr '\0' '\n' < modules.builtin.modinfo
      ext4.softdep=pre: crc32c
      ext4.license=GPL
      ext4.description=Fourth Extended Filesystem
      ext4.author=Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others
      ext4.alias=fs-ext4
      ext4.alias=ext3
      ext4.alias=fs-ext3
      ext4.alias=ext2
      ext4.alias=fs-ext2
      md_mod.alias=block-major-9-*
      md_mod.alias=md
      md_mod.description=MD RAID framework
      md_mod.license=GPL
      md_mod.parmtype=create_on_open:bool
      md_mod.parmtype=start_dirty_degraded:int
      ...
      
      Co-Developed-by: default avatarGleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
      Signed-off-by: default avatarGleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
      Signed-off-by: default avatarAlexey Gladkov <gladkov.alexey@gmail.com>
      Acked-by: default avatarJessica Yu <jeyu@kernel.org>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      898490c0
  12. May 06, 2019
  13. May 03, 2019
  14. Apr 29, 2019
    • Paulo Alcantara's avatar
      selinux: use kernel linux/socket.h for genheaders and mdp · dfbd199a
      Paulo Alcantara authored
      
      When compiling genheaders and mdp from a newer host kernel, the
      following error happens:
      
          In file included from scripts/selinux/genheaders/genheaders.c:18:
          ./security/selinux/include/classmap.h:238:2: error: #error New
          address family defined, please update secclass_map.  #error New
          address family defined, please update secclass_map.  ^~~~~
          make[3]: *** [scripts/Makefile.host:107:
          scripts/selinux/genheaders/genheaders] Error 1 make[2]: ***
          [scripts/Makefile.build:599: scripts/selinux/genheaders] Error 2
          make[1]: *** [scripts/Makefile.build:599: scripts/selinux] Error 2
          make[1]: *** Waiting for unfinished jobs....
      
      Instead of relying on the host definition, include linux/socket.h in
      classmap.h to have PF_MAX.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPaulo Alcantara <paulo@paulo.ac>
      Acked-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      [PM: manually merge in mdp.c, subject line tweaks]
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      dfbd199a
  15. Apr 28, 2019
    • Masahiro Yamada's avatar
      unicode: refactor the rule for regenerating utf8data.h · 28ba53c0
      Masahiro Yamada authored
      
      scripts/mkutf8data is used only when regenerating utf8data.h,
      which never happens in the normal kernel build. However, it is
      irrespectively built if CONFIG_UNICODE is enabled.
      
      Moreover, there is no good reason for it to reside in the scripts/
      directory since it is only used in fs/unicode/.
      
      Hence, move it from scripts/ to fs/unicode/.
      
      In some cases, we bypass build artifacts in the normal build. The
      conventional way to do so is to surround the code with ifdef REGENERATE_*.
      
      For example,
      
       - 7373f4f8 ("kbuild: add implicit rules for parser generation")
       - 6aaf49b4 ("crypto: arm,arm64 - Fix random regeneration of S_shipped")
      
      I rewrote the rule in a more kbuild'ish style.
      
      In the normal build, utf8data.h is just shipped from the check-in file.
      
      $ make
        [ snip ]
        SHIPPED fs/unicode/utf8data.h
        CC      fs/unicode/utf8-norm.o
        CC      fs/unicode/utf8-core.o
        CC      fs/unicode/utf8-selftest.o
        AR      fs/unicode/built-in.a
      
      If you want to generate utf8data.h based on UCD, put *.txt files into
      fs/unicode/, then pass REGENERATE_UTF8DATA=1 from the command line.
      The mkutf8data tool will be automatically compiled to generate the
      utf8data.h from the *.txt files.
      
      $ make REGENERATE_UTF8DATA=1
        [ snip ]
        HOSTCC  fs/unicode/mkutf8data
        GEN     fs/unicode/utf8data.h
        CC      fs/unicode/utf8-norm.o
        CC      fs/unicode/utf8-core.o
        CC      fs/unicode/utf8-selftest.o
        AR      fs/unicode/built-in.a
      
      I renamed the check-in utf8data.h to utf8data.h_shipped so that this
      will work for the out-of-tree build.
      
      You can update it based on the latest UCD like this:
      
      $ make REGENERATE_UTF8DATA=1 fs/unicode/
      $ cp fs/unicode/utf8data.h fs/unicode/utf8data.h_shipped
      
      Also, I added entries to .gitignore and dontdiff.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      28ba53c0
  16. Apr 25, 2019
    • Olaf Weber's avatar
      unicode: reduce the size of utf8data[] · a8384c68
      Olaf Weber authored
      
      Remove the Hangul decompositions from the utf8data trie, and do
      algorithmic decomposition to calculate them on the fly. To store the
      decomposition the caller of utf8lookup()/utf8nlookup() must provide a
      12-byte buffer, which is used to synthesize a leaf with the
      decomposition. This significantly reduces the size of the utf8data[]
      array.
      
      Changes made by Gabriel:
        Rebase to mainline
        Fix checkpatch errors
        Extract robustness fixes and merge back to original mkutf8data.c patch
        Regenerate utf8data.h
      
      Signed-off-by: default avatarOlaf Weber <olaf@sgi.com>
      Signed-off-by: default avatarGabriel Krisman Bertazi <krisman@collabora.co.uk>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      a8384c68
Loading