From patchwork Fri Feb 15 20:24:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 158545 Delivered-To: patches@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1112743jaa; Fri, 15 Feb 2019 12:24:16 -0800 (PST) X-Received: by 2002:a17:902:5a8d:: with SMTP id r13mr12050437pli.190.1550262256016; Fri, 15 Feb 2019 12:24:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550262256; cv=none; d=google.com; s=arc-20160816; b=qvDLkisB3k+IlUSTlshK4qKG1jBojtyS/o3sPIffVibioXVh6xg9MwfM4oaW9DXBa3 KXIFQIwopu1BJhPVIOYy9BkQlkZwnF+LhSEVeglvAzJ4S5eNUg6bujvM0p9/9H6EvnjI Fh5s0PsDoBh8N+OzrOM9ZZl++iRQRzfox9eSOGXz/4grU/PKg3j8D7lEYldguxNALA0d D0L1B+Ow5RBQgXbUUnkPmpZ7hlF6IBrAR/FOSRY6gYCUs8VxbANh5cETE+P1x+W4qkeA xIuw/IC70/MON7dP6Qx0OQGO+QIoBakhFh2QOWCg7TdB/j5vfoRVOjU3S/LwlFLYhyCr jiIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=LamQ54kVZjG48WaTIUkT/9kd7y0axdOv0sLcyu9DjBY=; b=CDkXx6DSxQav+kNs8QQld5za6E6IozKK/2NiKaCB4PbjZUZYYRYsk9A0ea/NN6fKNH at226LuBjvoU9JJpkoogqbsbXiNRq8OsFUzbRUEvEpNMTDPMWHkTNhu7jDoApUUAXhbF U2jNhwrRvVPcVTSEojVxYSDdxfHlhFUA1/Jp38vDChpojJiAss1UHWvdl4Aw8Iieduya sg7Nfu8SyGbrBPYzD7DxBHX/Mtq/Vk4UJHB300AsLyzksY8zKBG0BFGmk4Fa/BJjSXhy l9iTywrcI4fkHsU1gGLRA/oxEjoL/+MKao3FUdltwSaZ0a6MFfOIxtiVdjFWa9tNAndU N1Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yliwTcWn; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id y191sor3561652pgd.38.2019.02.15.12.24.15 for (Google Transport Security); Fri, 15 Feb 2019 12:24:15 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yliwTcWn; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=LamQ54kVZjG48WaTIUkT/9kd7y0axdOv0sLcyu9DjBY=; b=yliwTcWnjTtwiuoABaiwKz5nqztV1ntGGYr7LSaZlbez+7P1axEWd0afoolC81BUKN f6Zx8Ye94Qoe0x3zkjsiE7eOYSgwBLP95lMAyf9LWiFMBfbN7LWF20EHY8+jK+IuqVKO RbmkBaftIXuKDnDmnynIOpZmT/ls6YTz6EN9nuDTJwT0olYfHGFQZdHejWdz6ijPersq w0QWSU6KByNAQbwVZRWbZe4ZfekjHBxGiLMCQepvwU/2hVi8WrRa0wQJyNbLUMg9Dfij vwLb10g+QAXfiOuXF16FRbJK9eReAplLKMtZQG03pPMcEDWpAaGKKrJK0aYjqZhjBnw5 W4Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=LamQ54kVZjG48WaTIUkT/9kd7y0axdOv0sLcyu9DjBY=; b=oAGQuvmsFVmKouauxH8gsJfMfnRNDAab6nbDXXezfy3rhzPUlKyzmf0P7Dzi32Y7PS UdwQuCajFNAWH0fsHRU46oX9kt7x8b+76WFHFsH18E2bIwHmeExZJdD2mJqnu8yCPoJP hZMEMK2IaYyMIObu/uk0NbJiqM8qJiX7NpFceGiiPuDWrJaoeUekZ5BMtPxDjpzQPxL8 d9srKuAKY+XYixuDfQOjTqJHjLQb3fBu4X2rlUwhNK1cH2+0AQKsYaUpZ990Sqvhgx85 bnWpoUyo5keV/bPaChNcp+6h0+fGsPDgowutiKn2/lIh3aLVH89wnGoWdVqgZfap0t5s 8hyw== X-Gm-Message-State: AHQUAuYDqsnJl1kruGifZeJciD8o0kuWyYR3WVd1oMnyzoRy1C9K+8Dh Z46s/GKYAvQY2anxB2XUPt8tKqiXDTjqaA== X-Google-Smtp-Source: AHgI3IbnFNCcHtUKgvTxktlLqhWeAB1xUeuLL8/eT0bp0nFttVK0GO40cIUWedWzKNsdVcSXs88Z/w== X-Received: by 2002:a63:5462:: with SMTP id e34mr6522672pgm.97.1550262255412; Fri, 15 Feb 2019 12:24:15 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id l2sm7593340pgn.52.2019.02.15.12.24.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Feb 2019 12:24:14 -0800 (PST) From: John Stultz To: Laura Abbott Cc: John Stultz , Sumit Semwal , Liam Mark , Brian Starkey , "Andrew F . Davis" , Alistair Strachan , dri-devel@lists.freedesktop.org Subject: [EARLY RFC][PATCH 0/4] ION per heap devices Date: Fri, 15 Feb 2019 12:24:08 -0800 Message-Id: <1550262252-15558-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 This is a *very early RFC* (it builds, that's all I'll say :) but I wanted to share it to get some initial feedback before I go down the rabit hole of trying to adapt the Android userland code to get this fully validated. This patchset tries to implement the per-heap devices for ION. The main benefit is that it avoids multiplexing heap operations through the /dev/ion interface, and allows for each heap to have its own permissions/sepolicy rules. Feedback would be greatly appreciated! thanks -john Cc: Laura Abbott Cc: Sumit Semwal Cc: Liam Mark Cc: Brian Starkey Cc: Andrew F. Davis Cc: Alistair Strachan Cc: dri-devel@lists.freedesktop.org John Stultz (4): ion: Add ION_VERSION ioctl ion: Initial hack to create per heap devices ion: Add HEAP_INFO ioctl to be able to fetch heap type ion: Make "legacy" /dev/ion support optional drivers/staging/android/ion/Kconfig | 7 +++ drivers/staging/android/ion/ion-ioctl.c | 80 +++++++++++++++++++++++++++++++++ drivers/staging/android/ion/ion.c | 51 ++++++++++++++++----- drivers/staging/android/ion/ion.h | 6 +++ drivers/staging/android/uapi/ion.h | 57 +++++++++++++++++++++++ 5 files changed, 191 insertions(+), 10 deletions(-) -- 2.7.4