linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ubifs: allow encryption ioctls in compat mode
@ 2016-12-19 19:12 Eric Biggers
  2016-12-19 19:56 ` Richard Weinberger
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Biggers @ 2016-12-19 19:12 UTC (permalink / raw)
  To: linux-mtd
  Cc: Richard Weinberger, Artem Bityutskiy, Adrian Hunter,
	linux-fsdevel, Eric Biggers

From: Eric Biggers <ebiggers@google.com>

The ubifs encryption ioctls did not work when called by a 32-bit program
on a 64-bit kernel.  Since 'struct fscrypt_policy' is not affected by
the word size, ubifs just needs to allow these ioctls through, like what
ext4 and f2fs do.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 fs/ubifs/ioctl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/ubifs/ioctl.c b/fs/ubifs/ioctl.c
index 78d7136..da519ba 100644
--- a/fs/ubifs/ioctl.c
+++ b/fs/ubifs/ioctl.c
@@ -217,6 +217,9 @@ long ubifs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	case FS_IOC32_SETFLAGS:
 		cmd = FS_IOC_SETFLAGS;
 		break;
+	case FS_IOC_SET_ENCRYPTION_POLICY:
+	case FS_IOC_GET_ENCRYPTION_POLICY:
+		break;
 	default:
 		return -ENOIOCTLCMD;
 	}
-- 
2.8.0.rc3.226.g39d4020


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ubifs: allow encryption ioctls in compat mode
  2016-12-19 19:12 [PATCH] ubifs: allow encryption ioctls in compat mode Eric Biggers
@ 2016-12-19 19:56 ` Richard Weinberger
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Weinberger @ 2016-12-19 19:56 UTC (permalink / raw)
  To: Eric Biggers, linux-mtd
  Cc: Artem Bityutskiy, Adrian Hunter, linux-fsdevel, Eric Biggers

On 19.12.2016 20:12, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> The ubifs encryption ioctls did not work when called by a 32-bit program
> on a 64-bit kernel.  Since 'struct fscrypt_policy' is not affected by
> the word size, ubifs just needs to allow these ioctls through, like what
> ext4 and f2fs do.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
>  fs/ubifs/ioctl.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/fs/ubifs/ioctl.c b/fs/ubifs/ioctl.c
> index 78d7136..da519ba 100644
> --- a/fs/ubifs/ioctl.c
> +++ b/fs/ubifs/ioctl.c
> @@ -217,6 +217,9 @@ long ubifs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
>  	case FS_IOC32_SETFLAGS:
>  		cmd = FS_IOC_SETFLAGS;
>  		break;
> +	case FS_IOC_SET_ENCRYPTION_POLICY:
> +	case FS_IOC_GET_ENCRYPTION_POLICY:
> +		break;

Whoops, since I tested most of the time on an ARM board, this was unnoticed. :-D

Thanks,
//richard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-19 19:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-19 19:12 [PATCH] ubifs: allow encryption ioctls in compat mode Eric Biggers
2016-12-19 19:56 ` Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).