<div dir="auto">Ping? Might have ended in the spam bucket again...</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 22, 2022, 00:30 Yi-yo Chiang <<a href="mailto:yochiang@google.com">yochiang@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">`mount -o private mountpoint` should change the mount propagation type<br>of mountpoint to MS_PRIVATE. This didn't work because it falls into<br>the "read /etc/fstab" branch (one argument), and fails when mountpoint<br>is not found in the fstab, or fstab is not found (Android case).<br><br>`mount -o private blah mountpoint` kind of works, as long as `blah`<br>doesn't look like a directory, otherwise toybox would assume bind mount<br>and MS_BIND would win over MS_PRIVATE.<br><br>Even if `blah mountpoint` looks sufficient unlike a bind mount, the<br>underlying mount() syscall would be a bit off,<br> mount(blah, mountpoint, "ext3", MS_SILENT|MS_PRIVATE, "")<br><br>The "ext3" (or whatever comes first in /proc/filesystems) is because<br>unspecified `-t` defaults to `-t auto`, which means "try mount FS in<br>/proc/filesystems one-by-one", which is not what we want here. We don't<br>want to mount anything, but change an existing mountpoint's propagation<br>type.<br><br>This patch adds "mount -o private mountpoint" machinery and unit test.<br clear="all"><div><br></div>-- <br><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><table width="90%" border="0" cellspacing="0" cellpadding="0" style="margin:0px;padding:0px;font-family:"Times New Roman";max-width:348px"><tbody style="margin:0px;padding:0px"><tr style="margin:0px;padding:0px"><td style="padding:0px"><table border="0" cellspacing="0" cellpadding="0" style="margin:0px;padding:20px 0px 0px"><tbody style="margin:0px;padding:0px"><tr style="margin:0px;padding:0px"><td valign="top" style="padding:0px 20px 0px 0px;vertical-align:top;border-right:1px solid rgb(213,213,213)"><img src="https://i.imgur.com/eGpkLls.png" width="200" height="64"><br></td><td style="padding:0px 0px 0px 20px"><table border="0" cellspacing="0" cellpadding="0" style="margin:0px;padding:0px"><tbody style="margin:0px;padding:0px"><tr style="margin:0px;padding:0px"><td colspan="2" style="font-family:Arial,Helvetica,Verdana,sans-serif;padding:1px 0px 5px;font-size:13px;line-height:13px;color:rgb(56,58,53);font-weight:700">Yi-yo Chiang</td></tr><tr style="margin:0px;padding:0px"><td colspan="2" style="font-family:Arial,Helvetica,Verdana,sans-serif;padding:0px 0px 5px;font-size:11px;line-height:13px;color:rgb(56,58,53)">Software Engineer</td></tr><tr style="margin:0px;padding:0px"><td colspan="2" style="font-family:Arial,Helvetica,Verdana,sans-serif;padding:0px 0px 5px;font-size:11px;line-height:13px;color:rgb(56,58,53)"><a href="mailto:yochiang@google.com" target="_blank" rel="noreferrer">yochiang@google.com</a></td></tr><tr style="margin:0px;padding:0px"><td colspan="2" style="font-family:Arial,Helvetica,Verdana,sans-serif;padding:0px 0px 3px;font-size:11px;line-height:13px;color:rgb(3,112,248)"></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><div><font size="1">I support flexible work schedules, and I’m sending this email now because it is within the hours I’m working today. Please do not feel obliged to reply straight away - I understand that you will reply during the hours you work, which may not match mine.</font><br></div></div></div></div>
</blockquote></div>