2022-11-02 03:40:43

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 5.10 00/91] 5.10.153-rc1 review

This is the start of the stable review cycle for the 5.10.153 release.
There are 91 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.

Responses should be made by Fri, 04 Nov 2022 02:20:38 +0000.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.153-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <[email protected]>
Linux 5.10.153-rc1

Lukas Wunner <[email protected]>
serial: Deassert Transmit Enable on probe in driver-specific way

Lino Sanfilippo <[email protected]>
serial: core: move RS485 configuration tasks from drivers into core

Biju Das <[email protected]>
can: rcar_canfd: rcar_canfd_handle_global_receive(): fix IRQ storm on global FIFO receive

Anshuman Khandual <[email protected]>
arm64/kexec: Test page size support with new TGRAN range values

James Morse <[email protected]>
arm64/mm: Fix __enable_mmu() for new TGRAN range values

Yu Kuai <[email protected]>
scsi: sd: Revert "scsi: sd: Remove a local variable"

D Scott Phillips <[email protected]>
arm64: Add AMPERE1 to the Spectre-BHB affected list

Vladimir Oltean <[email protected]>
net: enetc: survive memory pressure without crashing

Suresh Devarakonda <[email protected]>
net/mlx5: Fix crash during sync firmware reset

Tariq Toukan <[email protected]>
net/mlx5: Fix possible use-after-free in async command interface

Hyong Youb Kim <[email protected]>
net/mlx5e: Do not increment ESN when updating IPsec ESN state

Nicolas Dichtel <[email protected]>
nh: fix scope used to find saddr when adding non gw nh

Yang Yingliang <[email protected]>
net: ehea: fix possible memory leak in ehea_register_port()

Aaron Conole <[email protected]>
openvswitch: switch from WARN to pr_warn

Takashi Iwai <[email protected]>
ALSA: aoa: Fix I2S device accounting

Yang Yingliang <[email protected]>
ALSA: aoa: i2sbus: fix possible memory leak in i2sbus_add_dev()

Juergen Borleis <[email protected]>
net: fec: limit register access on i.MX6UL

Sudeep Holla <[email protected]>
PM: domains: Fix handling of unavailable/disabled idle states

Yang Yingliang <[email protected]>
net: ksz884x: fix missing pci_disable_device() on error in pcidev_init()

Slawomir Laba <[email protected]>
i40e: Fix flow-type by setting GL_HASH_INSET registers

Sylwester Dziedziuch <[email protected]>
i40e: Fix VF hang when reset is triggered on another VF

Slawomir Laba <[email protected]>
i40e: Fix ethtool rx-flow-hash setting for X722

Eric Dumazet <[email protected]>
ipv6: ensure sane device mtu in tunnels

Hans Verkuil <[email protected]>
media: vivid: set num_in/outputs to 0 if not supported

Hans Verkuil <[email protected]>
media: videodev2.h: V4L2_DV_BT_BLANKING_HEIGHT should check 'interlaced'

Hans Verkuil <[email protected]>
media: v4l2-dv-timings: add sanity checks for blanking values

Hans Verkuil <[email protected]>
media: vivid: dev->bitmap_cap wasn't freed in all cases

Hans Verkuil <[email protected]>
media: vivid: s_fbuf: add more sanity checks

Mario Limonciello <[email protected]>
PM: hibernate: Allow hybrid sleep to work with s2idle

Dongliang Mu <[email protected]>
can: mcp251x: mcp251x_can_probe(): add missing unregister_candev() in error path

Dongliang Mu <[email protected]>
can: mscan: mpc5xxx: mpc5xxx_can_probe(): add missing put_clock() in error path

Neal Cardwell <[email protected]>
tcp: fix indefinite deferral of RTO with SACK reneging

Lu Wei <[email protected]>
tcp: fix a signed-integer-overflow bug in tcp_add_backlog()

Eric Dumazet <[email protected]>
tcp: minor optimization in tcp_add_backlog()

Zhang Changzhong <[email protected]>
net: lantiq_etop: don't free skb when returning NETDEV_TX_BUSY

Zhengchao Shao <[email protected]>
net: fix UAF issue in nfqnl_nf_hook_drop() when ops_init() failed

Eric Dumazet <[email protected]>
kcm: annotate data-races around kcm->rx_wait

Eric Dumazet <[email protected]>
kcm: annotate data-races around kcm->rx_psock

Íñigo Huguet <[email protected]>
atlantic: fix deadlock at aq_nic_stop

Raju Rangoju <[email protected]>
amd-xgbe: add the bit rate quirk for Molex cables

Raju Rangoju <[email protected]>
amd-xgbe: fix the SFP compliance codes check for DAC cables

Chen Zhongjin <[email protected]>
x86/unwind/orc: Fix unreliable stack dump with gcov

Zhengchao Shao <[email protected]>
net: hinic: fix the issue of double release MBOX callback of VF

Zhengchao Shao <[email protected]>
net: hinic: fix the issue of CMDQ memory leaks

Zhengchao Shao <[email protected]>
net: hinic: fix memory leak when reading function table

Zhengchao Shao <[email protected]>
net: hinic: fix incorrect assignment issue in hinic_set_interrupt_cfg()

Yang Yingliang <[email protected]>
net: netsec: fix error handling in netsec_register_mdio()

Xin Long <[email protected]>
tipc: fix a null-ptr-deref in tipc_topsrv_accept

Maxim Levitsky <[email protected]>
perf/x86/intel/lbr: Use setup_clear_cpu_cap() instead of clear_cpu_cap()

Yang Yingliang <[email protected]>
ALSA: ac97: fix possible memory leak in snd_ac97_dev_register()

Srinivasa Rao Mandadapu <[email protected]>
ASoC: qcom: lpass-cpu: Mark HDMI TX parity register as volatile

Randy Dunlap <[email protected]>
arc: iounmap() arg is volatile

Srinivasa Rao Mandadapu <[email protected]>
ASoC: qcom: lpass-cpu: mark HDMI TX registers as volatile

Nathan Huckleberry <[email protected]>
drm/msm: Fix return type of mdp4_lvds_connector_mode_valid

Alexander Stein <[email protected]>
media: v4l2: Fix v4l2_i2c_subdev_set_name function documentation

Wei Yongjun <[email protected]>
net: ieee802154: fix error return code in dgram_bind()

Rik van Riel <[email protected]>
mm,hugetlb: take hugetlb_lock before decrementing h->resv_huge_pages

Yuanzheng Song <[email protected]>
mm/memory: add non-anonymous page check in the copy_present_page()

M. Vefa Bicakci <[email protected]>
xen/gntdev: Prevent leaking grants

Jan Beulich <[email protected]>
Xen/gntdev: don't ignore kernel unmapping error

Heiko Carstens <[email protected]>
s390/pci: add missing EX_TABLE entries to __pcistg_mio_inuser()/__pcilg_mio_inuser()

Heiko Carstens <[email protected]>
s390/futex: add missing EX_TABLE entry to __futex_atomic_op()

Adrian Hunter <[email protected]>
perf auxtrace: Fix address filter symbol name match for modules

Christian A. Ehrhardt <[email protected]>
kernfs: fix use-after-free in __kernfs_remove

William Breathitt Gray <[email protected]>
counter: microchip-tcb-capture: Handle Signal1 read and Synapse

Matthew Ma <[email protected]>
mmc: core: Fix kernel panic when remove non-standard SDIO card

Brian Norris <[email protected]>
mmc: sdhci_am654: 'select', not 'depends' REGMAP_MMIO

Johan Hovold <[email protected]>
drm/msm/dp: fix IRQ lifetime

Johan Hovold <[email protected]>
drm/msm/hdmi: fix memory corruption with too many bridges

Johan Hovold <[email protected]>
drm/msm/dsi: fix memory corruption with too many bridges

Manish Rangankar <[email protected]>
scsi: qla2xxx: Use transport-defined speed mask for supported_speeds

Miquel Raynal <[email protected]>
mac802154: Fix LQI recording

Bernd Edlinger <[email protected]>
exec: Copy oldsighand->action under spin-lock

Li Zetao <[email protected]>
fs/binfmt_elf: Fix memory leak in load_elf_binary()

Hyunwoo Kim <[email protected]>
fbdev: smscufx: Fix several use-after-free bugs

Cosmin Tanislav <[email protected]>
iio: temperature: ltc2983: allocate iio channels once

Shreeya Patel <[email protected]>
iio: light: tsl2583: Fix module unloading

Matti Vaittinen <[email protected]>
tools: iio: iio_utils: fix digit calculation

Mathias Nyman <[email protected]>
xhci: Remove device endpoints from bandwidth list when freeing the device

Mathias Nyman <[email protected]>
xhci: Add quirk to reset host back to default state at shutdown

Tony O'Brien <[email protected]>
mtd: rawnand: marvell: Use correct logic for nand-keep-config

Jens Glathe <[email protected]>
usb: xhci: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller

Justin Chen <[email protected]>
usb: bdc: change state when port disconnected

Thinh Nguyen <[email protected]>
usb: dwc3: gadget: Don't set IMI for no_interrupt

Thinh Nguyen <[email protected]>
usb: dwc3: gadget: Stop processing more requests on IMI

Hannu Hartikainen <[email protected]>
USB: add RESET_RESUME quirk for NVIDIA Jetson devices in RCM

Jason A. Donenfeld <[email protected]>
ALSA: rme9652: use explicitly signed char

Jason A. Donenfeld <[email protected]>
ALSA: au88x0: use explicitly signed char

Steven Rostedt (Google) <[email protected]>
ALSA: Use del_timer_sync() before freeing timer

Anssi Hannula <[email protected]>
can: kvaser_usb: Fix possible completions during init_completion

Yang Yingliang <[email protected]>
can: j1939: transport: j1939_session_skb_drop_old(): spin_unlock_irqrestore() before kfree_skb()


-------------

Diffstat:

Makefile | 4 +-
arch/arc/include/asm/io.h | 2 +-
arch/arc/mm/ioremap.c | 2 +-
arch/arm64/include/asm/cpufeature.h | 9 +-
arch/arm64/include/asm/cputype.h | 4 +
arch/arm64/include/asm/sysreg.h | 36 +++++---
arch/arm64/kernel/head.S | 6 +-
arch/arm64/kernel/proton-pack.c | 6 ++
arch/arm64/kvm/reset.c | 10 ++-
arch/s390/include/asm/futex.h | 3 +-
arch/s390/pci/pci_mmio.c | 8 +-
arch/x86/events/intel/lbr.c | 2 +-
arch/x86/kernel/unwind_orc.c | 2 +-
drivers/base/power/domain.c | 4 +
drivers/counter/microchip-tcb-capture.c | 18 +++-
drivers/firmware/efi/libstub/arm64-stub.c | 2 +-
.../gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c | 5 +-
drivers/gpu/drm/msm/dp/dp_display.c | 2 +-
drivers/gpu/drm/msm/dsi/dsi.c | 6 ++
drivers/gpu/drm/msm/hdmi/hdmi.c | 5 ++
drivers/iio/light/tsl2583.c | 2 +-
drivers/iio/temperature/ltc2983.c | 13 ++-
drivers/media/test-drivers/vivid/vivid-core.c | 38 +++++++-
drivers/media/test-drivers/vivid/vivid-core.h | 2 +
drivers/media/test-drivers/vivid/vivid-vid-cap.c | 27 ++++--
drivers/media/v4l2-core/v4l2-dv-timings.c | 14 +++
drivers/mmc/core/sdio_bus.c | 3 +-
drivers/mmc/host/Kconfig | 3 +-
drivers/mtd/nand/raw/marvell_nand.c | 2 +-
drivers/net/can/mscan/mpc5xxx_can.c | 8 +-
drivers/net/can/rcar/rcar_canfd.c | 6 +-
drivers/net/can/spi/mcp251x.c | 5 +-
drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 4 +-
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 4 +-
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 17 ++--
drivers/net/ethernet/aquantia/atlantic/aq_macsec.c | 96 +++++++++++++++-----
drivers/net/ethernet/aquantia/atlantic/aq_nic.h | 2 +
drivers/net/ethernet/freescale/enetc/enetc.c | 5 ++
drivers/net/ethernet/freescale/fec_main.c | 46 +++++++++-
drivers/net/ethernet/huawei/hinic/hinic_debugfs.c | 18 ++--
drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 2 +-
drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 2 +-
drivers/net/ethernet/huawei/hinic/hinic_sriov.c | 1 -
drivers/net/ethernet/ibm/ehea/ehea_main.c | 1 +
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 100 ++++++++++++---------
drivers/net/ethernet/intel/i40e/i40e_type.h | 4 +
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 43 ++++++---
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 1 +
drivers/net/ethernet/lantiq_etop.c | 1 -
drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 10 +--
.../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 3 -
drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.c | 6 +-
drivers/net/ethernet/micrel/ksz884x.c | 2 +-
drivers/net/ethernet/socionext/netsec.c | 2 +
drivers/scsi/qla2xxx/qla_attr.c | 28 +++++-
drivers/scsi/sd.c | 3 +-
drivers/tty/serial/8250/8250_omap.c | 3 +
drivers/tty/serial/8250/8250_pci.c | 9 +-
drivers/tty/serial/8250/8250_port.c | 12 +--
drivers/tty/serial/fsl_lpuart.c | 8 +-
drivers/tty/serial/imx.c | 8 +-
drivers/tty/serial/serial_core.c | 61 ++++++++++---
drivers/usb/core/quirks.c | 9 ++
drivers/usb/dwc3/gadget.c | 8 +-
drivers/usb/gadget/udc/bdc/bdc_udc.c | 1 +
drivers/usb/host/xhci-mem.c | 20 +++--
drivers/usb/host/xhci-pci.c | 12 ++-
drivers/usb/host/xhci.c | 10 ++-
drivers/usb/host/xhci.h | 1 +
drivers/video/fbdev/smscufx.c | 55 ++++++------
drivers/xen/gntdev.c | 30 +++++--
fs/binfmt_elf.c | 3 +-
fs/exec.c | 4 +-
fs/kernfs/dir.c | 5 +-
include/linux/mlx5/driver.h | 2 +-
include/media/v4l2-common.h | 3 +-
include/uapi/linux/videodev2.h | 3 +-
kernel/power/hibernate.c | 2 +-
mm/hugetlb.c | 2 +-
mm/memory.c | 11 +++
net/can/j1939/transport.c | 4 +-
net/core/net_namespace.c | 7 ++
net/ieee802154/socket.c | 4 +-
net/ipv4/nexthop.c | 2 +-
net/ipv4/tcp_input.c | 3 +-
net/ipv4/tcp_ipv4.c | 7 +-
net/ipv6/ip6_gre.c | 12 +--
net/ipv6/ip6_tunnel.c | 11 +--
net/ipv6/sit.c | 8 +-
net/kcm/kcmsock.c | 23 +++--
net/mac802154/rx.c | 5 +-
net/openvswitch/datapath.c | 3 +-
net/tipc/topsrv.c | 16 +++-
sound/aoa/soundbus/i2sbus/core.c | 7 +-
sound/pci/ac97/ac97_codec.c | 1 +
sound/pci/au88x0/au88x0.h | 6 +-
sound/pci/au88x0/au88x0_core.c | 2 +-
sound/pci/rme9652/hdsp.c | 26 +++---
sound/pci/rme9652/rme9652.c | 22 ++---
sound/soc/qcom/lpass-cpu.c | 10 +++
sound/synth/emux/emux.c | 7 +-
tools/iio/iio_utils.c | 4 +
tools/perf/util/auxtrace.c | 10 ++-
103 files changed, 805 insertions(+), 337 deletions(-)




2022-11-02 03:42:49

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 5.10 87/91] arm64/mm: Fix __enable_mmu() for new TGRAN range values

From: James Morse <[email protected]>

commit 26f55386f964cefa92ab7ccbed68f1a313074215 upstream.

As per ARM ARM DDI 0487G.a, when FEAT_LPA2 is implemented, ID_AA64MMFR0_EL1
might contain a range of values to describe supported translation granules
(4K and 16K pages sizes in particular) instead of just enabled or disabled
values. This changes __enable_mmu() function to handle complete acceptable
range of values (depending on whether the field is signed or unsigned) now
represented with ID_AA64MMFR0_TGRAN_SUPPORTED_[MIN..MAX] pair. While here,
also fix similar situations in EFI stub and KVM as well.

Cc: Catalin Marinas <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Marc Zyngier <[email protected]>
Cc: James Morse <[email protected]>
Cc: Suzuki K Poulose <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Acked-by: Marc Zyngier <[email protected]>
Signed-off-by: James Morse <[email protected]>
Signed-off-by: Anshuman Khandual <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
Signed-off-by: Zenghui Yu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
arch/arm64/include/asm/sysreg.h | 20 ++++++++++++++------
arch/arm64/kernel/head.S | 6 ++++--
arch/arm64/kvm/reset.c | 10 ++++++----
drivers/firmware/efi/libstub/arm64-stub.c | 2 +-
4 files changed, 25 insertions(+), 13 deletions(-)

--- a/arch/arm64/include/asm/sysreg.h
+++ b/arch/arm64/include/asm/sysreg.h
@@ -795,6 +795,11 @@
#define ID_AA64MMFR0_PARANGE_48 0x5
#define ID_AA64MMFR0_PARANGE_52 0x6

+#define ID_AA64MMFR0_TGRAN_2_SUPPORTED_DEFAULT 0x0
+#define ID_AA64MMFR0_TGRAN_2_SUPPORTED_NONE 0x1
+#define ID_AA64MMFR0_TGRAN_2_SUPPORTED_MIN 0x2
+#define ID_AA64MMFR0_TGRAN_2_SUPPORTED_MAX 0x7
+
#ifdef CONFIG_ARM64_PA_BITS_52
#define ID_AA64MMFR0_PARANGE_MAX ID_AA64MMFR0_PARANGE_52
#else
@@ -955,14 +960,17 @@
#define ID_PFR1_PROGMOD_SHIFT 0

#if defined(CONFIG_ARM64_4K_PAGES)
-#define ID_AA64MMFR0_TGRAN_SHIFT ID_AA64MMFR0_TGRAN4_SHIFT
-#define ID_AA64MMFR0_TGRAN_SUPPORTED ID_AA64MMFR0_TGRAN4_SUPPORTED
+#define ID_AA64MMFR0_TGRAN_SHIFT ID_AA64MMFR0_TGRAN4_SHIFT
+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MIN ID_AA64MMFR0_TGRAN4_SUPPORTED
+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MAX 0x7
#elif defined(CONFIG_ARM64_16K_PAGES)
-#define ID_AA64MMFR0_TGRAN_SHIFT ID_AA64MMFR0_TGRAN16_SHIFT
-#define ID_AA64MMFR0_TGRAN_SUPPORTED ID_AA64MMFR0_TGRAN16_SUPPORTED
+#define ID_AA64MMFR0_TGRAN_SHIFT ID_AA64MMFR0_TGRAN16_SHIFT
+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MIN ID_AA64MMFR0_TGRAN16_SUPPORTED
+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MAX 0xF
#elif defined(CONFIG_ARM64_64K_PAGES)
-#define ID_AA64MMFR0_TGRAN_SHIFT ID_AA64MMFR0_TGRAN64_SHIFT
-#define ID_AA64MMFR0_TGRAN_SUPPORTED ID_AA64MMFR0_TGRAN64_SUPPORTED
+#define ID_AA64MMFR0_TGRAN_SHIFT ID_AA64MMFR0_TGRAN64_SHIFT
+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MIN ID_AA64MMFR0_TGRAN64_SUPPORTED
+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MAX 0x7
#endif

#define MVFR2_FPMISC_SHIFT 4
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -797,8 +797,10 @@ SYM_FUNC_END(__secondary_too_slow)
SYM_FUNC_START(__enable_mmu)
mrs x2, ID_AA64MMFR0_EL1
ubfx x2, x2, #ID_AA64MMFR0_TGRAN_SHIFT, 4
- cmp x2, #ID_AA64MMFR0_TGRAN_SUPPORTED
- b.ne __no_granule_support
+ cmp x2, #ID_AA64MMFR0_TGRAN_SUPPORTED_MIN
+ b.lt __no_granule_support
+ cmp x2, #ID_AA64MMFR0_TGRAN_SUPPORTED_MAX
+ b.gt __no_granule_support
update_early_cpu_boot_status 0, x2, x3
adrp x2, idmap_pg_dir
phys_to_ttbr x1, x1
--- a/arch/arm64/kvm/reset.c
+++ b/arch/arm64/kvm/reset.c
@@ -397,16 +397,18 @@ int kvm_set_ipa_limit(void)
}

switch (cpuid_feature_extract_unsigned_field(mmfr0, tgran_2)) {
- default:
- case 1:
+ case ID_AA64MMFR0_TGRAN_2_SUPPORTED_NONE:
kvm_err("PAGE_SIZE not supported at Stage-2, giving up\n");
return -EINVAL;
- case 0:
+ case ID_AA64MMFR0_TGRAN_2_SUPPORTED_DEFAULT:
kvm_debug("PAGE_SIZE supported at Stage-2 (default)\n");
break;
- case 2:
+ case ID_AA64MMFR0_TGRAN_2_SUPPORTED_MIN ... ID_AA64MMFR0_TGRAN_2_SUPPORTED_MAX:
kvm_debug("PAGE_SIZE supported at Stage-2 (advertised)\n");
break;
+ default:
+ kvm_err("Unsupported value for TGRAN_2, giving up\n");
+ return -EINVAL;
}

kvm_ipa_limit = id_aa64mmfr0_parange_to_phys_shift(parange);
--- a/drivers/firmware/efi/libstub/arm64-stub.c
+++ b/drivers/firmware/efi/libstub/arm64-stub.c
@@ -24,7 +24,7 @@ efi_status_t check_platform_features(voi
return EFI_SUCCESS;

tg = (read_cpuid(ID_AA64MMFR0_EL1) >> ID_AA64MMFR0_TGRAN_SHIFT) & 0xf;
- if (tg != ID_AA64MMFR0_TGRAN_SUPPORTED) {
+ if (tg < ID_AA64MMFR0_TGRAN_SUPPORTED_MIN || tg > ID_AA64MMFR0_TGRAN_SUPPORTED_MAX) {
if (IS_ENABLED(CONFIG_ARM64_64K_PAGES))
efi_err("This 64 KB granular kernel is not supported by your CPU\n");
else



2022-11-02 03:50:57

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 5.10 88/91] arm64/kexec: Test page size support with new TGRAN range values

From: Anshuman Khandual <[email protected]>

commit 79d82cbcbb3d2a56c009ad6a6df92c5dee061dad upstream.

The commit 26f55386f964 ("arm64/mm: Fix __enable_mmu() for new TGRAN range
values") had already switched into testing ID_AA64MMFR0_TGRAN range values.
This just changes system_supports_[4|16|64]kb_granule() helpers to perform
similar range tests as well. While here, it standardizes page size specific
supported min and max TGRAN values.

Cc: Will Deacon <[email protected]>
Cc: James Morse <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Anshuman Khandual <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Catalin Marinas <[email protected]>
Signed-off-by: Zenghui Yu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
arch/arm64/include/asm/cpufeature.h | 9 ++++++---
arch/arm64/include/asm/sysreg.h | 28 ++++++++++++++++------------
2 files changed, 22 insertions(+), 15 deletions(-)

--- a/arch/arm64/include/asm/cpufeature.h
+++ b/arch/arm64/include/asm/cpufeature.h
@@ -648,7 +648,8 @@ static inline bool system_supports_4kb_g
val = cpuid_feature_extract_unsigned_field(mmfr0,
ID_AA64MMFR0_TGRAN4_SHIFT);

- return val == ID_AA64MMFR0_TGRAN4_SUPPORTED;
+ return (val >= ID_AA64MMFR0_TGRAN4_SUPPORTED_MIN) &&
+ (val <= ID_AA64MMFR0_TGRAN4_SUPPORTED_MAX);
}

static inline bool system_supports_64kb_granule(void)
@@ -660,7 +661,8 @@ static inline bool system_supports_64kb_
val = cpuid_feature_extract_unsigned_field(mmfr0,
ID_AA64MMFR0_TGRAN64_SHIFT);

- return val == ID_AA64MMFR0_TGRAN64_SUPPORTED;
+ return (val >= ID_AA64MMFR0_TGRAN64_SUPPORTED_MIN) &&
+ (val <= ID_AA64MMFR0_TGRAN64_SUPPORTED_MAX);
}

static inline bool system_supports_16kb_granule(void)
@@ -672,7 +674,8 @@ static inline bool system_supports_16kb_
val = cpuid_feature_extract_unsigned_field(mmfr0,
ID_AA64MMFR0_TGRAN16_SHIFT);

- return val == ID_AA64MMFR0_TGRAN16_SUPPORTED;
+ return (val >= ID_AA64MMFR0_TGRAN16_SUPPORTED_MIN) &&
+ (val <= ID_AA64MMFR0_TGRAN16_SUPPORTED_MAX);
}

static inline bool system_supports_mixed_endian_el0(void)
--- a/arch/arm64/include/asm/sysreg.h
+++ b/arch/arm64/include/asm/sysreg.h
@@ -786,12 +786,16 @@
#define ID_AA64MMFR0_ASID_SHIFT 4
#define ID_AA64MMFR0_PARANGE_SHIFT 0

-#define ID_AA64MMFR0_TGRAN4_NI 0xf
-#define ID_AA64MMFR0_TGRAN4_SUPPORTED 0x0
-#define ID_AA64MMFR0_TGRAN64_NI 0xf
-#define ID_AA64MMFR0_TGRAN64_SUPPORTED 0x0
-#define ID_AA64MMFR0_TGRAN16_NI 0x0
-#define ID_AA64MMFR0_TGRAN16_SUPPORTED 0x1
+#define ID_AA64MMFR0_TGRAN4_NI 0xf
+#define ID_AA64MMFR0_TGRAN4_SUPPORTED_MIN 0x0
+#define ID_AA64MMFR0_TGRAN4_SUPPORTED_MAX 0x7
+#define ID_AA64MMFR0_TGRAN64_NI 0xf
+#define ID_AA64MMFR0_TGRAN64_SUPPORTED_MIN 0x0
+#define ID_AA64MMFR0_TGRAN64_SUPPORTED_MAX 0x7
+#define ID_AA64MMFR0_TGRAN16_NI 0x0
+#define ID_AA64MMFR0_TGRAN16_SUPPORTED_MIN 0x1
+#define ID_AA64MMFR0_TGRAN16_SUPPORTED_MAX 0xf
+
#define ID_AA64MMFR0_PARANGE_48 0x5
#define ID_AA64MMFR0_PARANGE_52 0x6

@@ -961,16 +965,16 @@

#if defined(CONFIG_ARM64_4K_PAGES)
#define ID_AA64MMFR0_TGRAN_SHIFT ID_AA64MMFR0_TGRAN4_SHIFT
-#define ID_AA64MMFR0_TGRAN_SUPPORTED_MIN ID_AA64MMFR0_TGRAN4_SUPPORTED
-#define ID_AA64MMFR0_TGRAN_SUPPORTED_MAX 0x7
+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MIN ID_AA64MMFR0_TGRAN4_SUPPORTED_MIN
+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MAX ID_AA64MMFR0_TGRAN4_SUPPORTED_MAX
#elif defined(CONFIG_ARM64_16K_PAGES)
#define ID_AA64MMFR0_TGRAN_SHIFT ID_AA64MMFR0_TGRAN16_SHIFT
-#define ID_AA64MMFR0_TGRAN_SUPPORTED_MIN ID_AA64MMFR0_TGRAN16_SUPPORTED
-#define ID_AA64MMFR0_TGRAN_SUPPORTED_MAX 0xF
+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MIN ID_AA64MMFR0_TGRAN16_SUPPORTED_MIN
+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MAX ID_AA64MMFR0_TGRAN16_SUPPORTED_MAX
#elif defined(CONFIG_ARM64_64K_PAGES)
#define ID_AA64MMFR0_TGRAN_SHIFT ID_AA64MMFR0_TGRAN64_SHIFT
-#define ID_AA64MMFR0_TGRAN_SUPPORTED_MIN ID_AA64MMFR0_TGRAN64_SUPPORTED
-#define ID_AA64MMFR0_TGRAN_SUPPORTED_MAX 0x7
+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MIN ID_AA64MMFR0_TGRAN64_SUPPORTED_MIN
+#define ID_AA64MMFR0_TGRAN_SUPPORTED_MAX ID_AA64MMFR0_TGRAN64_SUPPORTED_MAX
#endif

#define MVFR2_FPMISC_SHIFT 4



2022-11-02 10:26:20

by Jon Hunter

[permalink] [raw]
Subject: Re: [PATCH 5.10 00/91] 5.10.153-rc1 review

On Wed, 02 Nov 2022 03:32:43 +0100, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.10.153 release.
> There are 91 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Fri, 04 Nov 2022 02:20:38 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.153-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h

All tests passing for Tegra ...

Test results for stable-v5.10:
11 builds: 11 pass, 0 fail
28 boots: 28 pass, 0 fail
75 tests: 75 pass, 0 fail

Linux version: 5.10.153-rc1-g2f6e4754098c
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04

Tested-by: Jon Hunter <[email protected]>

Jon

2022-11-02 11:45:29

by Rudi Heitbaum

[permalink] [raw]
Subject: Re: [PATCH 5.10 00/91] 5.10.153-rc1 review

On Wed, Nov 02, 2022 at 03:32:43AM +0100, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.10.153 release.
> There are 91 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Fri, 04 Nov 2022 02:20:38 +0000.
> Anything received after that time might be too late.

Hi Greg,

5.10.153-rc1 tested.

Run tested on:
- Intel Skylake x86_64 (nuc6 i5-6260U)

In addition - build tested for:
- Allwinner A64
- Allwinner H3
- Allwinner H5
- Allwinner H6
- Rockchip RK3288
- Rockchip RK3328
- Rockchip RK3399pro

Tested-by: Rudi Heitbaum <[email protected]>
--
Rudi

2022-11-02 17:37:26

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH 5.10 00/91] 5.10.153-rc1 review

Hi1

> This is the start of the stable review cycle for the 5.10.153 release.
> There are 91 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.

CIP testing did not find any problems here:

https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-5.10.y

Tested-by: Pavel Machek (CIP) <[email protected]>

Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


Attachments:
(No filename) (661.00 B)
signature.asc (201.00 B)
Download all attachments

2022-11-02 18:09:59

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH 5.10 00/91] 5.10.153-rc1 review

On 11/1/22 19:32, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.10.153 release.
> There are 91 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Fri, 04 Nov 2022 02:20:38 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.153-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h

On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on
BMIPS_GENERIC:

Tested-by: Florian Fainelli <[email protected]>
--
Florian


2022-11-02 21:17:29

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 5.10 00/91] 5.10.153-rc1 review

On Wed, Nov 02, 2022 at 03:32:43AM +0100, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.10.153 release.
> There are 91 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Fri, 04 Nov 2022 02:20:38 +0000.
> Anything received after that time might be too late.
>

Build results:
total: 163 pass: 163 fail: 0
Qemu test results:
total: 475 pass: 475 fail: 0

Tested-by: Guenter Roeck <[email protected]>

Guenter

2022-11-02 22:54:00

by Allen Pais

[permalink] [raw]
Subject: Re: [PATCH 5.10 00/91] 5.10.153-rc1 review

> This is the start of the stable review cycle for the 5.10.153 release.
> There are 91 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Fri, 04 Nov 2022 02:20:38 +0000.
> Anything received after that time might be too late.
>


Compiled and booted on my x86_64 and ARM64 test systems. No errors or
regressions.

Tested-by: Allen Pais <[email protected]>

Thanks.

2022-11-03 07:40:25

by Naresh Kamboju

[permalink] [raw]
Subject: Re: [PATCH 5.10 00/91] 5.10.153-rc1 review

On Wed, 2 Nov 2022 at 08:42, Greg Kroah-Hartman
<[email protected]> wrote:
>
> This is the start of the stable review cycle for the 5.10.153 release.
> There are 91 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Fri, 04 Nov 2022 02:20:38 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.153-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h


Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.

Tested-by: Linux Kernel Functional Testing <[email protected]>

NOTE:
1)
Build failures: Perf on arm64/i386/x86 on 5.4/5.10/5.15, not on arm32.
perf build started to pass on stable-rc 6.0 and mainline and next
master branches.

Build error:
util/annotate.c: In function 'symbol__disassemble_bpf':
util/annotate.c:1739:9: error: too few arguments to function
'init_disassemble_info'
1739 | init_disassemble_info(&info, s,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from util/annotate.c:1692:
/usr/include/dis-asm.h:472:13: note: declared here
472 | extern void init_disassemble_info (struct disassemble_info
*dinfo, void *stream,
| ^~~~~~~~~~~~~~~~~~~~~
make[4]: *** [/ tools/build/Makefile.build:97:
/home/tuxbuild/.cache/tuxmake/builds/1/build/util/annotate.o] Error 1

Build log link,
https://builds.tuxbuild.com/2GyMi25XnyDaaKJ170L0VWShkT9/

2)
Following kernel warning always noticed on x86_64 with list of
kselftest merge configs enabled.

This is not a regression this warning has been occuring from the day
we have enabled
kselfest runs on stable-rc 5.10.

[ 0.256413] RETBleed: Mitigation: untrained return thunk
[ 0.257416] Spectre V2 : mitigation: Enabling conditional Indirect
Branch Prediction Barrier
[ 0.258415] Speculative Store Bypass: Mitigation: Speculative Store
Bypass disabled via prctl and seccomp
[ 0.269751] ------------[ cut here ]------------
[ 0.270425] missing return thunk:
lkdtm_rodata_do_nothing+0x0/0x10-lkdtm_rodata_do_nothing+0x5/0x10: e9
00 00 00 00
[ 0.270447] WARNING: CPU: 0 PID: 0 at
arch/x86/kernel/alternative.c:712 apply_returns+0x1ca/0x1f0
[ 0.272414] Modules linked in:
[ 0.273419] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.153-rc1 #1
[ 0.274416] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
BIOS 1.12.0-1 04/01/2014
[ 0.275417] RIP: 0010:apply_returns+0x1ca/0x1f0
[ 0.276416] Code: 05 02 00 0f 85 0d ff ff ff 4d 89 e0 b9 05 00 00
00 4c 89 fa 4c 89 e6 48 c7 c7 30 f3 e4 ae c6 05 f7 1f 05 02 01 e8 0b
64 08 01 <0f> 0b e9 e5 fe ff ff c7 45 c1 cc cc cc cc c7 44 10 fc cc cc
cc cc
[ 0.277414] RSP: 0000:ffffffffaf203d98 EFLAGS: 00010282
[ 0.278414] RAX: 0000000000000000 RBX: ffffffffaf7941f8 RCX: 0000000000000000
[ 0.279414] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffffad64d062
[ 0.280414] RBP: ffffffffaf203e60 R08: 0000000000000001 R09: 0000000000000001
[ 0.281413] R10: ffffffffaf2998e0 R11: ffffffffaf2998e0 R12: ffffffffaeaf8c60
[ 0.282414] R13: ffffffffaf7b2f18 R14: cccccccccccccccc R15: ffffffffaeaf8c65
[ 0.283416] FS: 0000000000000000(0000) GS:ffff8a53fbc00000(0000)
knlGS:0000000000000000
[ 0.284416] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 0.285414] CR2: ffff8a53fffff000 CR3: 0000000021e26000 CR4: 00000000003506f0
[ 0.286415] Call Trace:
[ 0.286787] ? apply_retpolines+0x5e/0x2a0
[ 0.287421] ? _cond_resched+0x1a/0x60
[ 0.287987] alternative_instructions+0x7d/0x13f
[ 0.288416] check_bugs+0xeed/0xf2e
[ 0.289418] start_kernel+0x515/0x54c
[ 0.289968] x86_64_start_reservations+0x24/0x2a
[ 0.290415] x86_64_start_kernel+0x9d/0xa5
[ 0.291417] secondary_startup_64_no_verify+0xc2/0xcb
[ 0.292174] irq event stamp: 1709
[ 0.292418] hardirqs last enabled at (1721): [<ffffffffad64d062>]
console_unlock+0x502/0x5e0
[ 0.293415] hardirqs last disabled at (1732): [<ffffffffad64cfbd>]
console_unlock+0x45d/0x5e0
[ 0.294417] softirqs last enabled at (1742): [<ffffffffad5cee36>]
irq_enter_rcu+0x76/0x80
[ 0.295415] softirqs last disabled at (1753): [<ffffffffad5cee1b>]
irq_enter_rcu+0x5b/0x80
[ 0.296418] ---[ end trace 665160b92b6d6ceb ]---

https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.152-92-g2f6e4754098c/testrun/12812412/suite/log-parser-boot/tests/
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.152-92-g2f6e4754098c/testrun/12812412/suite/log-parser-boot/test/check-kernel-exception/log

## Build
* kernel: 5.10.153-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-5.10.y
* git commit: 2f6e4754098c797c9befbb1c13ea97e89dbd665f
* git describe: v5.10.152-92-g2f6e4754098c
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.152-92-g2f6e4754098c

## No Test Regressions (compared to v5.10.152)

## No Metric Regressions (compared to v5.10.152)

## No Test Fixes (compared to v5.10.152)

## No Metric Fixes (compared to v5.10.152)

## Test result summary
total: 148664, pass: 125743, fail: 3265, skip: 19222, xfail: 434

## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 149 total, 148 passed, 1 failed
* arm64: 47 total, 45 passed, 2 failed
* i386: 37 total, 35 passed, 2 failed
* mips: 27 total, 27 passed, 0 failed
* parisc: 6 total, 6 passed, 0 failed
* powerpc: 28 total, 23 passed, 5 failed
* riscv: 12 total, 12 passed, 0 failed
* s390: 12 total, 12 passed, 0 failed
* sh: 12 total, 12 passed, 0 failed
* sparc: 6 total, 6 passed, 0 failed
* x86_64: 40 total, 38 passed, 2 failed

## Test suites summary
* fwts
* igt-gpu-tools
* kselftest-android
* kselftest-arm64
* kselftest-arm64/arm64.btitest.bti_c_func
* kselftest-arm64/arm64.btitest.bti_j_func
* kselftest-arm64/arm64.btitest.bti_jc_func
* kselftest-arm64/arm64.btitest.bti_none_func
* kselftest-arm64/arm64.btitest.nohint_func
* kselftest-arm64/arm64.btitest.paciasp_func
* kselftest-arm64/arm64.nobtitest.bti_c_func
* kselftest-arm64/arm64.nobtitest.bti_j_func
* kselftest-arm64/arm64.nobtitest.bti_jc_func
* kselftest-arm64/arm64.nobtitest.bti_none_func
* kselftest-arm64/arm64.nobtitest.nohint_func
* kselftest-arm64/arm64.nobtitest.paciasp_func
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-drivers-dma-buf
* kselftest-efivarfs
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-firmware
* kselftest-fpu
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-kvm
* kselftest-lib
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mount
* kselftest-mqueue
* kselftest-net
* kselftest-net-forwarding
* kselftest-net-mptcp
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-tc-testing
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-vm
* kselftest-x86
* kselftest-zram
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-cap_bounds
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-filecaps
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-fsx
* ltp-hugetlb
* ltp-io
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-open-posix-tests
* ltp-pty
* ltp-sched
* ltp-securebits
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* network-basic-tests
* packetdrill
* perf
* perf/Zstd-perf.data-compression
* rcutorture
* v4l2-compliance
* vdso

--
Linaro LKFT
https://lkft.linaro.org

2022-11-03 13:03:28

by Sudip Mukherjee

[permalink] [raw]
Subject: Re: [PATCH 5.10 00/91] 5.10.153-rc1 review

Hi Greg,

On Wed, Nov 02, 2022 at 03:32:43AM +0100, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.10.153 release.
> There are 91 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Fri, 04 Nov 2022 02:20:38 +0000.
> Anything received after that time might be too late.

Build test (gcc version 11.3.1 20221016):
mips: 63 configs -> no failure
arm: 104 configs -> no failure
arm64: 3 configs -> no failure
x86_64: 4 configs -> no failure
alpha allmodconfig -> no failure
powerpc allmodconfig -> no failure
riscv allmodconfig -> no failure
s390 allmodconfig -> no failure
xtensa allmodconfig -> no failure

Boot test:
x86_64: Booted on my test laptop. No regression.
x86_64: Booted on qemu. No regression. [1]
arm64: Booted on rpi4b (4GB model). No regression. [2]

[1]. https://openqa.qa.codethink.co.uk/tests/2091
[2]. https://openqa.qa.codethink.co.uk/tests/2094


Tested-by: Sudip Mukherjee <[email protected]>

--
Regards
Sudip

2023-02-15 10:58:21

by heyuqiang

[permalink] [raw]
Subject: Re: [PATCH 5.10 88/91] arm64/kexec: Test page size support with new TGRAN range values

There is an error

tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
master
head: c911f03f8d444e623724fddd82b07a7e1af42338
commit: d5924531dd8ad012ad13eb4d6a5e120c3dadfc05 arm64/kexec: Test page
size support with new TGRAN range values
#
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d5924531dd8ad012ad13eb4d6a5e120c3dadfc05

When I compile the ko file, I add [-Werror=type-limits] compilation
options, an error is reported during compilation.

The log is as follows:

./arch/arm64/include/asm/cpufeature.h: In function
‘system_supports_4kb_granule’:
./arch/arm64/include/asm/cpufeature.h:653:14: error:
comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
return (val >= ID_AA64MMFR0_TGRAN4_SUPPORTED_MIN) &&
^~
./arch/arm64/include/asm/cpufeature.h: In function
‘system_supports_64kb_granule’:
./arch/arm64/include/asm/cpufeature.h:666:14: error:
comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
return (val >= ID_AA64MMFR0_TGRAN64_SUPPORTED_MIN) &&
^~

"val" variable type is "u32"
"#define ID_AA64MMFR0_TGRAN4_SUPPORTED_MIN 0x0"
"#define ID_AA64MMFR0_TGRAN64_SUPPORTED_MIN 0x0"
comparison of val >= 0 is always true.

If you fix the issue, kindly add following tag where applicable
Reported-by: heyuqiang <[email protected]>

Thanks


2023-02-15 11:42:04

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 5.10 88/91] arm64/kexec: Test page size support with new TGRAN range values

On Wed, Feb 15, 2023 at 06:58:13PM +0800, heyuqiang wrote:
> There is an error
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
> master
> head: c911f03f8d444e623724fddd82b07a7e1af42338
> commit: d5924531dd8ad012ad13eb4d6a5e120c3dadfc05 arm64/kexec: Test page size
> support with new TGRAN range values
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d5924531dd8ad012ad13eb4d6a5e120c3dadfc05
>
> When I compile the ko file, I add [-Werror=type-limits] compilation options,
> an error is reported during compilation.

Why add that option? Is that a valid option for the 5.10.y kernel? Is
this something new?

And note, you are responding to a commit from last November, with no
context at all. Is this an issue in Linus's tree too?

>
> The log is as follows:
>
> ./arch/arm64/include/asm/cpufeature.h: In function
> ‘system_supports_4kb_granule’:
> ./arch/arm64/include/asm/cpufeature.h:653:14: error:
> comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
> return (val >= ID_AA64MMFR0_TGRAN4_SUPPORTED_MIN) &&
> ^~
> ./arch/arm64/include/asm/cpufeature.h: In function
> ‘system_supports_64kb_granule’:
> ./arch/arm64/include/asm/cpufeature.h:666:14: error:
> comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
> return (val >= ID_AA64MMFR0_TGRAN64_SUPPORTED_MIN) &&
> ^~
>
> "val" variable type is "u32"
> "#define ID_AA64MMFR0_TGRAN4_SUPPORTED_MIN 0x0"
> "#define ID_AA64MMFR0_TGRAN64_SUPPORTED_MIN 0x0"
> comparison of val >= 0 is always true.
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: heyuqiang <[email protected]>

Please provide a valid fix for this if you wish for it to be resolved.

thanks,

greg k-h