1. 20 Sep, 2024 1 commit
    • Kris Van Hees's avatar
      kbuild: generate offset range data for builtin modules · 5f5e7344
      Kris Van Hees authored
      Create file module.builtin.ranges that can be used to find where
      built-in modules are located by their addresses. This will be useful for
      tracing tools to find what functions are for various built-in modules.
      
      The offset range data for builtin modules is generated using:
       - modules.builtin: associates object files with module names
       - vmlinux.map: provides load order of sections and offset of first member
          per section
       - vmlinux.o.map: provides offset of object file content per section
       - .*.cmd: build cmd file with KBUILD_MODFILE
      
      The generated data will look like:
      
      .text 00000000-00000000 = _text
      .text 0000baf0-0000cb10 amd_uncore
      .text 0009bd10-0009c8e0 iosf_mbi
      ...
      .text 00b9f080-00ba011a intel_skl_int3472_discrete
      .text 00ba0120-00ba03c0 intel_skl_int3472_discrete intel_skl_int3472_tps68470
      .text 00ba03c0-00ba08d6 intel_skl_int3472_tps68470
      ...
      .data 00000000-00000000 = _sdata
      .data 0000f020-0000f680 amd_uncore
      
      For each ELF section, it lists the offset of the first symbol.  This can
      be used to determine the base address of the section at runtime.
      
      Next, it lists (in strict ascending order) offset ranges in that section
      that cover the symbols of one or more builtin modules.  Multiple ranges
      can apply to a single module, and ranges can be shared between modules.
      
      The CONFIG_BUILTIN_MODULE_RANGES option controls whether offset range data
      is generated for kernel modules that are built into the kernel image.
      
      How it works:
      
       1. The modules.builtin file is parsed to obtain a list of built-in
          module names and their associated object names (the .ko file that
          the module would be in if it were a loadable module, hereafter
          referred to as <kmodfile>).  This object name can be used to
          identify objects in the kernel compile because any C or assembler
          code that ends up into a built-in module will have the option
          -DKBUILD_MODFILE=<kmodfile> present in its build command, and those
          can be found in the .<obj>.cmd file in the kernel build tree.
      
          If an object is part of multiple modules, they will all be listed
          in the KBUILD_MODFILE option argument.
      
          This allows us to conclusively determine whether an object in the
          kernel build belong to any modules, and which.
      
       2. The vmlinux.map is parsed next to determine the base address of each
          top level section so that all addresses into the section can be
          turned into offsets.  This makes it possible to handle sections
          getting loaded at different addresses at system boot.
      
          We also determine an 'anchor' symbol at the beginning of each
          section to make it possible to calculate the true base address of
          a section at runtime (i.e. symbol address - symbol offset).
      
          We collect start addresses of sections that are included in the top
          level section.  This is used when vmlinux is linked using vmlinux.o,
          because in that case, we need to look at the vmlinux.o linker map to
          know what object a symbol is found in.
      
          And finally, we process each symbol that is listed in vmlinux.map
          (or vmlinux.o.map) based on the following structure:
      
          vmlinux linked from vmlinux.a:
      
            vmlinux.map:
              <top level section>
                <included section>  -- might be same as top level section)
                  <object>          -- built-in association known
                    <symbol>        -- belongs to module(s) object belongs to
                    ...
      
          vmlinux linked from vmlinux.o:
      
            vmlinux.map:
              <top level section>
                <included section>  -- might be same as top level section)
                  vmlinux.o         -- need to use vmlinux.o.map
                    <symbol>        -- ignored
                    ...
      
            vmlinux.o.map:
              <section>
                  <object>          -- built-in association known
                    <symbol>        -- belongs to module(s) object belongs to
                    ...
      
       3. As sections, objects, and symbols are processed, offset ranges are
          constructed in a straight-forward way:
      
            - If the symbol belongs to one or more built-in modules:
                - If we were working on the same module(s), extend the range
                  to include this object
                - If we were working on another module(s), close that range,
                  and start the new one
            - If the symbol does not belong to any built-in modules:
                - If we were working on a module(s) range, close that range
      Signed-off-by: default avatarKris Van Hees <kris.van.hees@oracle.com>
      Reviewed-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Reviewed-by: default avatarAlan Maguire <alan.maguire@oracle.com>
      Reviewed-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      Tested-by: default avatarSam James <sam@gentoo.org>
      Reviewed-by: default avatarSami Tolvanen <samitolvanen@google.com>
      Tested-by: default avatarSami Tolvanen <samitolvanen@google.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      5f5e7344
  2. 10 Sep, 2024 3 commits
  3. 09 Sep, 2024 1 commit
  4. 08 Sep, 2024 1 commit
  5. 07 Sep, 2024 5 commits
  6. 01 Sep, 2024 23 commits
  7. 31 Aug, 2024 6 commits
    • Kent Overstreet's avatar
      bcachefs: Mark more errors as autofix · 3d3020c4
      Kent Overstreet authored
      errors that are known to always be safe to fix should be autofix: this
      should be most errors even at this point, but that will need some
      thorough review.
      
      note that errors are still logged in the superblock, so we'll still know
      that they happened.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      3d3020c4
    • Kent Overstreet's avatar
      bcachefs: Revert lockless buffered IO path · e3e69409
      Kent Overstreet authored
      We had a report of data corruption on nixos when building installer
      images.
      
      https://github.com/NixOS/nixpkgs/pull/321055#issuecomment-2184131334
      
      It seems that writes are being dropped, but only when issued by QEMU,
      and possibly only in snapshot mode. It's undetermined if it's write
      calls are being dropped or dirty folios.
      
      Further testing, via minimizing the original patch to just the change
      that skips the inode lock on non appends/truncates, reveals that it
      really is just not taking the inode lock that causes the corruption: it
      has nothing to do with the other logic changes for preserving write
      atomicity in corner cases.
      
      It's also kernel config dependent: it doesn't reproduce with the minimal
      kernel config that ktest uses, but it does reproduce with nixos's distro
      config. Bisection the kernel config initially pointer the finger at page
      migration or compaction, but it appears that was erroneous; we haven't
      yet determined what kernel config option actually triggers it.
      
      Sadly it appears this will have to be reverted since we're getting too
      close to release and my plate is full, but we'd _really_ like to fully
      debug it.
      
      My suspicion is that this patch is exposing a preexisting bug - the
      inode lock actually covers very little in IO paths, and we have a
      different lock (the pagecache add lock) that guards against races with
      truncate here.
      
      Fixes: 7e64c86c ("bcachefs: Buffered write path now can avoid the inode lock")
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      e3e69409
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · 6cd90e5e
      Linus Torvalds authored
      Pull misc fixes from Guenter Roeck.
      
      These are fixes for regressions that Guenther has been reporting, and
      the maintainers haven't picked up and sent in. With rc6 fairly imminent,
      I'm taking them directly from Guenter.
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        apparmor: fix policy_unpack_test on big endian systems
        Revert "MIPS: csrc-r4k: Apply verification clocksource flags"
        microblaze: don't treat zero reserved memory regions as error
      6cd90e5e
    • Linus Torvalds's avatar
      Merge tag 'pwrseq-fixes-for-v6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 8463be84
      Linus Torvalds authored
      Pull power sequencing fix from Bartosz Golaszewski:
       "A follow-up fix for the power sequencing subsystem. It turned out the
        previous fix for this driver was incomplete and broke the WLAN support
        on some platforms. This addresses the issue.
      
         - set the direction of the wlan-enable GPIO to output after
           requesting it as-is"
      
      * tag 'pwrseq-fixes-for-v6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        power: sequencing: qcom-wcn: set the wlan-enable GPIO to output
      8463be84
    • Bartosz Golaszewski's avatar
      power: sequencing: qcom-wcn: set the wlan-enable GPIO to output · d8b76207
      Bartosz Golaszewski authored
      Commit a9aaf1ff ("power: sequencing: request the WLAN enable GPIO
      as-is") broke WLAN on boards on which the wlan-enable GPIO enabling the
      wifi module isn't in output mode by default. We need to set direction to
      output while retaining the value that was already set to keep the ath
      module on if it's already started.
      
      Fixes: a9aaf1ff ("power: sequencing: request the WLAN enable GPIO as-is")
      Link: https://lore.kernel.org/r/20240823115500.37280-1-brgl@bgdev.plSigned-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
      d8b76207
    • Linus Torvalds's avatar
      Merge tag 'usb-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · e8784b0a
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small USB fixes for 6.11-rc6.  Included in here are:
      
         - dwc3 driver fixes for reported issues
      
         - MAINTAINER file update, marking a driver as unsupported :(
      
         - cdnsp driver fixes
      
         - USB gadget driver fix
      
         - USB sysfs fix
      
         - other tiny fixes
      
         - new device ids for usb serial driver
      
        All of these have been in linux-next this week with no reported
        issues"
      
      * tag 'usb-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: serial: option: add MeiG Smart SRM825L
        usb: cdnsp: fix for Link TRB with TC
        usb: dwc3: st: add missing depopulate in probe error path
        usb: dwc3: st: fix probed platform device ref count on probe error path
        usb: dwc3: ep0: Don't reset resource alloc flag (including ep0)
        usb: core: sysfs: Unmerge @usb3_hardware_lpm_attr_group in remove_power_attributes()
        usb: typec: fsa4480: Relax CHIP_ID check
        usb: dwc3: xilinx: add missing depopulate in probe error path
        usb: dwc3: omap: add missing depopulate in probe error path
        dt-bindings: usb: microchip,usb2514: Fix reference USB device schema
        usb: gadget: uvc: queue pump work in uvcg_video_enable()
        cdc-acm: Add DISABLE_ECHO quirk for GE HealthCare UI Controller
        usb: cdnsp: fix incorrect index in cdnsp_get_hw_deq function
        usb: dwc3: core: Prevent USB core invalid event buffer address access
        MAINTAINERS: Mark UVC gadget driver as orphan
      e8784b0a