1. Apr 03, 2023
  2. Mar 10, 2023
  3. Mar 09, 2023
    • Linus Torvalds's avatar
      Merge tag 'fs_for_v6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 6a98c9ca
      Linus Torvalds authored
      Pull udf fixes from Jan Kara:
       "Fix bugs in UDF caused by the big pile of changes that went in during
        the merge window"
      
      * tag 'fs_for_v6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        udf: Warn if block mapping is done for in-ICB files
        udf: Fix reading of in-ICB files
        udf: Fix lost writes in udf_adinicb_writepage()
      6a98c9ca
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v6.3-2' of... · 55ee6646
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver fixes from Hans de Goede:
       "A small set of assorted bug and build/warning fixes"
      
      * tag 'platform-drivers-x86-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
        platform: mellanox: mlx-platform: Initialize shift variable to 0
        platform/x86: int3472: Add GPIOs to Surface Go 3 Board data
        platform/x86: ISST: Fix kernel documentation warnings
        platform: x86: MLX_PLATFORM: select REGMAP instead of depending on it
        platform: mellanox: select REGMAP instead of depending on it
        platform/x86/intel/tpmi: Fix double free reported by Smatch
        platform/x86: ISST: Increase range of valid mail box commands
        platform/x86: dell-ddv: Fix temperature scaling
        platform/x86: dell-ddv: Fix cache invalidation on resume
        platform/x86/amd: pmc: remove CONFIG_SUSPEND checks
      55ee6646
    • Linus Torvalds's avatar
      x86/resctl: fix scheduler confusion with 'current' · 7fef0997
      Linus Torvalds authored
      
      
      The implementation of 'current' on x86 is very intentionally special: it
      is a very common thing to look up, and it uses 'this_cpu_read_stable()'
      to get the current thread pointer efficiently from per-cpu storage.
      
      And the keyword in there is 'stable': the current thread pointer never
      changes as far as a single thread is concerned.  Even if when a thread
      is preempted, or moved to another CPU, or even across an explicit call
      'schedule()' that thread will still have the same value for 'current'.
      
      It is, after all, the kernel base pointer to thread-local storage.
      That's why it's stable to begin with, but it's also why it's important
      enough that we have that special 'this_cpu_read_stable()' access for it.
      
      So this is all done very intentionally to allow the compiler to treat
      'current' as a value that never visibly changes, so that the compiler
      can do CSE and combine multiple different 'current' accesses into one.
      
      However, there is obviously one very special situation when the
      currently running thread does actually change: inside the scheduler
      itself.
      
      So the scheduler code paths are special, and do not have a 'current'
      thread at all.  Instead there are _two_ threads: the previous and the
      next thread - typically called 'prev' and 'next' (or prev_p/next_p)
      internally.
      
      So this is all actually quite straightforward and simple, and not all
      that complicated.
      
      Except for when you then have special code that is run in scheduler
      context, that code then has to be aware that 'current' isn't really a
      valid thing.  Did you mean 'prev'? Did you mean 'next'?
      
      In fact, even if then look at the code, and you use 'current' after the
      new value has been assigned to the percpu variable, we have explicitly
      told the compiler that 'current' is magical and always stable.  So the
      compiler is quite free to use an older (or newer) value of 'current',
      and the actual assignment to the percpu storage is not relevant even if
      it might look that way.
      
      Which is exactly what happened in the resctl code, that blithely used
      'current' in '__resctrl_sched_in()' when it really wanted the new
      process state (as implied by the name: we're scheduling 'into' that new
      resctl state).  And clang would end up just using the old thread pointer
      value at least in some configurations.
      
      This could have happened with gcc too, and purely depends on random
      compiler details.  Clang just seems to have been more aggressive about
      moving the read of the per-cpu current_task pointer around.
      
      The fix is trivial: just make the resctl code adhere to the scheduler
      rules of using the prev/next thread pointer explicitly, instead of using
      'current' in a situation where it just wasn't valid.
      
      That same code is then also used outside of the scheduler context (when
      a thread resctl state is explicitly changed), and then we will just pass
      in 'current' as that pointer, of course.  There is no ambiguity in that
      case.
      
      The fix may be trivial, but noticing and figuring out what went wrong
      was not.  The credit for that goes to Stephane Eranian.
      
      Reported-by: default avatarStephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/lkml/20230303231133.1486085-1-eranian@google.com/
      Link: https://lore.kernel.org/lkml/alpine.LFD.2.01.0908011214330.3304@localhost.localdomain/
      
      
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Tested-by: default avatarTony Luck <tony.luck@intel.com>
      Tested-by: default avatarStephane Eranian <eranian@google.com>
      Tested-by: default avatarBabu Moger <babu.moger@amd.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7fef0997
  4. Mar 08, 2023
    • Linus Torvalds's avatar
      cpumask: be more careful with 'cpumask_setall()' · 63355b98
      Linus Torvalds authored
      Commit 596ff4a0 ("cpumask: re-introduce constant-sized cpumask
      optimizations") changed cpumask_setall() to use "bitmap_set()" instead
      of "bitmap_fill()", because bitmap_fill() would explicitly set all the
      bits of a constant sized small bitmap, and that's exactly what we don't
      want: we want to only set bits up to 'nr_cpu_ids', which is what
      "bitmap_set()" does.
      
      However, Yury correctly points out that while "bitmap_set()" does indeed
      only set bits up to the required bitmap size, it doesn't _clear_ bits
      above that size, so the upper bits would still not have well-defined
      values.
      
      Now, none of this should really matter, since any bits set past
      'nr_cpu_ids' should always be ignored in the first place.  Yes, the bit
      scanning functions might return them as a result, but since users should
      always consider the ">= nr_cpu_ids" condition to mean "no more bits",
      that shouldn't have any actual effect (see previous commit 8ca09d5f
      
      
      "cpumask: fix incorrect cpumask scanning result checks").
      
      But let's just do it right, the way the code was _intended_ to work.  We
      have had enough lazy code that works but bites us in the *rse later
      (again, see previous commit) that there's no reason to not just do this
      properly.
      
      It turns out that "bitmap_fill()" gets this all right for the complex
      case, and really only fails for the inlined optimized case that just
      fills the whole word.  And while we could just fix bitmap_fill() to use
      the proper last word mask, there's two issues with that:
      
       - the cpumask case wants to do the _optimization_ based on "NR_CPUS is
         a small constant", but then wants to do the actual bit _fill_ based
         on "nr_cpu_ids" that isn't necessarily that same constant
      
       - we have lots of non-cpumask users of bitmap_fill(), and while they
         hopefully don't care, and probably would want the proper semantics
         anyway ("only set bits up to the limit"), I do not want the cpumask
         changes to impact other parts
      
      So this ends up just doing the single-word optimization by hand in the
      cpumask code.  If our cpumask is fundamentally limited to a single word,
      just do the proper "fill in that word" exactly.  And if it's the more
      complex multi-word case, then the generic bitmap_fill() will DTRT.
      
      This is all an example of how our bitmap function optimizations really
      are somewhat broken.  They conflate the "this is size of the bitmap"
      optimizations with the actual bit(s) we want to set.
      
      In many cases we really want to have the two be separate things:
      sometimes we base our optimizations on the size of the whole bitmap ("I
      know this whole bitmap fits in a single word, so I'll just use
      single-word accesses"), and sometimes we base them on the bit we are
      looking at ("this is just acting on bits that are in the first word, so
      I'll use single-word accesses").
      
      Notice how the end result of the two optimizations are the same, but the
      way we get to them are quite different.
      
      And all our cpumask optimization games are really about that fundamental
      distinction, and we'd often really want to pass in both the "this is the
      bit I'm working on" (which _can_ be a small constant but might be
      variable), and "I know it's in this range even if it's variable" (based
      on CONFIG_NR_CPUS).
      
      So this cpumask_setall() implementation just makes that explicit.  It
      checks the "I statically know the size is small" using the known static
      size of the cpumask (which is what that 'small_cpumask_bits' is all
      about), but then sets the actual bits using the exact number of cpus we
      have (ie 'nr_cpumask_bits')
      
      Of course, in a perfect world, the compiler would have done all the
      range analysis (possibly with help from us just telling it that
      "this value is always in this range"), and would do all of this for us.
      But that is not the world we live in.
      
      While we dream of that perfect world, this does that manual logic to
      make it all work out.  And this was a very long explanation for a small
      code change that shouldn't even matter.
      
      Reported-by: default avatarYury Norov <yury.norov@gmail.com>
      Link: https://lore.kernel.org/lkml/ZAV9nGG9e1%2FrV+L%2F@yury-laptop/
      
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      63355b98
  5. Mar 07, 2023
  6. Mar 06, 2023
    • Jan Kara's avatar
      udf: Warn if block mapping is done for in-ICB files · 63bceed8
      Jan Kara authored
      
      
      Now that address space operations are merge dfor in-ICB and normal
      files, it is more likely some code mistakenly tries to map blocks for
      in-ICB files. WARN and return error instead of silently returning
      garbage.
      
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      63bceed8
    • Jan Kara's avatar
      udf: Fix reading of in-ICB files · cecb1f06
      Jan Kara authored
      After merging address space operations of normal and in-ICB files,
      readahead could get called for in-ICB files which resulted in
      udf_get_block() being called for these files. udf_get_block() is not
      prepared to be called for in-ICB files and ends up returning garbage
      results as it interprets file data as extent list. Fix the problem by
      skipping readahead for in-ICB files.
      
      Fixes: 37a8a39f
      
       ("udf: Switch to single address_space_operations")
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      cecb1f06
    • Jan Kara's avatar
      udf: Fix lost writes in udf_adinicb_writepage() · 49854d3c
      Jan Kara authored
      The patch converting udf_adinicb_writepage() to avoid manually kmapping
      the page used memcpy_to_page() however that copies in the wrong
      direction (effectively overwriting file data with the old contents).
      What we should be using is memcpy_from_page() to copy data from the page
      into the inode and then mark inode dirty to store the data.
      
      Fixes: 5cfc4532
      
       ("udf: Convert udf_adinicb_writepage() to memcpy_to_page()")
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      49854d3c
    • Michael Schmitz's avatar
      m68k: Only force 030 bus error if PC not in exception table · e36a82be
      Michael Schmitz authored
      
      
      __get_kernel_nofault() does copy data in supervisor mode when
      forcing a task backtrace log through /proc/sysrq_trigger.
      This is expected cause a bus error exception on e.g. NULL
      pointer dereferencing when logging a kernel task has no
      workqueue associated. This bus error ought to be ignored.
      
      Our 030 bus error handler is ill equipped to deal with this:
      
      Whenever ssw indicates a kernel mode access on a data fault,
      we don't even attempt to handle the fault and instead always
      send a SEGV signal (or panic). As a result, the check
      for exception handling at the fault PC (buried in
      send_sig_fault() which gets called from do_page_fault()
      eventually) is never used.
      
      In contrast, both 040 and 060 access error handlers do not
      care whether a fault happened on supervisor mode access,
      and will call do_page_fault() on those, ultimately honoring
      the exception table.
      
      Add a check in bus_error030 to call do_page_fault() in case
      we do have an entry for the fault PC in our exception table.
      
      I had attempted a fix for this earlier in 2019 that did rely
      on testing pagefault_disabled() (see link below) to achieve
      the same thing, but this patch should be more generic.
      
      Tested on 030 Atari Falcon.
      
      Reported-by: default avatarEero Tamminen <oak@helsinkinet.fi>
      Link: https://lore.kernel.org/r/alpine.LNX.2.21.1904091023540.25@nippy.intranet
      Link: https://lore.kernel.org/r/63130691-1984-c423-c1f2-73bfd8d3dcd3@gmail.com
      
      
      Signed-off-by: default avatarMichael Schmitz <schmitzmic@gmail.com>
      Reviewed-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Link: https://lore.kernel.org/r/20230301021107.26307-1-schmitzmic@gmail.com
      
      
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      e36a82be
    • Geert Uytterhoeven's avatar
      m68k: mm: Move initrd phys_to_virt handling after paging_init() · d4b97925
      Geert Uytterhoeven authored
      When booting with an initial ramdisk on platforms where physical memory
      does not start at address zero (e.g. on Amiga):
      
          initrd: 0ef0602c - 0f800000
          Zone ranges:
            DMA      [mem 0x0000000008000000-0x000000f7ffffffff]
            Normal   empty
          Movable zone start for each node
          Early memory node ranges
            node   0: [mem 0x0000000008000000-0x000000000f7fffff]
          Initmem setup node 0 [mem 0x0000000008000000-0x000000000f7fffff]
          Unable to handle kernel access at virtual address (ptrval)
          Oops: 00000000
          Modules linked in:
          PC: [<00201d3c>] memcmp+0x28/0x56
      
      As phys_to_virt() relies on m68k_memoffset and module_fixup(), it must
      not be called before paging_init().  Hence postpone the phys_to_virt
      handling for the initial ramdisk until after calling paging_init().
      
      While at it, reduce #ifdef clutter by using IS_ENABLED() instead.
      
      Fixes: 376e3fde
      
       ("m68k: Enable memtest functionality")
      Reported-by: default avatarStephen Walsh <vk3heg@vk3heg.net>
      Link: https://lists.debian.org/debian-68k/2022/09/msg00007.html
      
      
      Reported-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
      Link: https://lore.kernel.org/r/4f45f05f377bf3f5baf88dbd5c3c8aeac59d94f0.camel@physik.fu-berlin.de
      
      
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarFinn Thain <fthain@linux-m68k.org>
      Link: https://lore.kernel.org/r/dff216da09ab7a60217c3fc2147e671ae07d636f.1677528627.git.geert@linux-m68k.org
      d4b97925
    • Kars de Jong's avatar
      m68k: mm: Fix systems with memory at end of 32-bit address space · 0d9fad91
      Kars de Jong authored
      The calculation of end addresses of memory chunks overflowed to 0 when
      a memory chunk is located at the end of 32-bit address space.
      This is the case for the HP300 architecture.
      
      Link: https://lore.kernel.org/linux-m68k/CACz-3rhUo5pgNwdWHaPWmz+30Qo9xCg70wNxdf7o5x-6tXq8QQ@mail.gmail.com/
      
      
      Signed-off-by: default avatarKars de Jong <jongk@linux-m68k.org>
      Reviewed-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Link: https://lore.kernel.org/r/20230223112349.26675-1-jongk@linux-m68k.org
      
      
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      0d9fad91
    • Linus Torvalds's avatar
      Linux 6.3-rc1 · fe15c26e
      Linus Torvalds authored
      fe15c26e
    • Linus Torvalds's avatar
      cpumask: re-introduce constant-sized cpumask optimizations · 596ff4a0
      Linus Torvalds authored
      Commit aa47a7c2 ("lib/cpumask: deprecate nr_cpumask_bits") resulted
      in the cpumask operations potentially becoming hugely less efficient,
      because suddenly the cpumask was always considered to be variable-sized.
      
      The optimization was then later added back in a limited form by commit
      6f9c07be
      
       ("lib/cpumask: add FORCE_NR_CPUS config option"), but that
      FORCE_NR_CPUS option is not useful in a generic kernel and more of a
      special case for embedded situations with fixed hardware.
      
      Instead, just re-introduce the optimization, with some changes.
      
      Instead of depending on CPUMASK_OFFSTACK being false, and then always
      using the full constant cpumask width, this introduces three different
      cpumask "sizes":
      
       - the exact size (nr_cpumask_bits) remains identical to nr_cpu_ids.
      
         This is used for situations where we should use the exact size.
      
       - the "small" size (small_cpumask_bits) is the NR_CPUS constant if it
         fits in a single word and the bitmap operations thus end up able
         to trigger the "small_const_nbits()" optimizations.
      
         This is used for the operations that have optimized single-word
         cases that get inlined, notably the bit find and scanning functions.
      
       - the "large" size (large_cpumask_bits) is the NR_CPUS constant if it
         is an sufficiently small constant that makes simple "copy" and
         "clear" operations more efficient.
      
         This is arbitrarily set at four words or less.
      
      As a an example of this situation, without this fixed size optimization,
      cpumask_clear() will generate code like
      
              movl    nr_cpu_ids(%rip), %edx
              addq    $63, %rdx
              shrq    $3, %rdx
              andl    $-8, %edx
              callq   memset@PLT
      
      on x86-64, because it would calculate the "exact" number of longwords
      that need to be cleared.
      
      In contrast, with this patch, using a MAX_CPU of 64 (which is quite a
      reasonable value to use), the above becomes a single
      
      	movq $0,cpumask
      
      instruction instead, because instead of caring to figure out exactly how
      many CPU's the system has, it just knows that the cpumask will be a
      single word and can just clear it all.
      
      Note that this does end up tightening the rules a bit from the original
      version in another way: operations that set bits in the cpumask are now
      limited to the actual nr_cpu_ids limit, whereas we used to do the
      nr_cpumask_bits thing almost everywhere in the cpumask code.
      
      But if you just clear bits, or scan for bits, we can use the simpler
      compile-time constants.
      
      In the process, remove 'cpumask_complement()' and 'for_each_cpu_not()'
      which were not useful, and which fundamentally have to be limited to
      'nr_cpu_ids'.  Better remove them now than have somebody introduce use
      of them later.
      
      Of course, on x86-64 with MAXSMP there is no sane small compile-time
      constant for the cpumask sizes, and we end up using the actual CPU bits,
      and will generate the above kind of horrors regardless.  Please don't
      use MAXSMP unless you really expect to have machines with thousands of
      cores.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      596ff4a0
    • Linus Torvalds's avatar
      Merge tag 'v6.3-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · f915322f
      Linus Torvalds authored
      Pull crypto fix from Herbert Xu:
       "Fix a regression in the caam driver"
      
      * tag 'v6.3-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: caam - Fix edesc/iv ordering mixup
      f915322f
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2023-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7f9ec7d8
      Linus Torvalds authored
      Pull x86 updates from Thomas Gleixner:
       "A small set of updates for x86:
      
         - Return -EIO instead of success when the certificate buffer for SEV
           guests is not large enough
      
         - Allow STIPB to be enabled with legacy IBSR. Legacy IBRS is cleared
           on return to userspace for performance reasons, but the leaves user
           space vulnerable to cross-thread attacks which STIBP prevents.
           Update the documentation accordingly"
      
      * tag 'x86-urgent-2023-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        virt/sev-guest: Return -EIO if certificate buffer is not large enough
        Documentation/hw-vuln: Document the interaction between IBRS and STIBP
        x86/speculation: Allow enabling STIBP with legacy IBRS
      7f9ec7d8
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2023-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4e9c542c
      Linus Torvalds authored
      Pull irq updates from Thomas Gleixner:
       "A set of updates for the interrupt susbsystem:
      
         - Prevent possible NULL pointer derefences in
           irq_data_get_affinity_mask() and irq_domain_create_hierarchy()
      
         - Take the per device MSI lock before invoking code which relies on
           it being hold
      
         - Make sure that MSI descriptors are unreferenced before freeing
           them. This was overlooked when the platform MSI code was converted
           to use core infrastructure and results in a fals positive warning
      
         - Remove dead code in the MSI subsystem
      
         - Clarify the documentation for pci_msix_free_irq()
      
         - More kobj_type constification"
      
      * tag 'irq-urgent-2023-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq/msi, platform-msi: Ensure that MSI descriptors are unreferenced
        genirq/msi: Drop dead domain name assignment
        irqdomain: Add missing NULL pointer check in irq_domain_create_hierarchy()
        genirq/irqdesc: Make kobj_type structures constant
        PCI/MSI: Clarify usage of pci_msix_free_irq()
        genirq/msi: Take the per-device MSI lock before validating the control structure
        genirq/ipi: Fix NULL pointer deref in irq_data_get_affinity_mask()
      4e9c542c
    • Linus Torvalds's avatar
      Merge tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 1a90673e
      Linus Torvalds authored
      Pull vfs update from Al Viro:
       "Adding Christian Brauner as VFS co-maintainer"
      
      * tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        Adding VFS co-maintainer
      1a90673e
    • Linus Torvalds's avatar
      Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 1a8d05a7
      Linus Torvalds authored
      Pull VM_FAULT_RETRY fixes from Al Viro:
       "Some of the page fault handlers do not deal with the following case
        correctly:
      
         - handle_mm_fault() has returned VM_FAULT_RETRY
      
         - there is a pending fatal signal
      
         - fault had happened in kernel mode
      
        Correct action in such case is not "return unconditionally" - fatal
        signals are handled only upon return to userland and something like
        copy_to_user() would end up retrying the faulting instruction and
        triggering the same fault again and again.
      
        What we need to do in such case is to make the caller to treat that as
        failed uaccess attempt - handle exception if there is an exception
        handler for faulting instruction or oops if there isn't one.
      
        Over the years some architectures had been fixed and now are handling
        that case properly; some still do not. This series should fix the
        remaining ones.
      
        Status:
      
         - m68k, riscv, hexagon, parisc: tested/acked by maintainers.
      
         - alpha, sparc32, sparc64: tested locally - bug has been reproduced
           on the unpatched kernel and verified to be fixed by this series.
      
         - ia64, microblaze, nios2, openrisc: build, but otherwise completely
           untested"
      
      * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        openrisc: fix livelock in uaccess
        nios2: fix livelock in uaccess
        microblaze: fix livelock in uaccess
        ia64: fix livelock in uaccess
        sparc: fix livelock in uaccess
        alpha: fix livelock in uaccess
        parisc: fix livelock in uaccess
        hexagon: fix livelock in uaccess
        riscv: fix livelock in uaccess
        m68k: fix livelock in uaccess
      1a8d05a7
    • Masahiro Yamada's avatar
      Remove Intel compiler support · 95207db8
      Masahiro Yamada authored
      include/linux/compiler-intel.h had no update in the past 3 years.
      
      We often forget about the third C compiler to build the kernel.
      
      For example, commit a0a12c3e ("asm goto: eradicate CC_HAS_ASM_GOTO")
      only mentioned GCC and Clang.
      
      init/Kconfig defines CC_IS_GCC and CC_IS_CLANG but not CC_IS_ICC,
      and nobody has reported any issue.
      
      I guess the Intel Compiler support is broken, and nobody is caring
      about it.
      
      Harald Arnesen pointed out ICC (classic Intel C/C++ compiler) is
      deprecated:
      
          $ icc -v
          icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is
          deprecated and will be removed from product release in the second half
          of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended
          compiler moving forward. Please transition to use this compiler. Use
          '-diag-disable=10441' to disable this message.
          icc version 2021.7.0 (gcc version 12.1.0 compatibility)
      
      Arnd Bergmann provided a link to the article, "Intel C/C++ compilers
      complete adoption of LLVM".
      
      lib/zstd/common/compiler.h and lib/zstd/compress/zstd_fast.c were kept
      untouched for better sync with https://github.com/facebook/zstd
      
      Link: https://www.intel.com/content/www/us/en/developer/articles/technical/adoption-of-llvm-complete-icx.html
      
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reviewed-by: default avatarMiguel Ojeda <ojeda@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      95207db8
  7. Mar 05, 2023
    • Al Viro's avatar
      Adding VFS co-maintainer · 3304f18b
      Al Viro authored
      
      
      Acked-by: default avatarChristian Brauner <brauner@kernel.org>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      3304f18b
    • Linus Torvalds's avatar
      Merge tag 'i2c-for-6.3-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · b01fe98d
      Linus Torvalds authored
      Pull more i2c updates from Wolfram Sang:
       "Some improvements/fixes for the newly added GXP driver and a Kconfig
        dependency fix"
      
      * tag 'i2c-for-6.3-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: gxp: fix an error code in probe
        i2c: gxp: return proper error on address NACK
        i2c: gxp: remove "empty" switch statement
        i2c: Disable I2C_APPLE when I2C_PASEMI is a builtin
      b01fe98d
    • Linus Torvalds's avatar
      mm: avoid gcc complaint about pointer casting · e77d587a
      Linus Torvalds authored
      The migration code ends up temporarily stashing information of the wrong
      type in unused fields of the newly allocated destination folio.  That
      all works fine, but gcc does complain about the pointer type mis-use:
      
          mm/migrate.c: In function ‘__migrate_folio_extract’:
          mm/migrate.c:1050:20: note: randstruct: casting between randomized structure pointer types (ssa): ‘struct anon_vma’ and ‘struct address_space’
      
           1050 |         *anon_vmap = (void *)dst->mapping;
                |         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
      
      and gcc is actually right to complain since it really doesn't understand
      that this is a very temporary special case where this is ok.
      
      This could be fixed in different ways by just obfuscating the assignment
      sufficiently that gcc doesn't see what is going on, but the truly
      "proper C" way to do this is by explicitly using a union.
      
      Using unions for type conversions like this is normally hugely ugly and
      syntactically nasty, but this really is one of the few cases where we
      want to make it clear that we're not doing type conversion, we're really
      re-using the value bit-for-bit just using another type.
      
      IOW, this should not become a common pattern, but in this one case using
      that odd union is probably the best way to document to the compiler what
      is conceptually going on here.
      
      [ Side note: there are valid cases where we convert pointers to other
        pointer types, notably the whole "folio vs page" situation, where the
        types actually have fundamental commonalities.
      
        The fact that the gcc note is limited to just randomized structures
        means that we don't see equivalent warnings for those cases, but it
        migth also mean that we miss other cases where we do play these kinds
        of dodgy games, and this kind of explicit conversion might be a good
        idea. ]
      
      I verified that at least for an allmodconfig build on x86-64, this
      generates the exact same code, apart from line numbers and assembler
      comment changes.
      
      Fixes: 64c8902e
      
       ("migrate_pages: split unmap_and_move() to _unmap() and _move()")
      Cc: Huang, Ying <ying.huang@intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e77d587a
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2023-03-04-13-12' of... · 20fdfd55
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2023-03-04-13-12' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull misc fixes from Andrew Morton:
       "17 hotfixes.
      
        Eight are for MM and seven are for other parts of the kernel. Seven
        are cc:stable and eight address post-6.3 issues or were judged
        unsuitable for -stable backporting"
      
      * tag 'mm-hotfixes-stable-2023-03-04-13-12' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        mailmap: map Dikshita Agarwal's old address to his current one
        mailmap: map Vikash Garodia's old address to his current one
        fs/cramfs/inode.c: initialize file_ra_state
        fs: hfsplus: fix UAF issue in hfsplus_put_super
        panic: fix the panic_print NMI backtrace setting
        lib: parser: update documentation for match_NUMBER functions
        kasan, x86: don't rename memintrinsics in uninstrumented files
        kasan: test: fix test for new meminstrinsic instrumentation
        kasan: treat meminstrinsic as builtins in uninstrumented files
        kasan: emit different calls for instrumentable memintrinsics
        ocfs2: fix non-auto defrag path not working issue
        ocfs2: fix defrag path triggering jbd2 ASSERT
        mailmap: map Georgi Djakov's old Linaro address to his current one
        mm/hwpoison: convert TTU_IGNORE_HWPOISON to TTU_HWPOISON
        lib/zlib: DFLTCC deflate does not write all available bits for Z_NO_FLUSH
        mm/damon/paddr: fix missing folio_put()
        mm/mremap: fix dup_anon_vma() in vma_merge() case 4
      20fdfd55
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · c29214bc
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Drop orphaned VAS MAINTAINERS entry
      
       - Fix build errors with clang and KCSAN
      
       - Avoid build errors seen with LD_DEAD_CODE_DATA_ELIMINATION together
         with recordmcount
      
      Thanks to Nathan Chancellor.
      
      * tag 'powerpc-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc: Avoid dead code/data elimination when using recordmcount
        powerpc/vmlinux.lds: Add .text.asan/tsan sections
        powerpc: Drop orphaned VAS MAINTAINERS entry
      c29214bc
    • Linus Torvalds's avatar
      Merge tag 'sound-fix-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · d172859e
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "A collection of various small fixes that have been gathered since the
        last PR.
      
        The majority of changes are for ASoC, and there is a small change in
        ASoC PCM core, but the rest are all for driver- specific fixes /
        quirks / updates"
      
      * tag 'sound-fix-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (32 commits)
        ALSA: ice1712: Delete unreachable code in aureon_add_controls()
        ALSA: ice1712: Do not left ice->gpio_mutex locked in aureon_add_controls()
        ALSA: hda/realtek: Add quirk for HP EliteDesk 800 G6 Tower PC
        ALSA: hda/realtek: Improve support for Dell Precision 3260
        ASoC: mediatek: mt8195: add missing initialization
        ASoC: mediatek: mt8188: add missing initialization
        ASoC: amd: yc: Add DMI entries to support HP OMEN 16-n0xxx (8A43)
        ASoC: zl38060 add gpiolib dependency
        ASoC: sam9g20ek: Disable capture unless building with microphone input
        ASoC: mt8192: Fix range for sidetone positive gain
        ASoC: mt8192: Report an error if when an invalid sidetone gain is written
        ASoC: mt8192: Fix event generation for controls
        ASoC: mt8192: Remove spammy log messages
        ASoC: mchp-pdmc: fix poc noise at capture startup
        ASoC: dt-bindings: sama7g5-pdmc: add microchip,startup-delay-us binding
        ASoC: soc-pcm: add option to start DMA after DAI
        ASoC: mt8183: Fix event generation for I2S DAI operations
        ASoC: mt8183: Remove spammy logging from I2S DAI driver
        ASoC: mt6358: Remove undefined HPx Mux enumeration values
        ASoC: mt6358: Validate Wake on Voice 2 writes
        ...
      d172859e