[panda-users] Fwd: syscalls2 and reserved words

Manolis Stamatogiannakis mstamat at gmail.com
Mon Oct 14 13:06:07 EDT 2019


Just noticed that I had only responded to Laura and missed cc-ing the list.
I'm glad that we all came up with the same recommendation :-)

@Brendan: Is there a setting for the list to automatically add itself as
the reply-to address?

M.

---------- Forwarded message ---------
From: Manolis Stamatogiannakis <mstamat at gmail.com>
Date: Mon, 14 Oct 2019 at 13:59
Subject: Re: [panda-users] syscalls2 and reserved words
To: Mann, Laura L [US] (MS) <laura.mann at ngc.com>


"cpu" is reserved so that it doesn't conflict with the CPUState* cpu
argument we have in the plugin callback definitions.

I'm not sure about "data" though. It has been propagated forward from the
PANDA1 version of the script [1]. From what I can tell, we should be fine
if we remove it from the reserved words list - you can give it a try and
see if anything breaks.

On the other hand, reserved words are just prefixed with "_" if they occur
as argument names. So it should be harmless to list a word as reserved,
even if it doesn't cause any problems.

For the 64bit linux support you can probably ignore reserved words. If
there is a word that needs to be added, the compiler will be very vocal
reminding you :-)

M.

[1]
https://github.com/panda-re/panda/blob/cef777afb37a157582a26614eadec9bda399c4be/panda/plugins/syscalls2/syscall_parser.py

On Mon, 14 Oct 2019 at 13:17, Mann, Laura L [US] (MS) <laura.mann at ngc.com>
wrote:

> We’re looking at updating the syscalls2 plugin to work with 64-bit linux.
> There’s a list of “reserved” words in the syscall_parser.py file that is
> used to determine what system call argument names need to be renamed.  I
> understand why “new” and “int” are in the list – they are C/C++ reserved
> words.  But why are “cpu” and “data” in the list?  Under what definition of
> “reserved” words do they fall?
>
> There are some new system call argument names in the 64-bit system calls,
> and I want to ensure any which are “reserved” (under whatever definition is
> being used) are so indicated.
>
>
>
> Thanks,
>
> Laura L. Mann
>
>
> _______________________________________________
> panda-users mailing list
> panda-users at mit.edu
> http://mailman.mit.edu/mailman/listinfo/panda-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/panda-users/attachments/20191014/13dda9b7/attachment.html


More information about the panda-users mailing list