Skip to content

BUG: python comment incorrectly lists the MASKED_EQ mask as "datum_b" #119

@flx42

Description

@flx42

From here:

MASKED_EQ - (arg & datum_b) == datum_a

My line of thought is the following, from the manual:

SCMP_CMP(
.I arg
, SCMP_CMP_MASKED_EQ ,
.I mask
,
.I datum
)

And the arguments from SCMP_CMP fill up this struct:

struct scmp_arg_cmp {
unsigned int arg; /**< argument number, starting at 0 */
enum scmp_compare op; /**< the comparison op, e.g. SCMP_CMP_* */
scmp_datum_t datum_a;
scmp_datum_t datum_b;
};

In addition:

libseccomp/src/db.c

Lines 1867 to 1869 in 8ad3638

case SCMP_CMP_MASKED_EQ:
chain[arg_num].mask = arg_data.datum_a;
chain[arg_num].datum = arg_data.datum_b;

So mask == datum_a, no? So is the Python comment invalid or am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions