Commit 1e1bc76
rutabaga: do not rely on seals to detect read-only shm fds
Some compositors send read-only but not sealed memfds (at least wlroots
does so for dmabuf feedback), so seal-based permission detection would
result in mapping RO memory as RW and the guest application crashing.
Fix by properly checking the access mode. Keep seal detection because
e.g. Smithay based compositors do send O_RDWR but write-sealed memfds.
Upstream rutabaga does not do any detection yet, but defaults to RO
for all shm/memfd (!!) and RW for dmabuf.
Signed-off-by: Val Packett <val@invisiblethingslab.com>1 parent 285551f commit 1e1bc76
1 file changed
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1122 | 1122 | | |
1123 | 1123 | | |
1124 | 1124 | | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
1125 | 1136 | | |
1126 | 1137 | | |
1127 | 1138 | | |
1128 | 1139 | | |
1129 | | - | |
| 1140 | + | |
| 1141 | + | |
1130 | 1142 | | |
1131 | 1143 | | |
1132 | 1144 | | |
1133 | | - | |
| 1145 | + | |
1134 | 1146 | | |
1135 | 1147 | | |
1136 | 1148 | | |
| |||
1156 | 1168 | | |
1157 | 1169 | | |
1158 | 1170 | | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
| 1171 | + | |
1163 | 1172 | | |
1164 | 1173 | | |
1165 | 1174 | | |
| |||
0 commit comments