1. 16 3月, 2020 1 次提交
  2. 05 2月, 2020 2 次提交
  3. 04 2月, 2020 4 次提交
  4. 01 2月, 2020 1 次提交
  5. 28 1月, 2020 5 次提交
  6. 25 1月, 2020 1 次提交
  7. 24 1月, 2020 10 次提交
  8. 23 1月, 2020 9 次提交
    • J
      MIPS: Loongson64: Select mac2008 only feature · c9444384
      Jiaxun Yang 提交于
      Some Loongson-64 processor didn't set MAC2008 bit in fcsr,
      but actually all Loongson64 processors are MAC2008 only.
      Signed-off-by: NJiaxun Yang <jiaxun.yang@flygoat.com>
      Signed-off-by: NPaul Burton <paulburton@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: chenhc@lemote.com
      Cc: paul.burton@mips.com
      Cc: linux-kernel@vger.kernel.org
      c9444384
    • J
      MIPS: Add MAC2008 Support · ece276de
      Jiaxun Yang 提交于
      MAC2008 means the processor implemented IEEE754 style Fused MADD
      instruction. It was introduced in Release3 but removed in Release5.
      
      The toolchain support of MAC2008 have never landed except for Loongson
      processors.
      
      This patch aimed to disabled the MAC2008 if it's optional. For
      MAC2008 only processors, we corrected math-emu behavior to align
      with actual hardware behavior.
      Signed-off-by: NJiaxun Yang <jiaxun.yang@flygoat.com>
      [paulburton@kernel.org: Fixup MIPSr2-r5 check in cpu_set_fpu_2008.]
      Signed-off-by: NPaul Burton <paulburton@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: chenhc@lemote.com
      Cc: paul.burton@mips.com
      Cc: linux-kernel@vger.kernel.org
      ece276de
    • A
      Revert "MIPS: Add custom serial.h with BASE_BAUD override for generic kernel" · 0a3d5b57
      Alexander Lobakin 提交于
      This reverts commit c8ec2041.
      
      There's no more need to set BASE_BAUD to 0 to make earlycon work
      properly on DTS-based boards since such cases were handled in commit
      182ead3e ("earlycon: Remove hardcoded port->uartclk initialization
      in of_setup_earlycon"). earlycon no longer initializes port->uartclk
      with a value of BASE_BAUD * 16 when starting from FDT/OF.
      Signed-off-by: NAlexander Lobakin <alobakin@dlink.ru>
      Signed-off-by: NPaul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Cc: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: Allison Randal <allison@lohutok.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      0a3d5b57
    • A
      MIPS: sort MIPS and MIPS_GENERIC Kconfig selects alphabetically (again) · 34c01e41
      Alexander Lobakin 提交于
      Cycles "sort selects alphabetically -> add new options at the end or at
      random place -> repeat" go on and on.
      Please double-check when adding new options and make sure that they
      don't break the existing order to prevent dumb commits like this one
      from appearing.
      Signed-off-by: NAlexander Lobakin <alobakin@dlink.ru>
      Signed-off-by: NPaul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Cc: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: Allison Randal <allison@lohutok.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      34c01e41
    • A
      MIPS: make CPU_HAS_LOAD_STORE_LR opt-out · 18d84e2e
      Alexander Lobakin 提交于
      CPU_HAS_LOAD_STORE_LR was introduced in 932afdee ("MIPS: Add Kconfig
      variable for CPUs with unaligned load/store instructions") to make code
      in kernel/unaligned.c and lib/mem{cpy,set}.S more intuitive and give a
      possibility to easily add new CPUs without these instruction sets in
      future.
      
      Hovewer, this variant is not optimal for mainly two reasons:
      * For now, we have 20+ CPUs with such instructions and only two (MIPS R6)
        without. It will obviously be more effective and straightforward to
        have an option for these two rather than for the rest.
      * You can easily miss the fact that you need to select this option when
        adding a new CPU, while all processors lacking these sets are
        well-known, so the probability of missing something is way much lower.
      
      We can address both points by turning CPU_HAS_LOAD_STORE_LR into opt-out
      CPU_NO_LOAD_STORE_LR. This also makes MIPS root Kconfig more clear and
      understandable.
      Signed-off-by: NAlexander Lobakin <alobakin@dlink.ru>
      Signed-off-by: NPaul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Cc: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: Allison Randal <allison@lohutok.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      18d84e2e
    • A
      MIPS: generic: don't unconditionally select PINCTRL · 7de86604
      Alexander Lobakin 提交于
      CONFIG_PINCTRL was converted from hidden selectable to a visible option
      with commit d219b924 ("pinctrl: change Kconfig PINCTRL variable to
      a menuconfig"). Remove unconditional select and enable this symbol in
      Ocelot config, which currently is the only user among generic boards.
      Signed-off-by: NAlexander Lobakin <alobakin@dlink.ru>
      Signed-off-by: NPaul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Cc: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: Allison Randal <allison@lohutok.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      7de86604
    • A
      MIPS: don't explicitly select LIBFDT in Kconfig · 7c8f1379
      Alexander Lobakin 提交于
      It gets selected anyway through USE_OF -> OF_EARLY_FLATTREE ->
      OF_FLATTREE -> LIBFDT, no need to double-check.
      Signed-off-by: NAlexander Lobakin <alobakin@dlink.ru>
      Signed-off-by: NPaul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Cc: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: Allison Randal <allison@lohutok.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      7c8f1379
    • S
      MIPS: sync-r4k: do slave counter synchronization with disabled HW interrupts · 0956be29
      Sergey Korolev 提交于
      synchronise_count_slave() called with an enabled in mips_clockevent_init()
      timer interrupt which may decrease synchronization precision.
      Signed-off-by: NSergey Korolev <s.korolev@ndmsystems.com>
      Signed-off-by: NPaul Burton <paulburton@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: linux-kernel@vger.kernel.org
      0956be29
    • T
      MIPS: SGI-IP30: Check for valid pointer before using it · c0e79fd8
      Thomas Bogendoerfer 提交于
      Fix issue detected by Smatch:
      
          ./arch/mips/sgi-ip30/ip30-irq.c:236 heart_domain_free()
           warn: variable dereferenced before check 'irqd' (see line 235)
      
      Fixes: 7505576d ("MIPS: add support for SGI Octane (IP30)")
      Signed-off-by: NThomas Bogendoerfer <tbogendoerfer@suse.de>
      Signed-off-by: NPaul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: <stable@vger.kernel.org> # v5.5+
      c0e79fd8
  9. 21 1月, 2020 3 次提交
    • A
      MIPS: syscalls: fix indentation of the 'SYSNR' message · 4f29ad20
      Alexander Lobakin 提交于
      It also lacks a whitespace (copy'n'paste error?) and also messes up the
      output:
      
        SYSHDR  arch/mips/include/generated/uapi/asm/unistd_n32.h
        SYSHDR  arch/mips/include/generated/uapi/asm/unistd_n64.h
        SYSHDR  arch/mips/include/generated/uapi/asm/unistd_o32.h
        SYSNR  arch/mips/include/generated/uapi/asm/unistd_nr_n32.h
        SYSNR  arch/mips/include/generated/uapi/asm/unistd_nr_n64.h
        SYSNR  arch/mips/include/generated/uapi/asm/unistd_nr_o32.h
        WRAP    arch/mips/include/generated/uapi/asm/bpf_perf_event.h
        WRAP    arch/mips/include/generated/uapi/asm/ipcbuf.h
      
      After:
      
        SYSHDR  arch/mips/include/generated/uapi/asm/unistd_n32.h
        SYSHDR  arch/mips/include/generated/uapi/asm/unistd_n64.h
        SYSHDR  arch/mips/include/generated/uapi/asm/unistd_o32.h
        SYSNR   arch/mips/include/generated/uapi/asm/unistd_nr_n32.h
        SYSNR   arch/mips/include/generated/uapi/asm/unistd_nr_n64.h
        SYSNR   arch/mips/include/generated/uapi/asm/unistd_nr_o32.h
        WRAP    arch/mips/include/generated/uapi/asm/bpf_perf_event.h
        WRAP    arch/mips/include/generated/uapi/asm/ipcbuf.h
      
      Present since day 0 of syscall table generation introduction for MIPS.
      
      Fixes: 9bcbf97c ("mips: add system call table generation support")
      Cc: <stable@vger.kernel.org> # v5.0+
      Signed-off-by: NAlexander Lobakin <alobakin@dlink.ru>
      Signed-off-by: NPaul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      4f29ad20
    • A
      MIPS: boot: fix typo in 'vmlinux.lzma.its' target · 16202c09
      Alexander Lobakin 提交于
      Commit 92b34a97 ("MIPS: boot: add missing targets for vmlinux.*.its")
      fixed constant rebuild of *.its files on every make invocation, but due
      to typo ("lzmo") it made no sense for vmlinux.lzma.its.
      
      Fixes: 92b34a97 ("MIPS: boot: add missing targets for vmlinux.*.its")
      Cc: <stable@vger.kernel.org> # v4.19+
      Signed-off-by: NAlexander Lobakin <alobakin@dlink.ru>
      [paulburton@kernel.org: s/invokation/invocation/]
      Signed-off-by: NPaul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      16202c09
    • A
      MIPS: fix indentation of the 'RELOCS' message · a5399880
      Alexander Lobakin 提交于
      quiet_cmd_relocs lacks a whitespace which results in:
      
        LD      vmlinux
        SORTEX  vmlinux
        SYSMAP  System.map
        RELOCS vmlinux
        Building modules, stage 2.
        MODPOST 64 modules
      
      After this patch:
      
        LD      vmlinux
        SORTEX  vmlinux
        SYSMAP  System.map
        RELOCS  vmlinux
        Building modules, stage 2.
        MODPOST 64 modules
      
      Typo is present in kernel tree since the introduction of relocatable
      kernel support in commit e818fac5 ("MIPS: Generate relocation table
      when CONFIG_RELOCATABLE"), but the relocation scripts were moved to
      Makefile.postlink later with commit 44079d35 ("MIPS: Use
      Makefile.postlink to insert relocations into vmlinux").
      
      Fixes: 44079d35 ("MIPS: Use Makefile.postlink to insert relocations into vmlinux")
      Cc: <stable@vger.kernel.org> # v4.11+
      Signed-off-by: NAlexander Lobakin <alobakin@dlink.ru>
      [paulburton@kernel.org: Fixup commit references in commit message.]
      Signed-off-by: NPaul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      a5399880
  10. 18 1月, 2020 1 次提交
    • A
      open: introduce openat2(2) syscall · fddb5d43
      Aleksa Sarai 提交于
      /* Background. */
      For a very long time, extending openat(2) with new features has been
      incredibly frustrating. This stems from the fact that openat(2) is
      possibly the most famous counter-example to the mantra "don't silently
      accept garbage from userspace" -- it doesn't check whether unknown flags
      are present[1].
      
      This means that (generally) the addition of new flags to openat(2) has
      been fraught with backwards-compatibility issues (O_TMPFILE has to be
      defined as __O_TMPFILE|O_DIRECTORY|[O_RDWR or O_WRONLY] to ensure old
      kernels gave errors, since it's insecure to silently ignore the
      flag[2]). All new security-related flags therefore have a tough road to
      being added to openat(2).
      
      Userspace also has a hard time figuring out whether a particular flag is
      supported on a particular kernel. While it is now possible with
      contemporary kernels (thanks to [3]), older kernels will expose unknown
      flag bits through fcntl(F_GETFL). Giving a clear -EINVAL during
      openat(2) time matches modern syscall designs and is far more
      fool-proof.
      
      In addition, the newly-added path resolution restriction LOOKUP flags
      (which we would like to expose to user-space) don't feel related to the
      pre-existing O_* flag set -- they affect all components of path lookup.
      We'd therefore like to add a new flag argument.
      
      Adding a new syscall allows us to finally fix the flag-ignoring problem,
      and we can make it extensible enough so that we will hopefully never
      need an openat3(2).
      
      /* Syscall Prototype. */
        /*
         * open_how is an extensible structure (similar in interface to
         * clone3(2) or sched_setattr(2)). The size parameter must be set to
         * sizeof(struct open_how), to allow for future extensions. All future
         * extensions will be appended to open_how, with their zero value
         * acting as a no-op default.
         */
        struct open_how { /* ... */ };
      
        int openat2(int dfd, const char *pathname,
                    struct open_how *how, size_t size);
      
      /* Description. */
      The initial version of 'struct open_how' contains the following fields:
      
        flags
          Used to specify openat(2)-style flags. However, any unknown flag
          bits or otherwise incorrect flag combinations (like O_PATH|O_RDWR)
          will result in -EINVAL. In addition, this field is 64-bits wide to
          allow for more O_ flags than currently permitted with openat(2).
      
        mode
          The file mode for O_CREAT or O_TMPFILE.
      
          Must be set to zero if flags does not contain O_CREAT or O_TMPFILE.
      
        resolve
          Restrict path resolution (in contrast to O_* flags they affect all
          path components). The current set of flags are as follows (at the
          moment, all of the RESOLVE_ flags are implemented as just passing
          the corresponding LOOKUP_ flag).
      
          RESOLVE_NO_XDEV       => LOOKUP_NO_XDEV
          RESOLVE_NO_SYMLINKS   => LOOKUP_NO_SYMLINKS
          RESOLVE_NO_MAGICLINKS => LOOKUP_NO_MAGICLINKS
          RESOLVE_BENEATH       => LOOKUP_BENEATH
          RESOLVE_IN_ROOT       => LOOKUP_IN_ROOT
      
      open_how does not contain an embedded size field, because it is of
      little benefit (userspace can figure out the kernel open_how size at
      runtime fairly easily without it). It also only contains u64s (even
      though ->mode arguably should be a u16) to avoid having padding fields
      which are never used in the future.
      
      Note that as a result of the new how->flags handling, O_PATH|O_TMPFILE
      is no longer permitted for openat(2). As far as I can tell, this has
      always been a bug and appears to not be used by userspace (and I've not
      seen any problems on my machines by disallowing it). If it turns out
      this breaks something, we can special-case it and only permit it for
      openat(2) but not openat2(2).
      
      After input from Florian Weimer, the new open_how and flag definitions
      are inside a separate header from uapi/linux/fcntl.h, to avoid problems
      that glibc has with importing that header.
      
      /* Testing. */
      In a follow-up patch there are over 200 selftests which ensure that this
      syscall has the correct semantics and will correctly handle several
      attack scenarios.
      
      In addition, I've written a userspace library[4] which provides
      convenient wrappers around openat2(RESOLVE_IN_ROOT) (this is necessary
      because no other syscalls support RESOLVE_IN_ROOT, and thus lots of care
      must be taken when using RESOLVE_IN_ROOT'd file descriptors with other
      syscalls). During the development of this patch, I've run numerous
      verification tests using libpathrs (showing that the API is reasonably
      usable by userspace).
      
      /* Future Work. */
      Additional RESOLVE_ flags have been suggested during the review period.
      These can be easily implemented separately (such as blocking auto-mount
      during resolution).
      
      Furthermore, there are some other proposed changes to the openat(2)
      interface (the most obvious example is magic-link hardening[5]) which
      would be a good opportunity to add a way for userspace to restrict how
      O_PATH file descriptors can be re-opened.
      
      Another possible avenue of future work would be some kind of
      CHECK_FIELDS[6] flag which causes the kernel to indicate to userspace
      which openat2(2) flags and fields are supported by the current kernel
      (to avoid userspace having to go through several guesses to figure it
      out).
      
      [1]: https://lwn.net/Articles/588444/
      [2]: https://lore.kernel.org/lkml/CA+55aFyyxJL1LyXZeBsf2ypriraj5ut1XkNDsunRBqgVjZU_6Q@mail.gmail.com
      [3]: commit 629e014b ("fs: completely ignore unknown open flags")
      [4]: https://sourceware.org/bugzilla/show_bug.cgi?id=17523
      [5]: https://lore.kernel.org/lkml/20190930183316.10190-2-cyphar@cyphar.com/
      [6]: https://youtu.be/ggD-eb3yPVsSuggested-by: NChristian Brauner <christian.brauner@ubuntu.com>
      Signed-off-by: NAleksa Sarai <cyphar@cyphar.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      fddb5d43
  11. 17 1月, 2020 1 次提交
  12. 16 1月, 2020 2 次提交