Frogging-Family / linux-tkg

linux-tkg custom kernels
GNU General Public License v2.0
1.33k stars 166 forks source link

Adapting linux-tkg to gcc 13 #740

Closed robson-66 closed 1 year ago

robson-66 commented 1 year ago

When building linux-tkg, it asks me what processor to use, even though I have it checked in customization.cfg _processor_opt="haswell" And after building these errors appear in the log

maj 10 13:49:01 pc kernel: ------------[ cut here ]------------
maj 10 13:49:01 pc kernel: sched: CPU 1 need_resched set for > 100000082 ns (100 ticks) without schedule
maj 10 13:49:01 pc kernel: WARNING: CPU: 1 PID: 159 at kernel/sched/debug.c:1086 resched_latency_warn+0x58/0x70
maj 10 13:49:01 pc kernel: Modules linked in: i915(+) drm_buddy intel_gtt video wmi drm_display_helper cec ttm
maj 10 13:49:01 pc kernel: CPU: 1 PID: 159 Comm: modprobe Not tainted 6.1.27-273-tkg-pds #1 6b72f6bd3d0015e8bb6c6123e38c77300b915853
maj 10 13:49:01 pc kernel: Hardware name: Hewlett-Packard HP EliteDesk 800 G1 TWR/18E4, BIOS L01 v02.71 05/09/2017
maj 10 13:49:01 pc kernel: RIP: 0010:resched_latency_warn+0x58/0x70
maj 10 13:49:01 pc kernel: Code: 48 63 d5 48 c7 c0 80 2b 03 00 89 ee 48 c7 c7 38 27 08 8d 48 8b 14 d5 a0 6a 11 8d 8b 8c 02 80 0c 00 00 48 89 da e8 a8 8e fb ff <0f> 0b 5b 5d c3 cc cc cc cc 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f
maj 10 13:49:01 pc kernel: RSP: 0018:ffffb3b340120e90 EFLAGS: 00010086
maj 10 13:49:01 pc kernel: RAX: 0000000000000000 RBX: 0000000005f5e152 RCX: 0000000000000248
maj 10 13:49:01 pc kernel: RDX: 0000000000000000 RSI: ffffb3b340120d10 RDI: 0000000000000001
maj 10 13:49:01 pc kernel: RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000001
maj 10 13:49:01 pc kernel: R10: 0000000000000003 R11: ffffffff8d8b9f48 R12: 00000000000f227b
maj 10 13:49:01 pc kernel: R13: 0000000000000001 R14: ffff9ce397aa4260 R15: ffff9ce397aa4240
maj 10 13:49:01 pc kernel: FS:  00007f61dfad7740(0000) GS:ffff9ce397a80000(0000) knlGS:0000000000000000
maj 10 13:49:01 pc kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
maj 10 13:49:01 pc kernel: CR2: 00007fb5be87d0c8 CR3: 00000001011e8006 CR4: 00000000001706e0
maj 10 13:49:01 pc kernel: Call Trace:
maj 10 13:49:01 pc kernel:  <IRQ>
maj 10 13:49:01 pc kernel:  scheduler_tick+0x2d1/0x300
maj 10 13:49:01 pc kernel:  update_process_times+0x9c/0xb0
maj 10 13:49:01 pc kernel:  tick_sched_handle+0x22/0x60
maj 10 13:49:01 pc kernel:  tick_sched_timer+0x67/0x80
maj 10 13:49:01 pc kernel:  ? tick_sched_do_timer+0x90/0x90
maj 10 13:49:01 pc kernel:  __hrtimer_run_queues+0x10b/0x2a0
maj 10 13:49:01 pc kernel:  hrtimer_interrupt+0xf7/0x210
maj 10 13:49:01 pc kernel:  __sysvec_apic_timer_interrupt+0x61/0x110
maj 10 13:49:01 pc kernel:  sysvec_apic_timer_interrupt+0x6d/0x90
maj 10 13:49:01 pc kernel:  </IRQ>
maj 10 13:49:01 pc kernel:  <TASK>
maj 10 13:49:01 pc kernel:  asm_sysvec_apic_timer_interrupt+0x1a/0x20
maj 10 13:49:01 pc kernel: RIP: 0010:find_kallsyms_symbol+0x77/0x1b0
maj 10 13:49:01 pc kernel: Code: 97 8c 01 00 00 48 03 97 80 01 00 00 4c 8b 5b 08 83 f9 01 0f 86 27 01 00 00 48 83 c3 18 45 31 ff bd 01 00 00 00 66 83 7b 06 00 <4c> 8b 6b 08 74 75 44 8b 23 4d 03 66 10 41 0f b6 04 24 84 c0 74 65
maj 10 13:49:01 pc kernel: RSP: 0018:ffffb3b3405bb900 EFLAGS: 00000202
maj 10 13:49:01 pc kernel: RAX: 0000000000000072 RBX: ffffffffc06c9e20 RCX: 0000000000002ae1
maj 10 13:49:01 pc kernel: RDX: ffffffffc05388e8 RSI: ffffffffc0487354 RDI: ffffffffc0651f00
maj 10 13:49:01 pc kernel: RBP: 00000000000007ec R08: ffffffffc0487354 R09: ffffffffc0487354
maj 10 13:49:01 pc kernel: R10: 000000000000002e R11: ffffffffc0436170 R12: ffffffffc07285b0
maj 10 13:49:01 pc kernel: R13: ffffffffc0436170 R14: ffffffffc072f058 R15: 00000000000007eb
maj 10 13:49:01 pc kernel:  ? shmem_object_init+0x100/0x100 [i915 370246e182de1ab0eb1066f6218e658ca935f862]
maj 10 13:49:01 pc kernel:  ? shmem_object_init+0x100/0x100 [i915 370246e182de1ab0eb1066f6218e658ca935f862]
maj 10 13:49:01 pc kernel:  ? intel_cpu_transcoder_set_m2_n2+0x4/0x80 [i915 370246e182de1ab0eb1066f6218e658ca935f862]
maj 10 13:49:01 pc kernel:  ? intel_cpu_transcoder_set_m2_n2+0x4/0x80 [i915 370246e182de1ab0eb1066f6218e658ca935f862]
maj 10 13:49:01 pc kernel:  ? intel_vgt_balloon+0x218/0x218 [i915 370246e182de1ab0eb1066f6218e658ca935f862]
maj 10 13:49:01 pc kernel:  ? intel_cpu_transcoder_set_m2_n2+0x4/0x80 [i915 370246e182de1ab0eb1066f6218e658ca935f862]
maj 10 13:49:01 pc kernel:  ? intel_cpu_transcoder_set_m2_n2+0x4/0x80 [i915 370246e182de1ab0eb1066f6218e658ca935f862]
maj 10 13:49:01 pc kernel:  module_address_lookup+0x5f/0xa0
maj 10 13:49:01 pc kernel:  ? intel_cpu_transcoder_set_m2_n2+0x4/0x80 [i915 370246e182de1ab0eb1066f6218e658ca935f862]
maj 10 13:49:01 pc kernel:  kallsyms_lookup_buildid+0xb6/0x130
maj 10 13:49:01 pc kernel:  test_for_valid_rec+0x4b/0x90
maj 10 13:49:01 pc kernel:  ftrace_module_enable+0xa7/0x2a0
maj 10 13:49:01 pc kernel:  load_module+0x1b87/0x2050
maj 10 13:49:01 pc kernel:  ? 0xffffffffc06bc000
maj 10 13:49:01 pc kernel:  ? __do_sys_finit_module+0xac/0x120
maj 10 13:49:01 pc kernel:  __do_sys_finit_module+0xac/0x120
maj 10 13:49:01 pc kernel:  do_syscall_64+0x60/0x90
maj 10 13:49:01 pc kernel:  ? syscall_exit_to_user_mode+0x1b/0x40
maj 10 13:49:01 pc kernel:  ? do_syscall_64+0x6c/0x90
maj 10 13:49:01 pc kernel:  ? syscall_exit_to_user_mode+0x1b/0x40
maj 10 13:49:01 pc kernel:  ? do_syscall_64+0x6c/0x90
maj 10 13:49:01 pc kernel:  entry_SYSCALL_64_after_hwframe+0x63/0xcd
maj 10 13:49:01 pc kernel: RIP: 0033:0x7f61dfbdf2ed
maj 10 13:49:01 pc kernel: Code: 5d c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 3b 7a 0d 00 f7 d8 64 89 01 48
maj 10 13:49:01 pc kernel: RSP: 002b:00007ffc161975a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
maj 10 13:49:01 pc kernel: RAX: ffffffffffffffda RBX: 00005578f831eaa0 RCX: 00007f61dfbdf2ed
maj 10 13:49:01 pc kernel: RDX: 0000000000000000 RSI: 00005578f8126cb2 RDI: 000000000000000a
maj 10 13:49:01 pc kernel: RBP: 00005578f8126cb2 R08: 0000000000000000 R09: 00007ffc161976e0
maj 10 13:49:01 pc kernel: R10: 000000000000000a R11: 0000000000000246 R12: 0000000000060000
maj 10 13:49:01 pc kernel: R13: 00005578f831eb20 R14: 0000000000000000 R15: 00005578f8320d00
maj 10 13:49:01 pc kernel:  </TASK>
maj 10 13:49:01 pc kernel: ---[ end trace 0000000000000000 ]---
ptr1337 commented 1 year ago

This is not happening with a generic kernel, right?

Which CPU you have?

robson-66 commented 1 year ago

Jaki masz procesor?

Intel i5-4590 (4) @ 3.700GHz

robson-66 commented 1 year ago

Problem solved, it turned out that when the question pops up what processor to use, you need to choose native intel, i.e. number 44. By the way, maybe add such an option to customization.cfg.

ptr1337 commented 1 year ago

Problem solved, it turned out that when the question pops up what processor to use, you need to choose native intel, i.e. number 44. By the way, maybe add such an option to customization.cfg.

Mhm.. after you writing it: I had a equal issue on the old CachyOS buildserver (10920X) where the correct cpu march did not boot, but NATIVE_INTEL did work fine. Maybe there is something wrong in the patch or at gcc itself.

Clang was not affected from that.

jnines commented 1 year ago

Appears it's not specific to Intel as I have _processor_opt="zen2", am getting asked for CPU Arch, and a similar error.

------------[ cut here ]------------
May 12 09:50:48 archbox kernel: sched: CPU 6 need_resched set for > 100000100 ns (100 ticks) without schedule
May 12 09:50:48 archbox kernel: WARNING: CPU: 6 PID: 381 at kernel/sched/debug.c:1086 resched_latency_warn+0x58/0x70
May 12 09:50:48 archbox kernel: Modules linked in: intel_rapl_msr(+) intel_rapl_common snd_hda_codec_realtek kvm_amd snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi btusb snd_hda_intel snd_usb_audio(+) >
May 12 09:50:48 archbox kernel: CPU: 6 PID: 381 Comm: (udev-worker) Tainted: G           O       6.3.2-273-tkg-pds #1 3a1f5726f2d3ffafaa5df136e46c5637216e31cb
May 12 09:50:48 archbox kernel: Hardware name: Gigabyte Technology Co., Ltd. X570 AORUS ELITE/X570 AORUS ELITE, BIOS F38b 03/23/2023
May 12 09:50:48 archbox kernel: RIP: 0010:resched_latency_warn+0x58/0x70
May 12 09:50:48 archbox kernel: Code: 48 63 d5 48 c7 c0 c0 3a 03 00 89 ee 48 c7 c7 88 3f 3d 9c 48 8b 14 d5 00 cb 46 9c 8b 8c 02 70 04 00 00 48 89 da e8 c8 22 fa ff <0f> 0b 5b 5d e9 73 7b dc 00 66 66 2e 0f 1f 8>
May 12 09:50:48 archbox kernel: RSP: 0018:ffffadc540334e40 EFLAGS: 00010086
May 12 09:50:48 archbox kernel: RAX: 0000000000000000 RBX: 0000000005f5e164 RCX: 0000000000000027
May 12 09:50:48 archbox kernel: RDX: ffff98d99efa1408 RSI: 0000000000000001 RDI: ffff98d99efa1400
May 12 09:50:48 archbox kernel: RBP: 0000000000000006 R08: 0000000000000000 R09: 00000000ffffefff
May 12 09:50:48 archbox kernel: R10: ffffffff9ca58120 R11: 0000000000000003 R12: 00000000000002b2
May 12 09:50:48 archbox kernel: R13: ffff98d99efb3af0 R14: ffff98d99efb3af8 R15: ffff98d99efb3ac0
May 12 09:50:48 archbox kernel: FS:  00007f09fcea0140(0000) GS:ffff98d99ef80000(0000) knlGS:0000000000000000
May 12 09:50:48 archbox kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
May 12 09:50:48 archbox kernel: CR2: 00007f09fd94c930 CR3: 00000001161a0000 CR4: 0000000000350ee0
May 12 09:50:48 archbox kernel: Call Trace:
May 12 09:50:48 archbox kernel:  <IRQ>
May 12 09:50:48 archbox kernel:  scheduler_tick+0x584/0x5b0
May 12 09:50:48 archbox kernel:  update_process_times+0x9c/0xb0
May 12 09:50:48 archbox kernel:  tick_sched_timer+0xdb/0x130
May 12 09:50:48 archbox kernel:  ? __pfx_tick_sched_timer+0x10/0x10
May 12 09:50:48 archbox kernel:  __hrtimer_run_queues+0x11f/0x2a0
May 12 09:50:48 archbox kernel:  hrtimer_interrupt+0xfa/0x430
May 12 09:50:48 archbox kernel:  __sysvec_apic_timer_interrupt+0x61/0x170
May 12 09:50:48 archbox kernel:  sysvec_apic_timer_interrupt+0x65/0x80
May 12 09:50:48 archbox kernel:  </IRQ>
May 12 09:50:48 archbox kernel:  <TASK>
May 12 09:50:48 archbox kernel:  asm_sysvec_apic_timer_interrupt+0x1a/0x20
May 12 09:50:48 archbox kernel: RIP: 0010:loop1+0x57f/0x98f [sha512_ssse3]
May 12 09:50:48 archbox kernel: Code: f3 c5 ed 73 d1 08 c5 f5 73 f1 38 c5 f5 eb ca c4 c1 65 ef d8 c5 e5 ef c9 c5 fd d4 c1 c4 e3 7d 06 f0 00 c5 fd db 05 a1 29 00 00 <c4> e3 55 06 d5 11 c5 bd 73 d2 06 4c 89 de c>
May 12 09:50:48 archbox kernel: RSP: 0018:ffffadc54424fae0 EFLAGS: 00000a07
May 12 09:50:48 archbox kernel: RAX: 84021047600b3849 RBX: f14f690caefca848 RCX: 94a9c5646a36585a
May 12 09:50:48 archbox kernel: RDX: e2c1869e851359b9 RSI: 940b41446a3e3848 RDI: ffffffffc073b700
May 12 09:50:48 archbox kernel: RBP: ffffadc54424fb28 R08: 1a3f50a335cff752 R09: 7f1f869a8dca5a0d
May 12 09:50:48 archbox kernel: R10: be65444384448543 R11: 742d4660592a21dd R12: 8400004460021848
May 12 09:50:48 archbox kernel: R13: ffcb7a1aa72cd5ca R14: 56715cfab2298447 R15: 7df140f62c73b215
May 12 09:50:48 archbox kernel:  ? __kmem_cache_alloc_node+0x195/0x330
May 12 09:50:48 archbox kernel:  ? nowork+0x12/0x12 [sha512_ssse3 f204a27b17920a6e503b8f8aa4c1a7a5aed58db3]
May 12 09:50:48 archbox kernel:  sha512_finup.part.0+0x2d5/0x310 [sha512_ssse3 f204a27b17920a6e503b8f8aa4c1a7a5aed58db3]
May 12 09:50:48 archbox kernel:  pkcs7_digest+0xe1/0x220
May 12 09:50:48 archbox kernel:  pkcs7_verify+0x65/0x5b0
May 12 09:50:48 archbox kernel:  verify_pkcs7_signature+0x8b/0x190
May 12 09:50:48 archbox kernel:  mod_verify_sig+0x89/0xc0
May 12 09:50:48 archbox kernel:  module_sig_check+0x8c/0xf0
May 12 09:50:48 archbox kernel:  load_module+0x4e/0x2dc0
May 12 09:50:48 archbox kernel:  ? asm_sysvec_apic_timer_interrupt+0x1a/0x20
May 12 09:50:48 archbox kernel:  ? __do_sys_init_module+0x177/0x1b0
May 12 09:50:48 archbox kernel:  __do_sys_init_module+0x177/0x1b0
May 12 09:50:48 archbox kernel:  do_syscall_64+0x60/0x90
May 12 09:50:48 archbox kernel:  ? syscall_exit_to_user_mode+0x1b/0x40
May 12 09:50:48 archbox kernel:  ? do_syscall_64+0x6c/0x90
May 12 09:50:48 archbox kernel:  ? exc_page_fault+0x7c/0x180
May 12 09:50:48 archbox kernel:  entry_SYSCALL_64_after_hwframe+0x72/0xdc
May 12 09:50:48 archbox kernel: RIP: 0033:0x7f09fd87af9e
May 12 09:50:48 archbox kernel: Code: 48 8b 0d bd ed 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 8a ed 0>
May 12 09:50:48 archbox kernel: RSP: 002b:00007ffe88b1d288 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
May 12 09:50:48 archbox kernel: RAX: ffffffffffffffda RBX: 0000564bfc43f270 RCX: 00007f09fd87af9e
May 12 09:50:48 archbox kernel: RDX: 00007f09fd9ca343 RSI: 00000000052e196e RDI: 00007f09f5fb6010
May 12 09:50:48 archbox kernel: RBP: 00007f09fd9ca343 R08: 0000000000261000 R09: 0000000000000000
May 12 09:50:48 archbox kernel: R10: 0000000000017701 R11: 0000000000000246 R12: 0000000000020000
May 12 09:50:48 archbox kernel: R13: 0000564bfc31b170 R14: 0000564bfc43f270 R15: 0000564bfc4207e0
May 12 09:50:48 archbox kernel:  </TASK>
May 12 09:50:48 archbox kernel: ---[ end trace 0000000000000000 ]---

Also getting a lot of kernel: Loading of module with unavailable key is rejected now, which is a super helpful error, but also probably a different issue.