Re: [PATCH] arm: Disable preemption in harden_branch_predictor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2019-02-12 12:47:22 [+0000], Bernd Edlinger wrote:
> The harden_branch_predictor function uses smp_processor_id,
> which complains about being used in a preemptible context:
> 
> BUG: using smp_processor_id() in preemptible [00000000] code: trie_map_rand.e/4938
> caller is debug_smp_processor_id+0x18/0x24
> CPU: 0 PID: 4938 Comm: trie_map_rand.e Not tainted 4.14.93-rt53-g74e4d87 #1
> Hardware name: Altera SOCFPGA
> [<8011162c>] (unwind_backtrace) from [<8010bfd4>] (show_stack+0x20/0x24)
> [<8010bfd4>] (show_stack) from [<806732e8>] (dump_stack+0x78/0x94)
> [<806732e8>] (dump_stack) from [<8041c254>] (check_preemption_disabled+0xec/0x128)
> [<8041c254>] (check_preemption_disabled) from [<8041c2a8>] (debug_smp_processor_id+0x18/0x24)
> [<8041c2a8>] (debug_smp_processor_id) from [<8011518c>] (__do_user_fault+0x34/0x100)
> [<8011518c>] (__do_user_fault) from [<801155d0>] (do_page_fault+0x2f4/0x328)
> [<801155d0>] (do_page_fault) from [<80101268>] (do_DataAbort+0x48/0xc8)
> [<80101268>] (do_DataAbort) from [<8010d300>] (__dabt_usr+0x40/0x60)
> Exception stack(0xae2fdfb0 to 0xae2fdff8)
> dfa0:                                     c31b0fc6 76c8f7d8 00000000 00000001
> dfc0: 00000001 00c79780 0004f7f4 00c79780 7ea2e550 7ea2e408 7ea2e58c 3fc99999
> dfe0: 00000100 7ea2e3d0 00033d24 00018edc 600c0010 ffffffff
> 
> Work around the issue by disabling preemption while clearing
> the branch predictor table.

Can you verify if this only happens on RT or also on !RT? From what it
looks like to me, it should also happen on non-RT.

Sebastian



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux