diff options
author | Matan Barak <matanb@mellanox.com> | 2016-04-14 16:52:10 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-05-13 19:40:03 -0400 |
commit | 6cbac1e4cd0e0110b4be38c201fc055249dfd365 (patch) | |
tree | d361a3fe422482b0a0876cab0362ca7084a73d27 /arch | |
parent | ee71b9681df6b71b7fa110d42200bec05dfaf19a (diff) | |
download | blackbird-obmc-linux-6cbac1e4cd0e0110b4be38c201fc055249dfd365.tar.gz blackbird-obmc-linux-6cbac1e4cd0e0110b4be38c201fc055249dfd365.zip |
IB/mlx5: Allow mapping the free running counter on PROT_EXEC
The current mlx5 code disallows mapping the free running counter of
mlx5 based hardwares when PROT_EXEC is set.
Although this behaviour is correct, Linux does add an implicit VM_EXEC
to the vm_flags if the READ_IMPLIES_EXEC bit is set in the process
personality. This happens for example if the process stack is
executable.
This causes libmlx5 to output a warning and prevents the user from
reading the free running clock.
Executing the init segment of the hardware isn't a security risk
(at least no more than executing a process own stack), so we just
prevent writes to there.
Fixes: d69e3bcf7976 ('IB/mlx5: Mmap the HCA's core clock register to
user-space')
Signed-off-by: Matan Barak <matanb@mellanox.com>
Reviewed-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions