Can we make renames work?

Seth Arnold seth.arnold at canonical.com
Sat May 23 00:13:12 UTC 2015


On Wed, May 20, 2015 at 03:19:14PM +0100, Iain Lane wrote:
> Can anyone think of a way to fix this class of problem and remove the
> need for us to have to go and patch code? Or at least to detect these

I'd like to see a solution that doesn't involve all the bindmounts.
I think it's worth exploring other options before we're too far wedded
to the forest of bindmounts.

> rename failures (check for EROFS) and aggregate them somewhere so that
> they can be fixed. This is on touch - I'm not sure if snappy does
> anything different here.

Two approaches come to mind:

- Use systemcall auditing via auditd. You can specify the rename,
  renameat, and renameat2 systemcalls, and select only the ones with
  exit=-EROFS. I'm not positive you can get the filenames. The rules may
  require tailoring based on the architecture being used (so amd64 might
  require different rules than armhf.)

  See the audit.rules(7) manpage for details.

- Use kprobes or ftrace to log information about the kernel calls. There
  may not be a convenient way to log both the error and the arguments, but
  it might be worth defining new trace points to help. (See e.g. kernel
  source include/trace/events/ and Documentation/trace/)

Sorry I don't have something handy to copy-and-paste but hopefully one
will provide a way to look for these issues sytematically.

Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20150522/1160c524/attachment.pgp>


More information about the snappy-devel mailing list