Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp870757imj; Fri, 15 Feb 2019 08:09:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IaDIa+2K9U0xZPt/9ga3fQXJjyfRa2Xu64Bv+7ezEoKhgQXfpT214OF/REmAq7T7pJN18aw X-Received: by 2002:a63:68c9:: with SMTP id d192mr6241122pgc.264.1550246972682; Fri, 15 Feb 2019 08:09:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550246972; cv=none; d=google.com; s=arc-20160816; b=bS+Mvebr4OWta/lAZWM1TKvq5C2qT7G25olH1333BFunCCwOdNDk3ndgjBabWiGDYG m8BbIAPU9E4WdJn8V5zzlkt7nO+27pGFmVbDkfny4A6rFaT8YdH0/f7I43M1ZgENaN8I /622MA3tcpNA4yF/cI6qHEnkgP9Uk4VFdZEzUnHpy9D6TSinQt/vi24Hqbr8Vsm8cJp8 jUZkNIL6K+zmGc+fkHnqxEWRoE9mf5rbUUyo2rZiNAr5rRLnjNAFQvn9zEWt/PLAkJrF w9/CRdKGmxL7xIdcMZ9sp9YtP+a3B+ZtMXc/VgC2FydQnJNZzv+5y7DyIOs5502uswnT kevA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:nodisclaimer:user-agent:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from:dkim-signature; bh=eT8PXBvMQ2o/jB2RD4yXdPQ4jpoMRif4rfi8S/RsEjE=; b=Cg8oTeh2l+8fQkriW/BVkPS84Vimru9LbfXaUe+GveGgyMCrdXMIJ/mnLyyNPyk/Sp wJpbaqgOCop2clsz8QAaQBoO6LBIlesm2VIdcBugyYomTyxLwLlJSojjgSctqjj/OSqa PN5Bfvz9Qno1anlkwP5ne9fY3gjCQYhDDHZE0IR1qZqToLdpnNYvVbitCzdwTVCSXOOT tm/wMBisXGyIRv0+iVOgaQ/yF/7X9uHxICbolkKcq/GDpzeeS87p6g29RRSSpnNRZ8uN TmujMK3RJ6DTp4czf/bRe7oLDV2AYeQZayH7xVpegCeKWLEu2bG1J0rtocqIZSx/ELfu Wlmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector1-arm-com header.b=qVO3bfwA; 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 z21si5921381plo.317.2019.02.15.08.09.15; Fri, 15 Feb 2019 08:09:32 -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; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector1-arm-com header.b=qVO3bfwA; 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 S2405852AbfBOKvC (ORCPT + 99 others); Fri, 15 Feb 2019 05:51:02 -0500 Received: from mail-eopbgr00081.outbound.protection.outlook.com ([40.107.0.81]:60541 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2405780AbfBOKvB (ORCPT ); Fri, 15 Feb 2019 05:51:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eT8PXBvMQ2o/jB2RD4yXdPQ4jpoMRif4rfi8S/RsEjE=; b=qVO3bfwAL3pRgDkQ6TOp/vydSYnXUI0I3ozLzZPpv2glxrhE37S3b1SAwWaVUTbJWt9hSs3bINc6iWIu0mdCr/m+vrcOg2JoBBW4x2MuMuB8zrEl/EWH5R34cBvrrjBLpTDcgMIhBmbtbwl3BygeNjeNpeNm+8TbajJLJNjppt0= Received: from AM0PR08MB3025.eurprd08.prod.outlook.com (52.134.93.10) by AM0PR08MB3010.eurprd08.prod.outlook.com (52.134.90.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1622.19; Fri, 15 Feb 2019 10:50:58 +0000 Received: from AM0PR08MB3025.eurprd08.prod.outlook.com ([fe80::6cf2:41c2:1a33:9b18]) by AM0PR08MB3025.eurprd08.prod.outlook.com ([fe80::6cf2:41c2:1a33:9b18%3]) with mapi id 15.20.1622.016; Fri, 15 Feb 2019 10:50:58 +0000 From: Brian Starkey To: John Stultz CC: "Andrew F. Davis" , Laura Abbott , Sumit Semwal , Greg Kroah-Hartman , =?iso-8859-1?Q?Arve_Hj=F8nnev=E5g?= , Christoph Hellwig , Liam Mark , "devel@driverdev.osuosl.org" , lkml , dri-devel , nd Subject: Re: [PATCH v2] staging: android: ion: Allocate from heap ID directly without mask Thread-Topic: [PATCH v2] staging: android: ion: Allocate from heap ID directly without mask Thread-Index: AQHUt1KdPElFkHXe9k+icWeJGBgTbKXfqYyAgAEgeIA= Date: Fri, 15 Feb 2019 10:50:58 +0000 Message-ID: <20190215105057.jujgm4k77rhkvmo7@DESKTOP-E1NTVVP.localdomain> References: <20190128214408.25442-1-afd@ti.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: NeoMutt/20180716-849-147d51-dirty x-originating-ip: [217.140.106.50] x-clientproxiedby: LO2P265CA0005.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:62::17) To AM0PR08MB3025.eurprd08.prod.outlook.com (2603:10a6:208:5c::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Brian.Starkey@arm.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: de846204-c81f-411f-7760-08d6933377ac x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM0PR08MB3010; x-ms-traffictypediagnostic: AM0PR08MB3010: nodisclaimer: True x-microsoft-exchange-diagnostics: 1;AM0PR08MB3010;20:c5NMItQXe7Rj00vqLTMy/0sywkgxS6yITk+S2s2nxcAuRknNUHNAlbepvLe+IADbdZhsMEVw/AG+OabN+O0pyJLEOahrqrM/fzSbW5xAwLPvHuxG7/06UyjJUN2GlgyMQYRSRN7p33Aw7zqzFQoxr5USuc2Ihe44dcwgx+Vrs4Q= x-microsoft-antispam-prvs: x-forefront-prvs: 09497C15EB x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(376002)(136003)(346002)(396003)(39860400002)(189003)(199004)(105586002)(97736004)(52116002)(99286004)(76176011)(106356001)(7736002)(305945005)(256004)(4326008)(478600001)(72206003)(186003)(476003)(486006)(446003)(11346002)(6116002)(71200400001)(71190400001)(3846002)(81156014)(68736007)(81166006)(8676002)(6246003)(44832011)(8936002)(7416002)(25786009)(53936002)(229853002)(66066001)(6916009)(26005)(14454004)(6512007)(9686003)(6486002)(102836004)(6436002)(2906002)(54906003)(386003)(86362001)(6506007)(1076003)(58126008)(33896004)(316002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR08MB3010;H:AM0PR08MB3025.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: cw9AYvg86wum0ky0djFWydSa9tRAGl+EfiPTcKMM6x9saSS/zYzP0OmkCsoOTvVckAoTS4BFNsJEV7YKSG2PRia/Oo47AOb894XW+5Vk8lpBb+pSelcep1ANYN5pEWIwl5EJM96MNba8TCnBxGD3ZVGNv7PHQS78IPwv7hm0pLkNLA+u+l9gadcVihn8bFYjlbETfJnY20MIIqDJlpMquTVFYkTothxjtdJ7J/JaRqBZQaead8pF8CFGr37eMcxqCr1BpJukV3pChx0At/h0gLOwEGqx99KuBfKzgbkFYKnxakYbr5Hii8otY4qqsepNX5MoYq2957zvLUVUIV5pcuRIGD9Z9TIR5kZccVbwQ2IsUMMIeHdFwz9BwbPDkfe0L5Y81n2MIsKZkKqqMUYqGfOjtFQ1jz63x75bOmixLic= Content-Type: text/plain; charset="iso-8859-1" Content-ID: <90592F78C404C547BAC59C42BE19E196@eurprd08.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: de846204-c81f-411f-7760-08d6933377ac X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Feb 2019 10:50:57.6798 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3010 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi John, On Thu, Feb 14, 2019 at 09:38:29AM -0800, John Stultz wrote: >=20 [snip] > Some thoughts, as this ABI break has the potential to be pretty painful. >=20 > 1) Unfortunately, this ABI is exposed *through* libion via > ion_alloc/ion_alloc_fd out to gralloc implementations. Which means it > will have a wider impact to vendor userland code. I figured libion could fairly easily loop through all the set bits in heap_mask and call the ioctl for each until it succeeds. That preserves the old behaviour from the libion clients' perspective. >=20 > 2) For patches that cause ABI breaks, it might be good to make it > clear in the commit what the userland impact looks like in userspace, > possibly with an example, so the poor folks who bisect down the change > as breaking their system in a year or so have a clear example as to > what they need to change in their code. >=20 > 3) Also, its not clear how a given userland should distinguish between > the different ABIs. We already have logic in libion to distinguish > between pre-4.12 legacy and post-4.12 implementations (using implicit > ion_free() behavior). I don't see any such check we can make with this > code. Adding another ABI version may require we provide an actual > interface version ioctl. >=20 A slightly fragile/ugly approach might be to attempt a small allocation with a heap_mask of 0xffffffff. On an "old" implementation, you'd expect that to succeed, whereas it would/could be made to fail in the "new" one. Thanks, -Brian >=20 > thanks > -john