[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/8] vl.c: numa_add(): Validate nodeid before us
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 5/8] vl.c: numa_add(): Validate nodeid before using it |
Date: |
Wed, 16 Jan 2013 10:23:42 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 01/16/2013 08:24 AM, Eduardo Habkost wrote:
> Without this check, QEMU will corrupt memory if a too-large nodeid is
> provided in the command-line. e.g.:
>
> -numa node,mem=...,cpus=...,nodeid=65
>
> This changes nodenr to unsigned long long, to avoid integer conversion
> issues when converting the strtoull() result to int.
>
> Signed-off-by: Eduardo Habkost <address@hidden>
> ---
> Changes v2:
> - Implement change without creation of numa_node_add() function
>
> + if (nodenr >= MAX_NODES) {
> + fprintf(stderr, "qemu: invalid NUMA nodeid: %d\n", nodenr);
%lld (I see you later fixed that in 6/8, but you should rebase that hunk
into the patch that first needs it).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
[Qemu-devel] [PATCH 3/8] vl.c: Abort on unknown -numa option type, Eduardo Habkost, 2013/01/16
[Qemu-devel] [PATCH 8/8] vl.c: validate -numa "cpus" parameter properly, Eduardo Habkost, 2013/01/16
[Qemu-devel] [PATCH 5/8] vl.c: numa_add(): Validate nodeid before using it, Eduardo Habkost, 2013/01/16
- Re: [Qemu-devel] [PATCH 5/8] vl.c: numa_add(): Validate nodeid before using it,
Eric Blake <=
[Qemu-devel] [PATCH 4/8] vl.c: Check for NUMA node limit inside numa_add(), Eduardo Habkost, 2013/01/16
Message not available
Message not available