lkml.org 
[lkml]   [2013]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] virtio_pci: fix macro exported in uapi
Date
David Howells <dhowells@redhat.com> writes:
> Rusty Russell <rusty@rustcorp.com.au> wrote:
>
>> Macro still isn't usable, because userspace can't know whether it's the
>> new or old.
>>
>> We need to either remove it from UAPI, or rename it to
>> VIRTIO_PCI_CONFIG_OFF.
>
> Surely, if userspace is using it as is, you can't remove it, rename it or
> alter it?

The point of the patch is that it's unusable:

#define VIRTIO_PCI_CONFIG(dev) ((dev)->msix_enabled ? 24 : 20)

ie. it's accessing a member of the kernel's virtio_pci_dev structure.

In theory, userspace could have a structure with the same field and be
using it now, but that's unlikely (qemu certainly doesn't). No harm no
foul.

In theory it's actually a useful macro, so we could expose it to
userspace, but we'd need to have a new name so userspace can #ifdef for
older headers...

Hope that clarifies,
Rusty.


\
 
 \ /
  Last update: 2013-05-20 05:01    [W:0.049 / U:1.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site