On Tue, Mar 21, 2023 at 05:18:03AM -0700, KernelCI bot wrote:
The KernelCI bisection bot found a boot bisection on one of the HP
ChromeBooks in v5.10.175 triggered by b5005605013d ("drm/i915: Don't use
BAR mappings for ring buffers with LLC"). The system appears to die
very early in boot with no output.
I've left the full report from the bot below, including links to full
boot logs such as they are and a tag for the bot, and the full web
dashboard for the test case fail is at:
https://linux.kernelci.org/test/plan/id/64147346939869e04b8c8694/
including details of the successful test on v5.10.174.
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> * This automated bisection report was sent to you on the basis *
> * that you may be involved with the breaking commit it has *
> * found. No manual investigation has been done to verify it, *
> * and the root cause of the problem may be somewhere else. *
> * *
> * If you do send a fix, please include this trailer: *
> * Reported-by: "kernelci.org bot" <bot(a)kernelci.org> *
> * *
> * Hope this helps! *
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>
> stable-rc/linux-5.10.y bisection: baseline.login on hp-x360-14-G1-sona
>
> Summary:
> Start: de26e1b2103b Linux 5.10.175
> Plain log: https://storage.kernelci.org/stable-rc/linux-5.10.y/v5.10.175/x86_64/x86_64…
> HTML log: https://storage.kernelci.org/stable-rc/linux-5.10.y/v5.10.175/x86_64/x86_64…
> Result: b5005605013d drm/i915: Don't use BAR mappings for ring buffers with LLC
>
> Checks:
> revert: PASS
> verify: PASS
>
> Parameters:
> Tree: stable-rc
> URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
> Branch: linux-5.10.y
> Target: hp-x360-14-G1-sona
> CPU arch: x86_64
> Lab: lab-collabora
> Compiler: gcc-10
> Config: x86_64_defconfig+x86-chromebook
> Test case: baseline.login
>
> Breaking commit found:
>
> -------------------------------------------------------------------------------
> commit b5005605013d30ab27c303cbaeff60b7872234a3
> Author: John Harrison <John.C.Harrison(a)Intel.com>
> Date: Wed Feb 15 17:11:01 2023 -0800
>
> drm/i915: Don't use BAR mappings for ring buffers with LLC
>
> commit 85636167e3206c3fbd52254fc432991cc4e90194 upstream.
>
> Direction from hardware is that ring buffers should never be mapped
> via the BAR on systems with LLC. There are too many caching pitfalls
> due to the way BAR accesses are routed. So it is safest to just not
> use it.
>
> Signed-off-by: John Harrison <John.C.Harrison(a)Intel.com>
> Fixes: 9d80841ea4c9 ("drm/i915: Allow ringbuffers to be bound anywhere")
> Cc: Chris Wilson <chris(a)chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen(a)linux.intel.com>
> Cc: Jani Nikula <jani.nikula(a)linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi(a)intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin(a)linux.intel.com>
> Cc: intel-gfx(a)lists.freedesktop.org
> Cc: <stable(a)vger.kernel.org> # v4.9+
> Tested-by: Jouni Högander <jouni.hogander(a)intel.com>
> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio(a)intel.com>
> Link: https://patchwork.freedesktop.org/patch/msgid/20230216011101.1909009-3-John…
> (cherry picked from commit 65c08339db1ada87afd6cfe7db8e60bb4851d919)
> Signed-off-by: Jani Nikula <jani.nikula(a)intel.com>
> Signed-off-by: John Harrison <John.C.Harrison(a)Intel.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_ring.c b/drivers/gpu/drm/i915/gt/intel_ring.c
> index 4034a4bac7f0..69b2e5509d67 100644
> --- a/drivers/gpu/drm/i915/gt/intel_ring.c
> +++ b/drivers/gpu/drm/i915/gt/intel_ring.c
> @@ -49,7 +49,7 @@ int intel_ring_pin(struct intel_ring *ring, struct i915_gem_ww_ctx *ww)
> if (unlikely(ret))
> goto err_unpin;
>
> - if (i915_vma_is_map_and_fenceable(vma))
> + if (i915_vma_is_map_and_fenceable(vma) && !HAS_LLC(vma->vm->i915))
> addr = (void __force *)i915_vma_pin_iomap(vma);
> else
> addr = i915_gem_object_pin_map(vma->obj,
> @@ -91,7 +91,7 @@ void intel_ring_unpin(struct intel_ring *ring)
> return;
>
> i915_vma_unset_ggtt_write(vma);
> - if (i915_vma_is_map_and_fenceable(vma))
> + if (i915_vma_is_map_and_fenceable(vma) && !HAS_LLC(vma->vm->i915))
> i915_vma_unpin_iomap(vma);
> else
> i915_gem_object_unpin_map(vma->obj);
> -------------------------------------------------------------------------------
>
>
> Git bisection log:
>
> -------------------------------------------------------------------------------
> git bisect start
> # good: [955623617f2f505ac08d0efda2bb50c1a52e2c96] Linux 5.10.174
> git bisect good 955623617f2f505ac08d0efda2bb50c1a52e2c96
> # bad: [de26e1b2103b1f56451f6ad77f0190c9066c87dc] Linux 5.10.175
> git bisect bad de26e1b2103b1f56451f6ad77f0190c9066c87dc
> # good: [d16701a385b54f44bf41ff1d7485e7a11080deb3] bnxt_en: Avoid order-5 memory allocation for TPA data
> git bisect good d16701a385b54f44bf41ff1d7485e7a11080deb3
> # good: [d47d364f6671d8794a89e4972b1fd3284d213c96] macintosh: windfarm: Use unsigned type for 1-bit bitfields
> git bisect good d47d364f6671d8794a89e4972b1fd3284d213c96
> # bad: [c3fd717b58f0a3e2461c16e2360ee6a949b47940] ext4: add strict range checks while freeing blocks
> git bisect bad c3fd717b58f0a3e2461c16e2360ee6a949b47940
> # good: [7aa5a495cbf8a33cd9fec892c180dedf14292b76] ipmi/watchdog: replace atomic_add() and atomic_sub()
> git bisect good 7aa5a495cbf8a33cd9fec892c180dedf14292b76
> # bad: [b5005605013d30ab27c303cbaeff60b7872234a3] drm/i915: Don't use BAR mappings for ring buffers with LLC
> git bisect bad b5005605013d30ab27c303cbaeff60b7872234a3
> # good: [c53d50d8081a49ba21f866a51277a012b9efad8e] skbuff: Fix nfct leak on napi stolen
> git bisect good c53d50d8081a49ba21f866a51277a012b9efad8e
> # first bad commit: [b5005605013d30ab27c303cbaeff60b7872234a3] drm/i915: Don't use BAR mappings for ring buffers with LLC
> -------------------------------------------------------------------------------
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#39748): https://groups.io/g/kernelci-results/message/39748
> Mute This Topic: https://groups.io/mt/97753328/1131744
> Group Owner: kernelci-results+owner(a)groups.io
> Unsubscribe: https://groups.io/g/kernelci-results/unsub [broonie(a)kernel.org]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
This is the start of the stable review cycle for the 5.4.238 release.
There are 60 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 Wed, 22 Mar 2023 14:54:16 +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.4.238-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.4.238-rc1
Lee Jones <lee(a)kernel.org>
HID: uhid: Over-ride the default maximum data buffer value with our own
Lee Jones <lee(a)kernel.org>
HID: core: Provide new max_buffer_size attribute to over-ride the default
Lukas Wunner <lukas(a)wunner.de>
PCI: Unify delay handling for reset and resume
Sven Schnelle <svens(a)linux.ibm.com>
s390/ipl: add missing intersection check to ipl_report handling
Biju Das <biju.das.jz(a)bp.renesas.com>
serial: 8250_em: Fix UART port type
John Harrison <John.C.Harrison(a)Intel.com>
drm/i915: Don't use stolen memory for ring buffers with LLC
Kees Cook <keescook(a)chromium.org>
treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD()
Tom Saeger <tom.saeger(a)oracle.com>
Revert "treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD()"
Nikita Zhandarovich <n.zhandarovich(a)fintech.ru>
x86/mm: Fix use of uninitialized buffer in sme_enable()
Helge Deller <deller(a)gmx.de>
fbdev: stifb: Provide valid pixelclock and add fb_check_var() checks
Chen Zhongjin <chenzhongjin(a)huawei.com>
ftrace: Fix invalid address access in lookup_rec() when index is 0
Paolo Bonzini <pbonzini(a)redhat.com>
KVM: nVMX: add missing consistency checks for CR0 and CR4
Steven Rostedt (Google) <rostedt(a)goodmis.org>
tracing: Make tracepoint lockdep check actually test something
Steven Rostedt (Google) <rostedt(a)goodmis.org>
tracing: Check field value in hist_field_name()
Johan Hovold <johan+linaro(a)kernel.org>
interconnect: fix mem leak when freeing nodes
Sherry Sun <sherry.sun(a)nxp.com>
tty: serial: fsl_lpuart: skip waiting for transmission complete when UARTCTRL_SBK is asserted
Theodore Ts'o <tytso(a)mit.edu>
ext4: fix possible double unlock when moving a directory
Michael Karcher <kernel(a)mkarcher.dialup.fu-berlin.de>
sh: intc: Avoid spurious sizeof-pointer-div warning
Qu Huang <qu.huang(a)linux.dev>
drm/amdkfd: Fix an illegal memory access
Baokun Li <libaokun1(a)huawei.com>
ext4: fix task hung in ext4_xattr_delete_inode
Baokun Li <libaokun1(a)huawei.com>
ext4: fail ext4_iget if special inode unallocated
David Gow <davidgow(a)google.com>
rust: arch/um: Disable FP/SIMD instruction to match x86
Yifei Liu <yifeliu(a)cs.stonybrook.edu>
jffs2: correct logic when creating a hole in jffs2_write_begin
Tobias Schramm <t.schramm(a)manjaro.org>
mmc: atmel-mci: fix race between stop command and start of next command
Linus Torvalds <torvalds(a)linux-foundation.org>
media: m5mols: fix off-by-one loop termination error
Marcus Folkesson <marcus.folkesson(a)gmail.com>
hwmon: (ina3221) return prober error code
Zheng Wang <zyytlz.wz(a)163.com>
hwmon: (xgene) Fix use after free bug in xgene_hwmon_remove due to race condition
Tony O'Brien <tony.obrien(a)alliedtelesis.co.nz>
hwmon: (adt7475) Fix masking of hysteresis registers
Tony O'Brien <tony.obrien(a)alliedtelesis.co.nz>
hwmon: (adt7475) Display smoothing attributes in correct order
Liang He <windhl(a)126.com>
ethernet: sun: add check for the mdesc_grab()
Alexandra Winter <wintera(a)linux.ibm.com>
net/iucv: Fix size of interrupt data
Szymon Heidrich <szymon.heidrich(a)gmail.com>
net: usb: smsc75xx: Move packet length check to prevent kernel panic in skb_pull
Ido Schimmel <idosch(a)nvidia.com>
ipv4: Fix incorrect table ID in IOCTL path
Liang He <windhl(a)126.com>
block: sunvdc: add check for mdesc_grab() returning NULL
Damien Le Moal <damien.lemoal(a)opensource.wdc.com>
nvmet: avoid potential UAF in nvmet_req_complete()
Szymon Heidrich <szymon.heidrich(a)gmail.com>
net: usb: smsc75xx: Limit packet length to skb->len
Zheng Wang <zyytlz.wz(a)163.com>
nfc: st-nci: Fix use after free bug in ndlc_remove due to race condition
Heiner Kallweit <hkallweit1(a)gmail.com>
net: phy: smsc: bail out in lan87xx_read_status if genphy_read_status fails
Eric Dumazet <edumazet(a)google.com>
net: tunnels: annotate lockless accesses to dev->needed_headroom
Daniil Tatianin <d-tatianin(a)yandex-team.ru>
qed/qed_dev: guard against a possible division by zero
Ivan Vecera <ivecera(a)redhat.com>
i40e: Fix kernel crash during reboot when adapter is in recovery mode
Jianguo Wu <wujianguo(a)chinatelecom.cn>
ipvlan: Make skb->skb_iif track skb->dev for l3s mode
Fedor Pchelkin <pchelkin(a)ispras.ru>
nfc: pn533: initialize struct pn533_out_arg properly
Breno Leitao <leitao(a)debian.org>
tcp: tcp_make_synack() can be called from process context
Bart Van Assche <bvanassche(a)acm.org>
scsi: core: Fix a procfs host directory removal regression
Xiang Chen <chenxiang66(a)hisilicon.com>
scsi: core: Fix a comment in function scsi_host_dev_release()
Jeremy Sowden <jeremy(a)azazel.net>
netfilter: nft_redir: correct value of inet type `.maxattrs`
Bjorn Helgaas <bhelgaas(a)google.com>
ALSA: hda: Match only Intel devices with CONTROLLER_IN_GPU()
Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
ALSA: hda: Add Intel DG2 PCI ID and HDMI codec vid
Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
ALSA: hda: Add Alderlake-S PCI ID and HDMI codec vid
Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
ALSA: hda - controller is in GPU on the DG1
Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
ALSA: hda - add Intel DG1 PCI and HDMI ids
Wenchao Hao <haowenchao2(a)huawei.com>
scsi: mpt3sas: Fix NULL pointer access in mpt3sas_transport_port_add()
Glenn Washburn <development(a)efficientek.com>
docs: Correct missing "d_" prefix for dentry_operations member d_weak_revalidate
Randy Dunlap <rdunlap(a)infradead.org>
clk: HI655X: select REGMAP instead of depending on it
Christian Hewitt <christianshewitt(a)gmail.com>
drm/meson: fix 1px pink line on GXM when scaling video overlay
Zhang Xiaoxu <zhangxiaoxu5(a)huawei.com>
cifs: Move the in_send statistic to __smb_send_rqst()
Dmitry Osipenko <dmitry.osipenko(a)collabora.com>
drm/panfrost: Don't sync rpm suspension after mmu flushing
Herbert Xu <herbert(a)gondor.apana.org.au>
xfrm: Allow transport-mode states with AF_UNSPEC selector
Eric Biggers <ebiggers(a)google.com>
ext4: fix cgroup writeback accounting with fs-layer encryption
-------------
Diffstat:
Documentation/filesystems/vfs.rst | 2 +-
Makefile | 4 +--
arch/mips/lasat/picvue_proc.c | 2 +-
arch/s390/boot/ipl_report.c | 8 +++++
arch/x86/Makefile.um | 6 ++++
arch/x86/kvm/vmx/nested.c | 10 ++++--
arch/x86/mm/mem_encrypt_identity.c | 3 +-
drivers/block/sunvdc.c | 2 ++
drivers/clk/Kconfig | 2 +-
drivers/gpu/drm/amd/amdkfd/kfd_events.c | 9 ++---
drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 5 +--
drivers/gpu/drm/meson/meson_vpp.c | 2 ++
drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +-
drivers/hid/hid-core.c | 18 +++++++---
drivers/hid/uhid.c | 1 +
drivers/hwmon/adt7475.c | 8 ++---
drivers/hwmon/ina3221.c | 2 +-
drivers/hwmon/xgene-hwmon.c | 1 +
drivers/interconnect/core.c | 4 +++
drivers/media/i2c/m5mols/m5mols_core.c | 2 +-
drivers/mmc/host/atmel-mci.c | 3 --
drivers/net/ethernet/intel/i40e/i40e_main.c | 1 +
drivers/net/ethernet/qlogic/qed/qed_dev.c | 5 +++
drivers/net/ethernet/sun/ldmvsw.c | 3 ++
drivers/net/ethernet/sun/sunvnet.c | 3 ++
drivers/net/ipvlan/ipvlan_l3s.c | 1 +
drivers/net/phy/smsc.c | 5 ++-
drivers/net/usb/smsc75xx.c | 7 ++++
drivers/nfc/pn533/usb.c | 1 +
drivers/nfc/st-nci/ndlc.c | 6 ++--
drivers/nvme/target/core.c | 4 ++-
drivers/pci/pci-driver.c | 4 +--
drivers/pci/pci.c | 54 +++++++++++++----------------
drivers/pci/pci.h | 10 +++++-
drivers/scsi/hosts.c | 5 +--
drivers/scsi/mpt3sas/mpt3sas_transport.c | 14 ++++++--
drivers/tty/serial/8250/8250_em.c | 4 +--
drivers/tty/serial/fsl_lpuart.c | 12 +++++--
drivers/video/fbdev/stifb.c | 27 +++++++++++++++
fs/cifs/transport.c | 21 +++++------
fs/ext4/inode.c | 18 +++++-----
fs/ext4/namei.c | 4 +--
fs/ext4/page-io.c | 10 +++---
fs/ext4/xattr.c | 11 ++++++
fs/jffs2/file.c | 15 ++++----
include/linux/hid.h | 3 ++
include/linux/netdevice.h | 6 ++--
include/linux/sh_intc.h | 5 ++-
include/linux/tracepoint.h | 15 ++++----
kernel/trace/ftrace.c | 3 +-
kernel/trace/trace_events_hist.c | 3 ++
net/ipv4/fib_frontend.c | 3 ++
net/ipv4/ip_tunnel.c | 12 +++----
net/ipv4/tcp_output.c | 2 +-
net/ipv6/ip6_tunnel.c | 4 +--
net/iucv/iucv.c | 2 +-
net/netfilter/nft_redir.c | 2 +-
net/xfrm/xfrm_state.c | 3 --
sound/pci/hda/hda_intel.c | 22 ++++++++++--
sound/pci/hda/patch_hdmi.c | 3 ++
60 files changed, 284 insertions(+), 145 deletions(-)
For SCI, the TE (transmit enable) must be set after setting TIE (transmit
interrupt enable) or in the same instruction to start the transmission.
Set TE bit in sci_start_tx() instead of set_termios() for SCI and clear
TE bit, if circular buffer is empty in sci_transmit_chars().
Fixes: f9a2adcc9e90 ("arm64: dts: renesas: r9a07g044: Add SCI[0-1] nodes")
Cc: stable(a)vger.kernel.org
Signed-off-by: Biju Das <biju.das.jz(a)bp.renesas.com>
---
v3:
* New patch
---
drivers/tty/serial/sh-sci.c | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index b9cd27451f90..9079a8ea9132 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -597,6 +597,15 @@ static void sci_start_tx(struct uart_port *port)
if (!s->chan_tx || port->type == PORT_SCIFA || port->type == PORT_SCIFB) {
/* Set TIE (Transmit Interrupt Enable) bit in SCSCR */
ctrl = serial_port_in(port, SCSCR);
+
+ /*
+ * For SCI, TE (transmit enable) must be set after setting TIE
+ * (transmit interrupt enable) or in the same instruction to start
+ * the transmit process.
+ */
+ if (port->type == PORT_SCI)
+ ctrl |= SCSCR_TE;
+
serial_port_out(port, SCSCR, ctrl | SCSCR_TIE);
}
}
@@ -835,6 +844,12 @@ static void sci_transmit_chars(struct uart_port *port)
c = xmit->buf[xmit->tail];
xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
} else {
+ if (port->type == PORT_SCI) {
+ ctrl = serial_port_in(port, SCSCR);
+ ctrl &= ~SCSCR_TE;
+ serial_port_out(port, SCSCR, ctrl);
+ return;
+ }
break;
}
@@ -2581,8 +2596,14 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
sci_set_mctrl(port, port->mctrl);
}
- scr_val |= SCSCR_RE | SCSCR_TE |
- (s->cfg->scscr & ~(SCSCR_CKE1 | SCSCR_CKE0));
+ /*
+ * For SCI, TE (transmit enable) must be set after setting TIE
+ * (transmit interrupt enable) or in the same instruction to
+ * start the transmitting process. So skip setting TE here for SCI.
+ */
+ if (port->type != PORT_SCI)
+ scr_val |= SCSCR_TE;
+ scr_val |= SCSCR_RE | (s->cfg->scscr & ~(SCSCR_CKE1 | SCSCR_CKE0));
serial_port_out(port, SCSCR, scr_val | s->hscif_tot);
if ((srr + 1 == 5) &&
(port->type == PORT_SCIFA || port->type == PORT_SCIFB)) {
--
2.25.1