Comment 7 for bug 1822871

Revision history for this message
dann frazier (dannf) wrote : Re: [Bug 1822871] Re: enabling ftrace on Hi1620 CS causes an Oops
  • .config Edit (226.6 KiB, application/octet-stream; name=".config")

On Wed, Apr 10, 2019 at 11:01 AM Ard Biesheuvel
<email address hidden> wrote:
>
> On Tue, 9 Apr 2019 at 16:30, dann frazier <email address hidden> wrote:
> >
> > Yeah, no crash anymore - thanks Ard!
> >
> > ubuntu@d06-4:~$ echo function | sudo tee /sys/kernel/debug/tracing/current_tracer
> > function
> > [ 72.778123] ftrace: far branches to multiple entry points unsupported inside a single module
> >
> > ^ I assume this is expected
> >
>
> Uhm, not really.

:(

> You don't have any out of tree live patching code in your kernel, right?

I see the same behavior w/ just-this-patch on top of upstream:

[ 431.876690] ftrace: far branches to multiple entry points
unsupported inside a single module
[ 431.885157] WARNING: CPU: 21 PID: 3388 at
kernel/trace/ftrace.c:2008 ftrace_bug+0xb0/0x2b0
[ 431.885158] Modules linked in: nls_iso8859_1 ipmi_ssif joydev
input_leds hns_roce_hw_v2 hns_roce ipmi_si ib_uverbs tpm_tis_spi
ipmi_devintf ipmi_msghandler spi_dw_mmio spi_dw cppc_cpufreq
sch_fq_codel ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp
libiscsi_tcp libiscsi scsi_transport_iscsi ip_tables x_tables autofs4
ses enclosure btrfs zstd_compress raid10 raid456 async_raid6_recov
async_memcpy async_pq async_xor async_tx xor xor_neon raid6_pq
libcrc32c raid1 raid0 multipath linear marvell aes_ce_blk
aes_ce_cipher hid_generic hibmc_drm crct10dif_ce ttm ghash_ce
drm_kms_helper sha2_ce syscopyarea sha256_arm64 sysfillrect sha1_ce
hisi_sas_v3_hw sysimgblt ixgbe usbhid hns3 fb_sys_fops hisi_sas_main
igb drm hclge libsas i2c_algo_bit hid xfrm_algo ahci mdio hnae3
scsi_transport_sas libahci hinic gpio_dwapb aes_neon_bs aes_neon_blk
crypto_simd cryptd aes_arm64
[ 431.885213] CPU: 21 PID: 3388 Comm: tee Not tainted 5.1.0-rc4+ #79
[ 431.885215] Hardware name: Huawei TaiShan 2280 V2/BC82AMDA, BIOS TA
BIOS 2280-A CS V2.17.01 03/30/2019
[ 431.885217] pstate: 60400009 (nZCv daif +PAN -UAO)
[ 431.885219] pc : ftrace_bug+0xb0/0x2b0
[ 431.885221] lr : ftrace_replace_code+0xa8/0xc0
[ 431.885222] sp : ffff000020d6bb20
[ 431.885223] x29: ffff000020d6bb20 x28: ffff97b7828e1d80
[ 431.885225] x27: 0000000000000000 x26: 0000000000000000
[ 431.885227] x25: 0000ffffe3d7c228 x24: ffff000020d6bd13
[ 431.885229] x23: 0000000000000002 x22: 0000000000000001
[ 431.885231] x21: ffff3ed411993928 x20: ffff97b7c5810010
[ 431.885232] x19: ffff97b7c5810010 x18: ffffffffffffffff
[ 431.885234] x17: 0000000000000000 x16: ffff3ed4ff397168
[ 431.885236] x15: ffff3ed50005c708 x14: 7320612065646973
[ 431.885237] x13: 6e6920646574726f x12: 707075736e752073
[ 431.885239] x11: 746e696f70207972 x10: 746e6520656c7069
[ 431.885241] x9 : ffff3ed50005d168 x8 : ffff3ed4ff141588
[ 431.885243] x7 : 0000000000000945 x6 : ffff3ed500095308
[ 431.885244] x5 : ffff97b7cfaef150 x4 : ffff3ed4feba7480
[ 431.885246] x3 : 0000000000000000 x2 : 12122b60e4976500
[ 431.885248] x1 : ffff97b7c5810010 x0 : 00000000ffffffea
[ 431.885250] Call trace:
[ 431.885252] ftrace_bug+0xb0/0x2b0
[ 431.885254] ftrace_replace_code+0xa8/0xc0
[ 431.885256] ftrace_modify_all_code+0xc8/0x160
[ 431.885262] arch_ftrace_update_code+0x10/0x18
[ 431.885264] ftrace_run_update_code+0x20/0x70
[ 431.885266] ftrace_startup_enable+0x4c/0x58
[ 431.885268] ftrace_startup+0xa4/0x140
[ 431.885270] register_ftrace_function+0x64/0x80
[ 431.885272] function_trace_init+0x50/0x98
[ 431.885275] tracing_set_tracer+0x124/0x200
[ 431.885277] tracing_set_trace_write+0x10c/0x168
[ 431.885280] __vfs_write+0x48/0x80
[ 431.885281] vfs_write+0xac/0x1b8
[ 431.885283] ksys_write+0x74/0xf0
[ 431.885284] __arm64_sys_write+0x24/0x30
[ 431.885286] el0_svc_common+0x74/0x118
[ 431.885288] el0_svc_handler+0x38/0x78
[ 431.885290] el0_svc+0x8/0xc
[ 431.885292] ---[ end trace d418734dc3074a2a ]---
[ 431.885294] ftrace failed to modify
[ 431.885297] [<ffff3ed411993928>] aes_decrypt+0x20/0x50 [aes_arm64]
[ 431.885298] actual: 1f:20:03:d5
[ 431.885302] Setting ftrace call site to call ftrace function
[ 431.885303] ftrace record flags: 80000001
[ 431.885304] (1)
                expected tramp: ffff3ed4fea40c24