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] [day] [month] [year] [list]
Date:   Fri, 4 May 2018 13:33:35 +0100
From:   John Garry <john.garry@...wei.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        <xuwei5@...wei.com>, <mika.westerberg@...ux.intel.com>,
        <lee.jones@...aro.org>
CC:     <rjw@...ysocki.net>, <linux-kernel@...r.kernel.org>,
        <arnd@...db.de>, <graeme.gregory@...aro.org>, <helgaas@...nel.org>,
        <z.liuxinliang@...ilicon.com>, <linuxarm@...wei.com>
Subject: Re: [PATCH 2/2] HISI LPC: Add ACPI UART support

On 03/05/2018 17:56, Andy Shevchenko wrote:
> On Thu, 2018-05-03 at 23:08 +0800, John Garry wrote:
>> On the Huawei D03 development board the system UART is
>> the UART connected on the LPC bus.
>>
>> The profile for the device driver required for this HW
>> would be as follows:
>> - platform driver
>> - supports 16550
>> - supports ACPI
>> - supports polling mode
>> - supports IO space
>>
>> In principle we should use the PNP driver (8250_dw.c) for
>> 8250-devices with ACPI FW. However since this host driver
>> does not support PNP devices, and modifying the PNP core
>> code to support it is not worth the effort, use the generic
>> 8250 isa driver.
>>
>> For this, we need to setup the MFD cell platform data for
>> a serial 8250 Port.
>>
>> In addition to this change, we also make the following
>> changes:
>> - set child ACPI device as enumerated. This fixes a conflict
>>   in serdev setup for the UART
>> - use platform device ID auto for creating the uart child
>>   platform device to avoid conflict with platform devices
>>   created for serial8250_isa_devs from 8250_core.c
>

Hi Andy,

>> +	mfd_cell->platform_data = devm_kmemdup(hostdev, &ref_port,
>> +					       sizeof(ref_port),
>> GFP_KERNEL);
>
> Isn't this done by MFD core?

It does, but what we are copying from is on the stack and could be 
overwritten by the point we call the mfd_add_devices(). But this could 
be improved.

BTW, As seen in other discussion, future of MFD usage is in doubt, so 
all this may be dropped.

Thanks very much,
John

>
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ