Skip to content

madvise needs to page-alligned memory pointer #110

@user-none

Description

@user-none

According to the man page (http://man7.org/linux/man-pages/man2/madvise.2.html) for madvise under "Linux notes"

The Linux implementation requires that the address addr be page-aligned...

In utils/s2n_mem.c madvise is called:

madvise(b->data, size, MADV_DONTDUMP)

(b->)data is created using realloc, witch does not guarantee page alignment.

Further the man page says the following errno will be returned in the following situation:

EINVAL addr is not page-aligned or length is negative.

The current implementation can fail on Linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions