lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <871qi7qupw.ffs@tglx>
Date:   Mon, 19 Jun 2023 18:31:55 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Dheeraj Kumar Srivastava <dheerajkumar.srivastava@....com>,
        linux-kernel@...r.kernel.org, mingo@...hat.com, bp@...en8.de,
        dave.hansen@...ux.intel.com, x86@...nel.org
Cc:     hpa@...or.com, gorcunov@...nvz.org, suresh.b.siddha@...el.com,
        Dheeraj Kumar Srivastava <dheerajkumar.srivastava@....com>,
        Kishon Vijay Abraham I <kvijayab@....com>,
        Vasant Hegde <vasant.hegde@....com>
Subject: Re: [PATCH v1] x86/apic: Fix kernel panic when "intremap=off" and
 "x2apic_phys" are set

On Sat, Jun 17 2023 at 02:52, Dheeraj Kumar Srivastava wrote:
> x2APIC mode requires "Interrupt Remapping" to be enabled and the
> "physical x2apic" driver can be used only when x2APIC mode is enabled.
> However when "intremap=off" and "x2apic_phys" kernel command line
> parameters are passed, "physical x2apic" driver is being used even when
> x2APIC mode is disabled ("intremap=off" disables x2APIC mode).
> This results in the below kernel panic:
>
>   unchecked MSR access error: RDMSR from 0x80f at rIP: 0xffffffff87eab4ec
>   (native_read_msr+0xc/0x40)
>   Call Trace:
>   <TASK>
>   native_apic_msr_read+0x1f/0x30
>   setup_local_APIC+0x4e/0x380
>   ? zen_untrain_ret+0x1/0x1
>   ? enable_IR_x2apic+0xe8/0x250
>   apic_intr_mode_init+0x4c/0x120
>   x86_late_time_init+0x28/0x40
>   start_kernel+0x626/0xa80
>   x86_64_start_reservations+0x1c/0x30
>   x86_64_start_kernel+0xbf/0x110
>   secondary_startup_64_no_verify+0x10b/0x10b
>   </TASK>
>
> This is due to an incorrect conditional check in x2apic_phys_probe().
> Fix it here by returning 0 when "x2apic_mode" is not set in
> x2apic_phys_probe(). This now prevents default_setup_apic_routing() from
> selecting "physical x2apic" driver.
>
> Fixes: 9ebd680bd029 ("x86, apic: Use probe routines to simplify apic selection")
> Reviewed-by: Kishon Vijay Abraham I <kvijayab@....com>
> Reviewed-by: Vasant Hegde <vasant.hegde@....com>
> Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@....com>

Reviewed-by: Thomas Gleixner <tglx@...utronix.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ