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]
Date:   Mon, 20 Jun 2022 10:30:41 +0300 (EEST)
From:   Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To:     Marcin Wojtas <mw@...ihalf.com>
cc:     LKML <linux-kernel@...r.kernel.org>,
        linux-serial <linux-serial@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Jiri Slaby <jirislaby@...nel.org>, miquel.raynal@...tlin.com,
        jaz@...ihalf.com, upstream@...ihalf.com
Subject: Re: [PATCH] serial: 8250: dw: enable using pdata with ACPI

On Sun, 19 Jun 2022, Marcin Wojtas wrote:

> Commit 3242fe805b52 ("serial: 8250: dw: Move the USR register to pdata")

That commit id is not correct, please fix.

Other than that,
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>

> caused NULL-pointer dereference when booting with ACPI by unconditional
> usage of the recently added pdata.
> 
> In order to fix that and prevent similar issues in future, hook the
> default version of this structure in dw8250_acpi_match table.
> 
> Fixes: 3242fe805b52 ("serial: 8250: dw: Move the USR register to pdata")
> Signed-off-by: Marcin Wojtas <mw@...ihalf.com>
> ---
>  drivers/tty/serial/8250/8250_dw.c | 24 ++++++++++----------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
> index f57bbd32ef11..3b79bd5c9c9d 100644
> --- a/drivers/tty/serial/8250/8250_dw.c
> +++ b/drivers/tty/serial/8250/8250_dw.c
> @@ -773,18 +773,18 @@ static const struct of_device_id dw8250_of_match[] = {
>  MODULE_DEVICE_TABLE(of, dw8250_of_match);
>  
>  static const struct acpi_device_id dw8250_acpi_match[] = {
> -	{ "INT33C4", 0 },
> -	{ "INT33C5", 0 },
> -	{ "INT3434", 0 },
> -	{ "INT3435", 0 },
> -	{ "80860F0A", 0 },
> -	{ "8086228A", 0 },
> -	{ "APMC0D08", 0},
> -	{ "AMD0020", 0 },
> -	{ "AMDI0020", 0 },
> -	{ "AMDI0022", 0 },
> -	{ "BRCM2032", 0 },
> -	{ "HISI0031", 0 },
> +	{ "INT33C4", (kernel_ulong_t)&dw8250_dw_apb },
> +	{ "INT33C5", (kernel_ulong_t)&dw8250_dw_apb },
> +	{ "INT3434", (kernel_ulong_t)&dw8250_dw_apb },
> +	{ "INT3435", (kernel_ulong_t)&dw8250_dw_apb },
> +	{ "80860F0A", (kernel_ulong_t)&dw8250_dw_apb },
> +	{ "8086228A", (kernel_ulong_t)&dw8250_dw_apb },
> +	{ "APMC0D08", (kernel_ulong_t)&dw8250_dw_apb},
> +	{ "AMD0020", (kernel_ulong_t)&dw8250_dw_apb },
> +	{ "AMDI0020", (kernel_ulong_t)&dw8250_dw_apb },
> +	{ "AMDI0022", (kernel_ulong_t)&dw8250_dw_apb },
> +	{ "BRCM2032", (kernel_ulong_t)&dw8250_dw_apb },
> +	{ "HISI0031", (kernel_ulong_t)&dw8250_dw_apb },
>  	{ },
>  };
>  MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match);
> 

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ