zfs_ioc_channel_program with hidden_args returns ZFS_ERR_IOC_ARG_UNAVAIL
If you attempt to run a ZFS channel program which is given
hidden_args in the argument nvlist for the Lua program, the code in
lzc_channel_program_impl pulls the
hidden_args out into a top-level key of the ioctl nvlist. This is meant to keep the values out of the SPA history log (e.g. for secret key data when manipulating encrypted datasets).
The code in
zfs_ioc_channel_program understands how to look for this extra key and use it, but it was never added to the
zfs_ioc_key_t for the ioctl (
zfs_keys_channel_program). This means that when
zfs_check_input_nvpairs processes an ioctl with this key actually set in the top-level nvlist, it rejects it, returning errno 1034 (
This makes the
hidden_args feature rather challenging to use.