{"push_id":2974723477,"size":2,"distinct_size":2,"ref":"refs/heads/2018-10-18/ms_rec_rdonly","head":"3884a698a6186e2cc6f8b1c61f70e3ce664b83a7","before":"830d3c325f1e6a70108871151d8127022c192f82","commits":[{"sha":"cec913306fb1f68bafeaa9655110b65aeafe11f7","author":{"name":"Christian Brauner","email":"2314b2e3a4a1f7db165be2aafbf1efd78f28cc97@brauner.io"},"message":"[RFC]: fs/namespace: enable recursive ro bind-mounts\n\nIn userspace there is often a need to atomically create a recursive\nread-only bind-mount of a whole mount tree at another location to prevent\nraces between creating the rbind and mounting all mounts in the tree\nread-only. But currently\n\nmount -o rbind,ro /sys /mnt\n\nwill not have any effect.\n\nIn fact, the mount(2) tool currently does\n\nmount(\"/sys\", \"/mnt\", 0x5572c334ec80, MS_MGC_VAL|MS_RDONLY|MS_BIND|MS_REC, NULL) = 0\nmount(\"none\", \"/mnt\", NULL, MS_RDONLY|MS_REMOUNT|MS_BIND|MS_REC, NULL) = 0\n\nnnd assumes this will cause the whole tree to become read-only when in\nreality it does not.\nThis commit makes it possible to create recursive read-only bind mounts in\na race free way by using the newly introduced MS_REC_RDONLY flag.\n\nAcked-by: Serge Hallyn <serge@hallyn.com>\nSigned-off-by: Christian Brauner <christian@brauner.io>","distinct":true,"url":"https://api.github.com/repos/brauner/linux/commits/cec913306fb1f68bafeaa9655110b65aeafe11f7"},{"sha":"3884a698a6186e2cc6f8b1c61f70e3ce664b83a7","author":{"name":"Christian Brauner","email":"2314b2e3a4a1f7db165be2aafbf1efd78f28cc97@brauner.io"},"message":"[RFC]: fs/namespace: enable recursive ro bind-remounts\n\nUserspace tools often need to atomically remount a whole mount tree\nread-only. This is currently not possible.\nCurrently MS_REC | MS_REMOUNT | MS_RDONLY requests will only mount the\ntopmost mount read-only but leave all other mounts in the tree\nunchanged.\n\nThis behavior is very unexpected and has caused several security sensitive\nissues. Just recently it was discovered that all read-only rootfs mounts in\nrunC [1] are actually not made read-only because it relies on the\ncombination of exactly these three flags.\nThis patch enables recursive read-only remounts via the newly introduced\nMS_REC_RDONLY flag.\n\n[1]: https://github.com/moby/moby/issues/37838\n\nAcked-by: Serge Hallyn <serge@hallyn.com>\nSigned-off-by: Christian Brauner <christian@brauner.io>","distinct":true,"url":"https://api.github.com/repos/brauner/linux/commits/3884a698a6186e2cc6f8b1c61f70e3ce664b83a7"}]}
{"actor":{"display_login":"brauner"}}