1. 07 10月, 2019 2 次提交
  2. 04 10月, 2019 5 次提交
  3. 03 10月, 2019 2 次提交
    • K
      doc-rst: Programmatically render MAINTAINERS into ReST · aa204855
      Kees Cook 提交于
      In order to have the MAINTAINERS file visible in the rendered ReST
      output, this makes some small changes to the existing MAINTAINERS file
      to allow for better machine processing, and adds a new Sphinx directive
      "maintainers-include" to perform the rendering.
      
      Features include:
      - Per-subsystem reference links: subsystem maintainer entries can be
        trivially linked to both internally and external. For example:
        https://www.kernel.org/doc/html/latest/process/maintainers.html#secure-computing
      
      - Internally referenced .rst files are linked so they can be followed
        when browsing the resulting rendering. This allows, for example, the
        future addition of maintainer profiles to be automatically linked.
      
      - Field name expansion: instead of the short fields (e.g. "M", "F",
        "K"), use the indicated inline "full names" for the fields (which are
        marked with "*"s in MAINTAINERS) so that a rendered subsystem entry
        is more human readable. Email lists are additionally comma-separated.
        For example:
      
          SECURE COMPUTING
      	Mail:	  Kees Cook <keescook@chromium.org>
      	Reviewer: Andy Lutomirski <luto@amacapital.net>,
      		  Will Drewry <wad@chromium.org>
      	SCM:	  git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git seccomp
      	Status:	  Supported
      	Files:	  kernel/seccomp.c include/uapi/linux/seccomp.h
      		  include/linux/seccomp.h tools/testing/selftests/seccomp/*
      		  tools/testing/selftests/kselftest_harness.h
      		  userspace-api/seccomp_filter
      	Content regex:	\bsecure_computing \bTIF_SECCOMP\b
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      aa204855
    • K
      doc-rst: Reduce CSS padding around Field · 1b1438b5
      Kees Cook 提交于
      Right now any ":Field Name: Field Contents" lines end up with significant
      padding due to CSS from the "table" CSS which rightly needs padding to
      make tables readable. However, field lists don't need this as they tend
      to be stacked together. The future heavy use of fields in the parsed
      MAINTAINERS file needs this cleaned up, and existing users look better
      too. Note the needless white space (and misalignment of name/contents)
      between "Date" and "Author":
      
      https://www.kernel.org/doc/html/latest/accounting/psi.html
      
      This patch fixes this by lowering the padding with a more specific CSS.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      1b1438b5
  4. 01 10月, 2019 19 次提交
    • J
      docs: No structured comments in kernel/dma/coherent.c · e07f7927
      Jonathan Corbet 提交于
      Don't try to extract comments from that file, since there are none to be
      had and, seemingly, never have been.
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      e07f7927
    • C
      Documentation: document earlycon without options for more platforms · e18409c0
      Christoph Hellwig 提交于
      The earlycon options without arguments is supposed to work on all
      device tree platforms, not just arm64.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      e18409c0
    • A
      docs: perf: Add imx-ddr to documentation index · 0522e130
      Adam Zerella 提交于
      Sphinx is currently outputting a warning where
      the file 'imx-ddr.rst' is not included in the
      documentation index. Additionally, the code
      highlighting and doc formatting can be slightly
      improved.
      Signed-off-by: NAdam Zerella <adam.zerella@gmail.com>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      0522e130
    • J
      Merge branch 'dump-struct' into docs-next · 81929718
      Jonathan Corbet 提交于
      André Almeida writes:
      
      The current way that scripts/kernel-doc dump structs do not work for
      nested structs with attributes (e.g. __packed) and without type alias
      (e.g } alias1;). This is due to the way nested structs members are parsed.
      
      Inside dump_struct(), the regex removes attributes and it surrounds
      whitespaces. After that, it will do a foreach(id) loop for each alias.
      However, we will have an empty string, and then the split function will
      return nothing and the foreach will not have any iteration. The code will
      then jump the loop and the substitution will fail since $newmember
      is uninitialized.
      
      This bug does not happen when the nested struct has no alias and no
      attribute, since at process_proto_type() a whitespace is inserted in
      order to ensure that the split will not fail. However, with any
      attribute, this whitespace will be removed.
      
      This patch solves this by replacing attributes with one whitespace, to
      ensure that will have at least one whitespace.
      
      Besides solving this bug at patch 1, I also add support for the
      ____cacheline_aligned_in_smp atribute at patch 2.
      
      For testing and reproducing, create a file `code.h`:
      
      /**
       * struct foobar - description
       * @number0: desc0
       * @number1: desc1
       * @number2: desc2
       */
      struct foo {
      	int number0;
      
      	struct  {
      		int number1;
      	} __packed;
      
      	struct {
      		int number2;
      	};
      
       };
      
      I've tested with CRYPTO_MINALIGN_ATTR, __attribute__((__aligned__(8)))
      and __aligned() as well. Now, run the `./script/kernel-doc code.h`,
      and this is the output:
      
      Use of uninitialized value $newmember in substitution (s///) at
      ./scripts/kernel-doc line 1152, <IN> line 18.
      
      .. c:type:: struct foo
      
         description
      
      **Definition**
      
      ::
      
        struct foo {
          int number0;
          struct {
            int number1;
          };
          struct {
            int number2;
          };
        };
      
      **Members**
      
      ``number0``
        desc0
      
      ``{unnamed_struct}``
        anonymous
      
      ``number2``
        desc2
      
      The output will not display the member number1 and will also display an
      uninitialized warning. Running after the patch will get rid of the
      warning and also display the description for number1:
      
      [...]
      
      **Members**
      
      ``number0``
        desc0
      
      ``{unnamed_struct}``
        anonymous
      
      ``number1``
        desc1
      
      ``{unnamed_struct}``
        anonymous
      
      ``number2``
        desc2
      
      To test patch [2/2], just replace __packed for
      ____cacheline_aligned_in_smp and compare how, at the previous stage the
      script believes ____cacheline... is an alias for the struct and after
      the patch it is removed just as the others attributes.
      
      Finally, I have compared the output of "make htmldocs" with and without
      this patch. No new warning were found and one warning regarding
      ____cacheline_aligned_in_smp at include/linux/netdevice.h was removed.
      81929718
    • A
      kernel-doc: add support for ____cacheline_aligned_in_smp attribute · f861537d
      André Almeida 提交于
      Subroutine dump_struct uses type attributes to check if the struct
      syntax is valid. Then, it removes all attributes before using it for
      output. `____cacheline_aligned_in_smp` is an attribute that is
      not included in both steps. Add it, since it is used by kernel structs.
      Signed-off-by: NAndré Almeida <andrealmeid@collabora.com>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      f861537d
    • A
      kernel-doc: fix processing nested structs with attributes · 2b5f78e5
      André Almeida 提交于
      The current regular expression for strip attributes of structs (and
      for nested ones as well) also removes all whitespaces that may
      surround the attribute. After that, the code will split structs and
      iterate for each symbol separated by comma at the end of struct
      definition (e.g. "} alias1, alias2;"). However, if the nested struct
      does not have any alias and has an attribute, it will result in a
      empty string at the closing bracket (e.g "};"). This will make the
      split return nothing and $newmember will keep uninitialized. Fix
      that, by ensuring that the attribute substitution will leave at least
      one whitespace.
      Signed-off-by: NAndré Almeida <andrealmeid@collabora.com>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      2b5f78e5
    • S
      scripts/sphinx-pre-install: add how to exit virtualenv usage message · 2730ce01
      Shuah Khan 提交于
      Add usage message on how to exit the virtualenv after documentation
      work is done.
      Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      2730ce01
    • J
      docs: fix memory.low description in cgroup-v2.rst · 6ee0fac1
      Jon Haslam 提交于
      The current cgroup-v2.rst file contains an incorrect description of when
      memory is reclaimed from a cgroup that is using the 'memory.low'
      mechanism. This fix simply corrects the text to reflect the actual
      implementation.
      
      Fixes: 7854207f ("mm/docs: describe memory.low refinements")
      Signed-off-by: NJon Haslam <jonhaslam@fb.com>
      Acked-by: NRoman Gushchin <guro@fb.com>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      6ee0fac1
    • J
      docs: kmemleak: DEBUG_KMEMLEAK_EARLY_LOG_SIZE changed names · 2c861bf5
      Jeremy Cline 提交于
      Commit c5665868 ("mm: kmemleak: use the memory pool for early
      allocations") renamed CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE to
      CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE. Update the documentation reference
      to reflect that.
      
      Fixes: c5665868 ("mm: kmemleak: use the memory pool for early allocations")
      Signed-off-by: NJeremy Cline <jcline@redhat.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      2c861bf5
    • B
      docs: security: fix section hyperlink · 6795b29c
      Brendan Jackman 提交于
      The reStructuredText syntax is wrong here; not sure how it was
      intended but we can just use the section header as an implicit
      hyperlink target, with a single "outward" underscore.
      Signed-off-by: NBrendan Jackman <bhenryj0117@gmail.com>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      6795b29c
    • M
      CREDITS: update email address for Martin Kepplinger · 9fde576f
      Martin Kepplinger 提交于
      Employers change - Linux stays. Also, add my (long time valid) GPG key
      fingerprint to the contact details.
      Signed-off-by: NMartin Kepplinger <martin.kepplinger@puri.sm>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      9fde576f
    • M
      mailmap: add new email address for Martin Kepplinger · 631604b4
      Martin Kepplinger 提交于
      Include my new email address for tracking my contributions.
      Signed-off-by: NMartin Kepplinger <martin.kepplinger@puri.sm>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      631604b4
    • K
      docs: Use make invocation's -j argument for parallelism · 29efbb24
      Kees Cook 提交于
      While sphinx 1.7 and later supports "-jauto" for parallelism, this
      effectively ignores the "-j" flag used in the "make" invocation, which
      may cause confusion for build systems. Instead, extract the available
      parallelism from "make"'s job server (since it is not exposed in any
      special variables) and use that for the "sphinx-build" run. Now things
      work correctly for builds where -j is specified at the top-level:
      
      	make -j16 htmldocs
      
      If -j is not specified, continue to fallback to "-jauto" if available.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      29efbb24
    • L
      Linux 5.4-rc1 · 54ecb8f7
      Linus Torvalds 提交于
      54ecb8f7
    • L
      Merge tag 'for-5.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · bb48a591
      Linus Torvalds 提交于
      Pull btrfs fixes from David Sterba:
       "A bunch of fixes that accumulated in recent weeks, mostly material for
        stable.
      
        Summary:
      
         - fix for regression from 5.3 that prevents to use balance convert
           with single profile
      
         - qgroup fixes: rescan race, accounting leak with multiple writers,
           potential leak after io failure recovery
      
         - fix for use after free in relocation (reported by KASAN)
      
         - other error handling fixups"
      
      * tag 'for-5.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: qgroup: Fix reserved data space leak if we have multiple reserve calls
        btrfs: qgroup: Fix the wrong target io_tree when freeing reserved data space
        btrfs: Fix a regression which we can't convert to SINGLE profile
        btrfs: relocation: fix use-after-free on dead relocation roots
        Btrfs: fix race setting up and completing qgroup rescan workers
        Btrfs: fix missing error return if writeback for extent buffer never started
        btrfs: adjust dirty_metadata_bytes after writeback failure of extent buffer
        Btrfs: fix selftests failure due to uninitialized i_mode in test inodes
      bb48a591
    • L
      Merge tag 'csky-for-linus-5.4-rc1' of git://github.com/c-sky/csky-linux · 80b29b6b
      Linus Torvalds 提交于
      Pull csky updates from Guo Ren:
       "This round of csky subsystem just some fixups:
      
         - Fix mb() synchronization problem
      
         - Fix dma_alloc_coherent with PAGE_SO attribute
      
         - Fix cache_op failed when cross memory ZONEs
      
         - Optimize arch_sync_dma_for_cpu/device with dma_inv_range
      
         - Fix ioremap function losing
      
         - Fix arch_get_unmapped_area() implementation
      
         - Fix defer cache flush for 610
      
         - Support kernel non-aligned access
      
         - Fix 610 vipt cache flush mechanism
      
         - Fix add zero_fp fixup perf backtrace panic
      
         - Move static keyword to the front of declaration
      
         - Fix csky_pmu.max_period assignment
      
         - Use generic free_initrd_mem()
      
         - entry: Remove unneeded need_resched() loop"
      
      * tag 'csky-for-linus-5.4-rc1' of git://github.com/c-sky/csky-linux:
        csky: Move static keyword to the front of declaration
        csky: entry: Remove unneeded need_resched() loop
        csky: Fixup csky_pmu.max_period assignment
        csky: Fixup add zero_fp fixup perf backtrace panic
        csky: Use generic free_initrd_mem()
        csky: Fixup 610 vipt cache flush mechanism
        csky: Support kernel non-aligned access
        csky: Fixup defer cache flush for 610
        csky: Fixup arch_get_unmapped_area() implementation
        csky: Fixup ioremap function losing
        csky: Optimize arch_sync_dma_for_cpu/device with dma_inv_range
        csky/dma: Fixup cache_op failed when cross memory ZONEs
        csky: Fixup dma_alloc_coherent with PAGE_SO attribute
        csky: Fixup mb() synchronization problem
      80b29b6b
    • L
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · cef0aa0c
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Olof Johansson:
       "A few fixes that have trickled in through the merge window:
      
         - Video fixes for OMAP due to panel-dpi driver removal
      
         - Clock fixes for OMAP that broke no-idle quirks + nfsroot on DRA7
      
         - Fixing arch version on ASpeed ast2500
      
         - Two fixes for reset handling on ARM SCMI"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        ARM: aspeed: ast2500 is ARMv6K
        reset: reset-scmi: add missing handle initialisation
        firmware: arm_scmi: reset: fix reset_state assignment in scmi_domain_reset
        bus: ti-sysc: Remove unpaired sysc_clkdm_deny_idle()
        ARM: dts: logicpd-som-lv: Fix i2c2 and i2c3 Pin mux
        ARM: dts: am3517-evm: Fix missing video
        ARM: dts: logicpd-torpedo-baseboard: Fix missing video
        ARM: omap2plus_defconfig: Fix missing video
        bus: ti-sysc: Fix handling of invalid clocks
        bus: ti-sysc: Fix clock handling for no-idle quirks
      cef0aa0c
    • L
      Merge tag 'trace-v5.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · cf4f493b
      Linus Torvalds 提交于
      Pull tracing fixes from Steven Rostedt:
       "A few more tracing fixes:
      
         - Fix a buffer overflow by checking nr_args correctly in probes
      
         - Fix a warning that is reported by clang
      
         - Fix a possible memory leak in error path of filter processing
      
         - Fix the selftest that checks for failures, but wasn't failing
      
         - Minor clean up on call site output of a memory trace event"
      
      * tag 'trace-v5.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        selftests/ftrace: Fix same probe error test
        mm, tracing: Print symbol name for call_site in trace events
        tracing: Have error path in predicate_parse() free its allocated memory
        tracing: Fix clang -Wint-in-bool-context warnings in IF_ASSIGN macro
        tracing/probe: Fix to check the difference of nr_args before adding probe
      cf4f493b
    • L
      Merge tag 'mmc-v5.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · c710364f
      Linus Torvalds 提交于
      Pull more MMC updates from Ulf Hansson:
       "A couple more updates/fixes for MMC:
      
         - sdhci-pci: Add Genesys Logic GL975x support
      
         - sdhci-tegra: Recover loss in throughput for DMA
      
         - sdhci-of-esdhc: Fix DMA bug"
      
      * tag 'mmc-v5.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: host: sdhci-pci: Add Genesys Logic GL975x support
        mmc: tegra: Implement ->set_dma_mask()
        mmc: sdhci: Let drivers define their DMA mask
        mmc: sdhci-of-esdhc: set DMA snooping based on DMA coherence
        mmc: sdhci: improve ADMA error reporting
      c710364f
  5. 30 9月, 2019 12 次提交
    • K
      csky: Move static keyword to the front of declaration · 9af032a3
      Krzysztof Wilczynski 提交于
      Move the static keyword to the front of declaration of
      csky_pmu_of_device_ids, and resolve the following compiler
      warning that can be seen when building with warnings
      enabled (W=1):
      
      arch/csky/kernel/perf_event.c:1340:1: warning:
        ‘static’ is not at beginning of declaration [-Wold-style-declaration]
      Signed-off-by: NKrzysztof Wilczynski <kw@linux.com>
      Signed-off-by: NGuo Ren <guoren@kernel.org>
      9af032a3
    • V
      csky: entry: Remove unneeded need_resched() loop · a2139d3b
      Valentin Schneider 提交于
      Since the enabling and disabling of IRQs within preempt_schedule_irq()
      is contained in a need_resched() loop, we don't need the outer arch
      code loop.
      Signed-off-by: NValentin Schneider <valentin.schneider@arm.com>
      Signed-off-by: NGuo Ren <guoren@kernel.org>
      a2139d3b
    • L
      Merge tag 'char-misc-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 97f9a3c4
      Linus Torvalds 提交于
      Pull Documentation/process update from Greg KH:
       "Here are two small Documentation/process/embargoed-hardware-issues.rst
        file updates that missed my previous char/misc pull request.
      
        The first one adds an Intel representative for the process, and the
        second one cleans up the text a bit more when it comes to how the
        disclosure rules work, as it was a bit confusing to some companies"
      
      * tag 'char-misc-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        Documentation/process: Clarify disclosure rules
        Documentation/process: Volunteer as the ambassador for Intel
      97f9a3c4
    • L
      Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 1eb80d6f
      Linus Torvalds 提交于
      Pull more vfs updates from Al Viro:
       "A couple of misc patches"
      
      * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        afs dynroot: switch to simple_dir_operations
        fs/handle.c - fix up kerneldoc
      1eb80d6f
    • L
      Merge tag '5.4-rc-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 7edee522
      Linus Torvalds 提交于
      Pull more cifs updates from Steve French:
       "Fixes from the recent SMB3 Test events and Storage Developer
        Conference (held the last two weeks).
      
        Here are nine smb3 patches including an important patch for debugging
        traces with wireshark, with three patches marked for stable.
      
        Additional fixes from last week to better handle some newly discovered
        reparse points, and a fix the create/mkdir path for setting the mode
        more atomically (in SMB3 Create security descriptor context), and one
        for path name processing are still being tested so are not included
        here"
      
      * tag '5.4-rc-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        CIFS: Fix oplock handling for SMB 2.1+ protocols
        smb3: missing ACL related flags
        smb3: pass mode bits into create calls
        smb3: Add missing reparse tags
        CIFS: fix max ea value size
        fs/cifs/sess.c: Remove set but not used variable 'capabilities'
        fs/cifs/smb2pdu.c: Make SMB2_notify_init static
        smb3: fix leak in "open on server" perf counter
        smb3: allow decryption keys to be dumped by admin for debugging
      7edee522
    • M
      csky: Fixup csky_pmu.max_period assignment · 3a09d8e2
      Mao Han 提交于
      The csky_pmu.max_period has type u64, and BIT() can only return
      32 bits unsigned long on C-SKY. The initialization for max_period
      will be incorrect when count_width is bigger than 32.
      
      Use BIT_ULL()
      Signed-off-by: NMao Han <han_mao@c-sky.com>
      Signed-off-by: NGuo Ren <ren_guo@c-sky.com>
      3a09d8e2
    • G
      csky: Fixup add zero_fp fixup perf backtrace panic · 48ede51f
      Guo Ren 提交于
      We need set fp zero to let backtrace know the end. The patch fixup perf
      callchain panic problem, because backtrace didn't know what is the end
      of fp.
      Signed-off-by: NGuo Ren <ren_guo@c-sky.com>
      Reported-by: NMao Han <han_mao@c-sky.com>
      48ede51f
    • M
      csky: Use generic free_initrd_mem() · fdbdcddc
      Mike Rapoport 提交于
      The csky implementation of free_initrd_mem() is an open-coded version of
      free_reserved_area() without poisoning.
      
      Remove it and make csky use the generic version of free_initrd_mem().
      Signed-off-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NGuo Ren <guoren@kernel.org>
      fdbdcddc
    • L
      Merge branch 'entropy' · 3f2dc279
      Linus Torvalds 提交于
      Merge active entropy generation updates.
      
      This is admittedly partly "for discussion".  We need to have a way
      forward for the boot time deadlocks where user space ends up waiting for
      more entropy, but no entropy is forthcoming because the system is
      entirely idle just waiting for something to happen.
      
      While this was triggered by what is arguably a user space bug with
      GDM/gnome-session asking for secure randomness during early boot, when
      they didn't even need any such truly secure thing, the issue ends up
      being that our "getrandom()" interface is prone to that kind of
      confusion, because people don't think very hard about whether they want
      to block for sufficient amounts of entropy.
      
      The approach here-in is to decide to not just passively wait for entropy
      to happen, but to start actively collecting it if it is missing.  This
      is not necessarily always possible, but if the architecture has a CPU
      cycle counter, there is a fair amount of noise in the exact timings of
      reasonably complex loads.
      
      We may end up tweaking the load and the entropy estimates, but this
      should be at least a reasonable starting point.
      
      As part of this, we also revert the revert of the ext4 IO pattern
      improvement that ended up triggering the reported lack of external
      entropy.
      
      * getrandom() active entropy waiting:
        Revert "Revert "ext4: make __ext4_get_inode_loc plug""
        random: try to actively add entropy rather than passively wait for it
      3f2dc279
    • L
      Revert "Revert "ext4: make __ext4_get_inode_loc plug"" · 02f03c42
      Linus Torvalds 提交于
      This reverts commit 72dbcf72.
      
      Instead of waiting forever for entropy that may just not happen, we now
      try to actively generate entropy when required, and are thus hopefully
      avoiding the problem that caused the nice ext4 IO pattern fix to be
      reverted.
      
      So revert the revert.
      
      Cc: Ahmed S. Darwish <darwish.07@gmail.com>
      Cc: Ted Ts'o <tytso@mit.edu>
      Cc: Willy Tarreau <w@1wt.eu>
      Cc: Alexander E. Patrakov <patrakov@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      02f03c42
    • L
      random: try to actively add entropy rather than passively wait for it · 50ee7529
      Linus Torvalds 提交于
      For 5.3 we had to revert a nice ext4 IO pattern improvement, because it
      caused a bootup regression due to lack of entropy at bootup together
      with arguably broken user space that was asking for secure random
      numbers when it really didn't need to.
      
      See commit 72dbcf72 (Revert "ext4: make __ext4_get_inode_loc plug").
      
      This aims to solve the issue by actively generating entropy noise using
      the CPU cycle counter when waiting for the random number generator to
      initialize.  This only works when you have a high-frequency time stamp
      counter available, but that's the case on all modern x86 CPU's, and on
      most other modern CPU's too.
      
      What we do is to generate jitter entropy from the CPU cycle counter
      under a somewhat complex load: calling the scheduler while also
      guaranteeing a certain amount of timing noise by also triggering a
      timer.
      
      I'm sure we can tweak this, and that people will want to look at other
      alternatives, but there's been a number of papers written on jitter
      entropy, and this should really be fairly conservative by crediting one
      bit of entropy for every timer-induced jump in the cycle counter.  Not
      because the timer itself would be all that unpredictable, but because
      the interaction between the timer and the loop is going to be.
      
      Even if (and perhaps particularly if) the timer actually happens on
      another CPU, the cacheline interaction between the loop that reads the
      cycle counter and the timer itself firing is going to add perturbations
      to the cycle counter values that get mixed into the entropy pool.
      
      As Thomas pointed out, with a modern out-of-order CPU, even quite simple
      loops show a fair amount of hard-to-predict timing variability even in
      the absense of external interrupts.  But this tries to take that further
      by actually having a fairly complex interaction.
      
      This is not going to solve the entropy issue for architectures that have
      no CPU cycle counter, but it's not clear how (and if) that is solvable,
      and the hardware in question is largely starting to be irrelevant.  And
      by doing this we can at least avoid some of the even more contentious
      approaches (like making the entropy waiting time out in order to avoid
      the possibly unbounded waiting).
      
      Cc: Ahmed Darwish <darwish.07@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Cc: Nicholas Mc Guire <hofrat@opentech.at>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Willy Tarreau <w@1wt.eu>
      Cc: Alexander E. Patrakov <patrakov@gmail.com>
      Cc: Lennart Poettering <mzxreary@0pointer.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      50ee7529
    • O
      Merge tag 'fixes-5.4-merge-window' of... · 9bfd7319
      Olof Johansson 提交于
      Merge tag 'fixes-5.4-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes
      
      Fixes for omap variants
      
      Few fixes for ti-sysc interconnect target module driver for no-idle
      quirks that caused nfsroot to fail on some dra7 boards.
      
      And let's fixes to get LCD working again for logicpd board that got
      broken a while back with removal of panel-dpi driver. We need to now
      use generic CONFIG_DRM_PANEL_SIMPLE instead.
      
      * tag 'fixes-5.4-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        bus: ti-sysc: Remove unpaired sysc_clkdm_deny_idle()
        ARM: dts: logicpd-som-lv: Fix i2c2 and i2c3 Pin mux
        ARM: dts: am3517-evm: Fix missing video
        ARM: dts: logicpd-torpedo-baseboard: Fix missing video
        ARM: omap2plus_defconfig: Fix missing video
        bus: ti-sysc: Fix handling of invalid clocks
        bus: ti-sysc: Fix clock handling for no-idle quirks
      
      Link: https://lore.kernel.org/r/pull-1568819401-72461@atomide.comSigned-off-by: NOlof Johansson <olof@lixom.net>
      9bfd7319