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:   Wed, 2 Sep 2020 12:48:40 +0100
From:   Colin Ian King <colin.king@...onical.com>
To:     David Laight <David.Laight@...LAB.COM>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:     Len Brown <lenb@...nel.org>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH] ACPI: sysfs: copy ACPI data using io memory copying

On 02/09/2020 12:13, David Laight wrote:
> From: Colin Ian King
>> Sent: 02 September 2020 11:27
>>
>> On 14/03/2020 10:23, Rafael J. Wysocki wrote:
>>> On Thursday, March 12, 2020 12:13:45 PM CET Colin King wrote:
>>>> From: Colin Ian King <colin.king@...onical.com>
>>>>
>>>> Reading ACPI data on ARM64 at a non-aligned offset from
>>>> /sys/firmware/acpi/tables/data/BERT will cause a splat because
>>>> the data is I/O memory mapped and being read with just a memcpy.
>>>> Fix this by introducing an I/O variant of memory_read_from_buffer
>>>> and using I/O memory mapped copies instead.
> ..
>>>> +/**
>>>> + * memory_read_from_io_buffer - copy data from a io memory mapped buffer
>>>> + * @to: the kernel space buffer to read to
>>>> + * @count: the maximum number of bytes to read
>>>> + * @ppos: the current position in the buffer
>>>> + * @from: the buffer to read from
>>>> + * @available: the size of the buffer
>>>> + *
>>>> + * The memory_read_from_buffer() function reads up to @count bytes from the
>>>> + * io memory mappy buffer @from at offset @ppos into the kernel space address
>>>> + * starting at @to.
>>>> + *
>>>> + * On success, the number of bytes read is returned and the offset @ppos is
>>>> + * advanced by this number, or negative value is returned on error.
>>>> + **/
> 
> Apart from the return value how is this different from the generic
> memcpy_from_io() ?
> 
> 	David


The intention is to be semantically the same as
memory_read_from_buffer(), so in that respect quite a bit different from
memcpy_fromio()

Colin

> 
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ