Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1388702

Re: [PATCH 3/6] intel_sgx: driver for Intel Secure Guard eXtensions

From Jethro Beekman <kernel@jbeekman.nl>
Newsgroups linux.kernel
Subject Re: [PATCH 3/6] intel_sgx: driver for Intel Secure Guard eXtensions
Date 2016-04-27 09:00 +0200
Message-ID <rsrC2-520-11@gated-at.bofh.it> (permalink)
References <rrSEj-1jR-33@gated-at.bofh.it> <rrSEj-1jR-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 25-04-16 10:34, Jarkko Sakkinen wrote:
> diff --git a/drivers/staging/intel_sgx/isgx_ioctl.c
b/drivers/staging/intel_sgx/isgx_ioctl.c
> new file mode 100644
> index 0000000..9d8b36b
> --- /dev/null
> +++ b/drivers/staging/intel_sgx/isgx_ioctl.c
>
> +static long isgx_ioctl_enclave_create(struct file *filep, unsigned int cmd,
> + unsigned long arg)
>
> + secs->base = vm_mmap(filep, 0, secs->size,
> + PROT_READ | PROT_WRITE | PROT_EXEC,
> + MAP_SHARED, 0);

Why does the ioctl interface map userspace memory for an open device? There's
already a perfectly good syscall for that: mmap.

> diff --git a/drivers/staging/intel_sgx/isgx_user.h b/drivers/staging/intel_sgx/isgx_user.h
> new file mode 100644
> index 0000000..672d19c
> --- /dev/null
> +++ b/drivers/staging/intel_sgx/isgx_user.h
> 
> +#define SGX_ADD_SKIP_EEXTEND 0x1
> +
> +struct sgx_add_param {
> +	unsigned long		addr;
> +	unsigned long		user_addr;
> +	struct isgx_secinfo	*secinfo;
> +	unsigned int		flags;
> +};

The hardware supports calling EEXTEND on only a part of a page, I think the
driver should also support that.

Jethro

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/6] Intel Secure Guard Extensions Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-04-25 19:40 +0200
  [PATCH 5/6] intel_sgx: driver documentation Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-04-25 19:40 +0200
    Re: [PATCH 5/6] intel_sgx: driver documentation Andy Lutomirski <luto@kernel.org> - 2016-04-25 22:10 +0200
  Re: [PATCH 0/6] Intel Secure Guard Extensions Greg KH <gregkh@linuxfoundation.org> - 2016-04-25 20:00 +0200
    Re: [PATCH 0/6] Intel Secure Guard Extensions Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-04-25 21:10 +0200
      Re: [PATCH 0/6] Intel Secure Guard Extensions Andy Lutomirski <luto@amacapital.net> - 2016-04-25 21:30 +0200
  Re: [PATCH 3/6] intel_sgx: driver for Intel Secure Guard eXtensions Greg KH <gregkh@linuxfoundation.org> - 2016-04-25 20:00 +0200
    Re: [PATCH 3/6] intel_sgx: driver for Intel Secure Guard eXtensions Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-04-25 21:10 +0200
  Re: [PATCH 0/6] Intel Secure Guard Extensions Andy Lutomirski <luto@amacapital.net> - 2016-04-26 21:10 +0200
    Re: [PATCH 0/6] Intel Secure Guard Extensions Pavel Machek <pavel@ucw.cz> - 2016-04-26 21:50 +0200
      Re: [PATCH 0/6] Intel Secure Guard Extensions Andy Lutomirski <luto@amacapital.net> - 2016-04-26 22:00 +0200
        Re: [PATCH 0/6] Intel Secure Guard Extensions One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-04-26 22:20 +0200
        Re: [PATCH 0/6] Intel Secure Guard Extensions Pavel Machek <pavel@ucw.cz> - 2016-04-26 22:20 +0200
          Re: [PATCH 0/6] Intel Secure Guard Extensions One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-04-26 23:10 +0200
            Re: [PATCH 0/6] Intel Secure Guard Extensions Pavel Machek <pavel@ucw.cz> - 2016-04-27 00:00 +0200
              Re: [PATCH 0/6] Intel Secure Guard Extensions Andy Lutomirski <luto@amacapital.net> - 2016-04-27 00:40 +0200
          Re: [PATCH 0/6] Intel Secure Guard Extensions Andy Lutomirski <luto@amacapital.net> - 2016-04-27 00:40 +0200
            Re: [PATCH 0/6] Intel Secure Guard Extensions Pavel Machek <pavel@ucw.cz> - 2016-04-27 09:40 +0200
            Re: [PATCH 0/6] Intel Secure Guard Extensions Ingo Molnar <mingo@kernel.org> - 2016-04-27 10:20 +0200
              Re: [PATCH 0/6] Intel Secure Guard Extensions Andy Lutomirski <luto@amacapital.net> - 2016-04-27 16:10 +0200
      Re: [PATCH 0/6] Intel Secure Guard Extensions One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-04-26 22:30 +0200
  Re: [PATCH 0/6] Intel Secure Guard Extensions Pavel Machek <pavel@ucw.cz> - 2016-04-26 21:10 +0200
  Re: [PATCH 3/6] intel_sgx: driver for Intel Secure Guard eXtensions Jethro Beekman <kernel@jbeekman.nl> - 2016-04-27 09:00 +0200
    Re: [PATCH 3/6] intel_sgx: driver for Intel Secure Guard eXtensions Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-04-27 14:50 +0200
      Re: [PATCH 3/6] intel_sgx: driver for Intel Secure Guard eXtensions Jethro Beekman <kernel@jbeekman.nl> - 2016-04-28 01:40 +0200

csiph-web