Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp935713imu; Thu, 20 Dec 2018 07:36:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/UWXRF4tlr3j0fwaz8668T2tRlTx+SlBcY6XfqB5M64gGU17asvkaS6cX0Nrr902Z2BmQFD X-Received: by 2002:a63:4665:: with SMTP id v37mr7154652pgk.425.1545320198424; Thu, 20 Dec 2018 07:36:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545320198; cv=none; d=google.com; s=arc-20160816; b=W9VYvRx0iwwXDqgeOLk1jfPdDK5ZeLxNvcXuRCwmsYL4RgxRHPGbPAEE2+7SIicICb vrnLS4DIgSidfHSk5NREYdOy7ZHBAYEmvzllcU3bEVcUaJt9YCg+7mWFaJRjOoy0BgIw 5vnEDxWoWUvHLqpnTlKea9PP+etcdYvK6u3+Lh/QYI+T/HXyVsL6LyrdvHsN6wbeTalq qZTZFtIg7HlAUO9RXXbsVnjPrAazL6xIpcj3H92UWJe+Dz78PwiZkJBgOtrUyM/UjEYb lhA8G8JhciZvP5JiVCHqFnPZzI0aqOkbECtcwAwpQuvmAJymA0dJtcCku5w2l0z5rmEc jtHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=DgVSw7Y7zmF2FOtEGXtk0vSfyEz9/JSJIOaKQXO8u5k=; b=AVpoADHIXPad+fAqKq1+fAKzXnpA2+r355aa/UEW12KSZCOTMpswMqw4ns1s9aQn8/ WMtuXhEFescJQR3qaNZs+SyVC5FLiyZQu4MH6xf2jmIENbkLfzpoam6r7x/h/dv893PZ 9XTtZWc+8VsTuM2YBXAWBbq9uNeMslIDbSvY2y4veLT5V7CQtMAv3vroBXeu6D+YO+BA QBnvM+INpptftyDaQ5pUK6t0YDJrNLtTwitHZAO39eczlTkLcn0SiU2vzi/ZIHPw5SGJ vbaTTE707E1w9v2yaEEaMsbe2ZfmWtci7ihqQc4Ws7GoJ7ghk3DGbjZ1DOYxOVjh/Ctn SbXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c191si2488127pfg.72.2018.12.20.07.36.20; Thu, 20 Dec 2018 07:36:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731267AbeLTMJE (ORCPT + 99 others); Thu, 20 Dec 2018 07:09:04 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:39005 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729246AbeLTMJE (ORCPT ); Thu, 20 Dec 2018 07:09:04 -0500 Received: by mail-qt1-f193.google.com with SMTP id n21so1467061qtl.6; Thu, 20 Dec 2018 04:09:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DgVSw7Y7zmF2FOtEGXtk0vSfyEz9/JSJIOaKQXO8u5k=; b=g+2J6LmkrSnPRnf9Lk3GShjhPmldLbMnd9Q6GQc3VTxLFkMrORlLAn3qc2HcDxH5tA zTzoni0o0b6w/J2IYqkQIh86UKFV7mNMZnbJfJuTPHrcWiXRDdwKv2WrS12+8t4FkI5V o3pSabscSaZg/VIyPVrepISrJ0uGSBLa3hljgrNnkkFSiVg4XM3VmuG2ZIEvWMBRVxMy ztnFoTep55AqKqTkaWe+urjCvLt7Ws7LTAXcYxk4UyN8b21eC+J45kjIt9aYgXCzupmG SyyBnds6VK8Gx8u1MRZqjuaK7XEeiZUxN1/imohhZjCmnLLLjxsOoOkKDEF33R3jCB8/ 5ymQ== X-Gm-Message-State: AA+aEWYRIBx8d2Yx0og00GhtLH2uZN+ffMA+qS+BOZDBf87iQ2syxLyW Qhd0oQUCJCn8ij420oG7zpJIFs63coVMj0JoUAU= X-Received: by 2002:ac8:7451:: with SMTP id h17mr25245792qtr.319.1545307743542; Thu, 20 Dec 2018 04:09:03 -0800 (PST) MIME-Version: 1.0 References: <20181214215729.4221-1-sean.j.christopherson@intel.com> <7706b2aa71312e1f0009958bcab24e1e9d8d1237.camel@linux.intel.com> <598cd050-f0b5-d18c-96a0-915f02525e3e@fortanix.com> In-Reply-To: <598cd050-f0b5-d18c-96a0-915f02525e3e@fortanix.com> From: Arnd Bergmann Date: Thu, 20 Dec 2018 13:08:46 +0100 Message-ID: Subject: Re: x86/sgx: uapi change proposal To: jethro@fortanix.com Cc: Jarkko Sakkinen , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "the arch/x86 maintainers" , Dave Hansen , Peter Zijlstra , sean.j.christopherson@intel.com, "H. Peter Anvin" , Linux Kernel Mailing List , linux-sgx@vger.kernel.org, Andy Lutomirski , Josh Triplett , haitao.huang@linux.intel.com, greg@enjellic.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 19, 2018 at 10:26 AM Jethro Beekman wrote: > > On 2018-12-19 13:28, Jarkko Sakkinen wrote: > > /** > > * struct sgx_enclave_add_page - parameter structure for the > > * %SGX_IOC_ENCLAVE_ADD_PAGE ioctl > > * @eclave_fd: file handle to the enclave address space > > * @src: address for the page data > > * @secinfo: address for the SECINFO data > > * @mrmask: bitmask for the measured 256 byte chunks > > */ > > struct sgx_enclave_add_page { > > __u64 enclave_fd; > > __u64 src; > > __u64 secinfo; > > __u16 mrmask; > > } __attribute__((__packed__)); > > Wouldn't you just pass enclave_fd as the ioctl fd parameter? > > How to specify the address of the page that is being added? One more comment about the structure: I would generally recommend against packing structures like this. Instead just extend the mrmask member to 64 bits as well. Arnd