[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH qemu v2] spapr: Kill SLOF
From: |
Alexey Kardashevskiy |
Subject: |
Re: [PATCH qemu v2] spapr: Kill SLOF |
Date: |
Tue, 7 Jan 2020 15:44:35 +1100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 |
On 06/01/2020 15:19, David Gibson wrote:
>> +
>> +static uint32_t client_package_to_path(const void *fdt, uint32_t phandle,
>> + uint32_t buf, uint32_t len)
>> +{
>> + char tmp[256];
>
> Fixed sized buffers are icky. You could either dynamically allocate
> this based on the size the client gives, or you could use
> memory_region_get_ram_ptr() to read the data from the tree directly
> into guest memory.
@len comes from the guest, I am really not comfortable with allocating
whatever (broken) guest requested. And if I limit @len by 1024 or
similar, then a fixed size buffer will do too, no?
btw how exactly can I use memory_region_get_ram_ptr()?
get_system_memory() returns a root MR which is not RAM, RAM is a
"spapr.ram" sub-MR.
--
Alexey
- Re: [PATCH qemu v2] spapr: Kill SLOF, (continued)
- Re: [PATCH qemu v2] spapr: Kill SLOF, David Gibson, 2020/01/07
- Re: [PATCH qemu v2] spapr: Kill SLOF, Alexey Kardashevskiy, 2020/01/07
- Re: [PATCH qemu v2] spapr: Kill SLOF, David Gibson, 2020/01/08
- Re: [PATCH qemu v2] spapr: Kill SLOF, Alexey Kardashevskiy, 2020/01/09
- Re: [PATCH qemu v2] spapr: Kill SLOF, David Gibson, 2020/01/12
Re: [PATCH qemu v2] spapr: Kill SLOF, Alexey Kardashevskiy, 2020/01/06
Re: [PATCH qemu v2] spapr: Kill SLOF,
Alexey Kardashevskiy <=
Re: [PATCH qemu v2] spapr: Kill SLOF, David Gibson, 2020/01/08