Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package opensbi for openSUSE:Factory checked in at 2024-08-02 17:27:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/opensbi (Old) and /work/SRC/openSUSE:Factory/.opensbi.new.7232 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "opensbi" Fri Aug 2 17:27:22 2024 rev:14 rq:1191137 version:1.5.1 Changes: -------- --- /work/SRC/openSUSE:Factory/opensbi/opensbi.changes 2024-07-01 11:21:57.362526503 +0200 +++ /work/SRC/openSUSE:Factory/.opensbi.new.7232/opensbi.changes 2024-08-02 17:28:04.567132547 +0200 @@ -1,0 +2,10 @@ +Fri Aug 2 08:19:15 UTC 2024 - Andreas Schwab <schwab@suse.de> + +- Update to opensbi 1.5.1 + * Save/restore menvcfg only when it exists + * Adjust Sscofpmf mhpmevent mask for upper 8 bits + * Fix potential NULL pointer dereferences in SBI DBTR + * Fix incorrect size passed to sbi_zalloc() in SBI FWFT + * Check result of pmp_get() in is_pmp_entry_mapped() + +------------------------------------------------------------------- Old: ---- opensbi-1.5.tar.gz New: ---- opensbi-1.5.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ opensbi.spec ++++++ --- /var/tmp/diff_new_pack.19eJ62/_old 2024-08-02 17:28:04.967149046 +0200 +++ /var/tmp/diff_new_pack.19eJ62/_new 2024-08-02 17:28:04.967149046 +0200 @@ -23,7 +23,7 @@ %else Name: opensbi-%{target} %endif -Version: 1.5 +Version: 1.5.1 Release: 0 Summary: RISC-V Open Source Supervisor Binary Interface License: BSD-2-Clause ++++++ opensbi-1.5.tar.gz -> opensbi-1.5.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opensbi-1.5/include/sbi/riscv_encoding.h new/opensbi-1.5.1/include/sbi/riscv_encoding.h --- old/opensbi-1.5/include/sbi/riscv_encoding.h 2024-06-30 10:33:26.000000000 +0200 +++ new/opensbi-1.5.1/include/sbi/riscv_encoding.h 2024-08-02 05:23:22.000000000 +0200 @@ -207,7 +207,7 @@ #endif -#define MHPMEVENT_SSCOF_MASK _ULL(0xFFFF000000000000) +#define MHPMEVENT_SSCOF_MASK _ULL(0xFF00000000000000) #define ENVCFG_STCE (_ULL(1) << 63) #define ENVCFG_PBMTE (_ULL(1) << 62) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opensbi-1.5/lib/sbi/riscv_asm.c new/opensbi-1.5.1/lib/sbi/riscv_asm.c --- old/opensbi-1.5/lib/sbi/riscv_asm.c 2024-06-30 10:33:26.000000000 +0200 +++ new/opensbi-1.5.1/lib/sbi/riscv_asm.c 2024-08-02 05:23:22.000000000 +0200 @@ -291,7 +291,8 @@ unsigned long addr; unsigned long log2len; - pmp_get(entry, &prot, &addr, &log2len); + if (pmp_get(entry, &prot, &addr, &log2len) != 0) + return false; /* If address matching bits are non-zero, the entry is enable */ if (prot & PMP_A) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opensbi-1.5/lib/sbi/sbi_dbtr.c new/opensbi-1.5.1/lib/sbi/sbi_dbtr.c --- old/opensbi-1.5/lib/sbi/sbi_dbtr.c 2024-06-30 10:33:26.000000000 +0200 +++ new/opensbi-1.5.1/lib/sbi/sbi_dbtr.c 2024-08-02 05:23:22.000000000 +0200 @@ -357,7 +357,7 @@ unsigned long state; unsigned long tdata1; - if (!trig && !(trig->state & RV_DBTR_BIT_MASK(TS, MAPPED))) + if (!trig || !(trig->state & RV_DBTR_BIT_MASK(TS, MAPPED))) return; state = trig->state; @@ -403,7 +403,7 @@ { unsigned long tdata1; - if (!trig && !(trig->state & RV_DBTR_BIT_MASK(TS, MAPPED))) + if (!trig || !(trig->state & RV_DBTR_BIT_MASK(TS, MAPPED))) return; tdata1 = trig->tdata1; @@ -429,7 +429,7 @@ static void dbtr_trigger_clear(struct sbi_dbtr_trigger *trig) { - if (!trig && !(trig->state & RV_DBTR_BIT_MASK(TS, MAPPED))) + if (!trig || !(trig->state & RV_DBTR_BIT_MASK(TS, MAPPED))) return; csr_write(CSR_TSELECT, trig->index); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opensbi-1.5/lib/sbi/sbi_fwft.c new/opensbi-1.5.1/lib/sbi/sbi_fwft.c --- old/opensbi-1.5/lib/sbi/sbi_fwft.c 2024-06-30 10:33:26.000000000 +0200 +++ new/opensbi-1.5.1/lib/sbi/sbi_fwft.c 2024-08-02 05:23:22.000000000 +0200 @@ -251,7 +251,7 @@ fhs = fwft_get_hart_state_ptr(scratch); if (!fhs) { - fhs = sbi_zalloc(sizeof(fhs) + array_size(features) * sizeof(struct fwft_config)); + fhs = sbi_zalloc(sizeof(*fhs) + array_size(features) * sizeof(struct fwft_config)); if (!fhs) return SBI_ENOMEM; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opensbi-1.5/lib/sbi/sbi_hsm.c new/opensbi-1.5.1/lib/sbi/sbi_hsm.c --- old/opensbi-1.5/lib/sbi/sbi_hsm.c 2024-06-30 10:33:26.000000000 +0200 +++ new/opensbi-1.5.1/lib/sbi/sbi_hsm.c 2024-08-02 05:23:22.000000000 +0200 @@ -423,10 +423,12 @@ hdata->saved_mie = csr_read(CSR_MIE); hdata->saved_mip = csr_read(CSR_MIP) & (MIP_SSIP | MIP_STIP); hdata->saved_medeleg = csr_read(CSR_MEDELEG); + if (sbi_hart_priv_version(scratch) >= SBI_HART_PRIV_VER_1_12) { #if __riscv_xlen == 32 - hdata->saved_menvcfgh = csr_read(CSR_MENVCFGH); + hdata->saved_menvcfgh = csr_read(CSR_MENVCFGH); #endif - hdata->saved_menvcfg = csr_read(CSR_MENVCFG); + hdata->saved_menvcfg = csr_read(CSR_MENVCFG); + } } static void __sbi_hsm_suspend_non_ret_restore(struct sbi_scratch *scratch) @@ -434,10 +436,12 @@ struct sbi_hsm_data *hdata = sbi_scratch_offset_ptr(scratch, hart_data_offset); - csr_write(CSR_MENVCFG, hdata->saved_menvcfg); + if (sbi_hart_priv_version(scratch) >= SBI_HART_PRIV_VER_1_12) { + csr_write(CSR_MENVCFG, hdata->saved_menvcfg); #if __riscv_xlen == 32 - csr_write(CSR_MENVCFGH, hdata->saved_menvcfgh); + csr_write(CSR_MENVCFGH, hdata->saved_menvcfgh); #endif + } csr_write(CSR_MEDELEG, hdata->saved_medeleg); csr_write(CSR_MIE, hdata->saved_mie); csr_set(CSR_MIP, (hdata->saved_mip & (MIP_SSIP | MIP_STIP)));