All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Kletzander <mkletzan@redhat.com>
To: Steve Grubb <sgrubb@redhat.com>
Cc: linux-audit@redhat.com
Subject: Re: What fields should be used for reporting shared memory?
Date: Mon, 20 Mar 2017 12:36:14 +0100	[thread overview]
Message-ID: <20170320113614.GS6248@wheatley> (raw)
In-Reply-To: <1547121.n0WsK5LWQM@x2>


[-- Attachment #1.1: Type: text/plain, Size: 2451 bytes --]

On Thu, Mar 16, 2017 at 09:04:52PM -0400, Steve Grubb wrote:
>Hello,
>
>I apologize for the delay.
>
>On Tuesday, March 14, 2017 7:42:27 AM EDT Martin Kletzander wrote:
>> I am going through the fields in the dictionary and I can't find any
>> name to use for the following scenario.
>>
>> We (libvirt) are running virtual machines and there's a thing nowadays,
>> that people like to use, called ivshmem (Inter-VM SHared MEMory).  From
>> host's point of view this is just a shared memory region accessed by
>> multiple VMs (and possibly to host as well).  The machine maps the
>> shared memory given a name (e.g. name "asdf" results in /dev/shm/asdf to
>> be mapped) *or* it can communicate with a server over UNIX socket and
>> that server handles interrupts and also tells the client which shared
>> memory region to map.
>
>If both of these result in a path, then I think we want to log it as a
>resource event.
>

Yes, and they both are resources in its sense. So you are talking
particularly about the resrc= field?  Should that also have category and
class or anything else set?  Or do you mean we report the path in the
resrc= field?

>> Talking about information we have; in server-less
>> setup it's the shared memory region that is shared, in the server
>> scenario it is the socket.  That's information we can output.
>
>Above you mentioned that the server communicates which region to map. Can you
>explain what that means?
>

The server sends a file descriptor to the VM over the socket, details
can be found here:

http://git.qemu-project.org/?p=qemu.git;a=blob;f=docs/specs/ivshmem-spec.txt#l151

>> So my question is, when starting a domain or hot-(un)plugging, what
>> naming should we use for this kind of device and what are the things
>> that we should describe about it?  Basically, how would you like the
>> message to look?
>
>We need a record recording what is getting assigned to the VM. In the case of
>the /dev/shm, you can record that as a path which must be escaped. In the case
>of the server, I think we still need to understand what is happening. Just
>recording a socket number or path is not terribly useful in reconstructing the
>resources given to the VM.
>
>Audit events have to tell a story. There is a subect, object, action, and
>results. It kind of needs to be a sentence. "libvirtd successfully assigned
>____ to vm-name."
>
>-Steve
>
>> Thanks in advance for any info.
>>
>> Have a nice day,
>> Martin
>
>

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2017-03-20 11:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14 11:42 What fields should be used for reporting shared memory? Martin Kletzander
2017-03-17  1:04 ` Steve Grubb
2017-03-20 11:36   ` Martin Kletzander [this message]
2017-03-20 22:21     ` Steve Grubb
2017-05-10 12:37       ` Martin Kletzander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170320113614.GS6248@wheatley \
    --to=mkletzan@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=sgrubb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.