1. Aug 24, 2023
  2. Jun 24, 2023
  3. Jun 23, 2023
  4. Jun 21, 2023
  5. Jun 15, 2023
  6. Jun 14, 2023
  7. Jun 06, 2023
  8. Jun 05, 2023
  9. Jun 04, 2023
    • Andrew Jones's avatar
      lib: sbi: Align system suspend errors with spec · bdde2ecd
      Andrew Jones authored
      
      
      The spec says sbi_system_suspend() will return SBI_ERR_INVALID_PARAM
      when "sleep_type is reserved or is platform-specific and unimplemented"
      and SBI_ERR_NOT_SUPPORTED when sleep_type "is not reserved and is
      implemented, but the platform does not support it due to one or more
      missing dependencies." Ensure SBI_ERR_INVALID_PARAM is returned for
      reserved sleep types and that the system suspend driver can choose
      which of the two error types to return itself by returning an error
      from its check function rather than a boolean.
      
      Signed-off-by: default avatarAndrew Jones <ajones@ventanamicro.com>
      Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
      bdde2ecd
    • Heinrich Schuchardt's avatar
      lib: utils/ipi: buffer overrun aclint_mswi_cold_init · df75e099
      Heinrich Schuchardt authored
      The parameter checks in aclint_mswi_cold_init() don't guard against a
      buffer overrun.
      
      mswi_hartid2data is defined as an array of SBI_HARTMASK_MAX_BITS entries.
      The current check allows
      
          mswi->hart_count = ACLINT_MSWI_MAX_HARTS
          mswi->first_hartid = SBI_HARTMASK_MAX_BITS - 1.
      
      With these values mswi_hartid2data will be accessed at index
      
          SBI_HARTMASK_MAX_BITS + SBI_HARTMASK_MAX_BITS - 2.
      
      We have to check the sum of mswi->first_hartid and mswi->hart_count.
      
      Furthermore mswi->hart_count = 0 would not make much sense.
      
      Addresses-Coverity-ID: 1529705 ("Out-of-bounds write")
      Fixes: 5a049fe1
      
       ("lib: utils/ipi: Add ACLINT MSWI library")
      Signed-off-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
      Reviewed-by: default avatarXiang W <wxjstz@126.com>
      Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
      df75e099
  10. May 26, 2023
  11. May 23, 2023
  12. May 22, 2023
    • Filip Filmar's avatar
      Makefile: Dereference symlinks on install · d4c46e0f
      Filip Filmar authored
      
      
      Adds the `-L` flag (follow symlinks) to the `cp` commands used to
      install `libsbi.a` and `include/sbi/*`.
      
      This should make no difference in regular compilation. However,
      it does make a difference when compiling with bazel.  Namely,
      bazel's sandboxing will turn all the source files into symlinks.
      After installation with `cp` the destination files will be
      symlinks pointing to the sandbox symlinks. As the sandbox files
      are removed when compilation ends, the just-copied symlinks
      become dangling symlinks.
      
      The resulting include files will be
      unusable due to the dangling symlink issues. Adding `-L` when
      copying ensures that the files obtained by executing the `install`
      targets are always dereferenced to files, rather than symlinks,
      eliminating this issue.
      
      Signed-off-by: default avatarFilip Filmar <fmil@google.com>
      Reviewed-by: default avatarXiang W <wxjstz@126.com>
      Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
      d4c46e0f
  13. May 21, 2023