Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3523993imu; Fri, 18 Jan 2019 11:55:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN6oK3BVIE4rPMnvNcEdd+Jz0sydB+CHnV8sKKmbt90qF7+PHS5TkJLZM/y1GcnzeMb9vzMk X-Received: by 2002:a17:902:4a0c:: with SMTP id w12mr20572797pld.8.1547841342170; Fri, 18 Jan 2019 11:55:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547841342; cv=none; d=google.com; s=arc-20160816; b=KRJzLohl2esrhjlUPlqkDc/3aYJLuslZU8c9VF0fowQMEHExN5AJAyZrTzANiZTI73 KxgcRASoqbQ6sMtm1kmAP0w9Mej6uARTxTnx/vOKLDee5Zh0lLfRblLcu3C70gk/MrON lNUEqFqyTOpW0ddtxVZfzZubKp/qjusKkEi0OALylNm7HXZbR69dnxGRTZhrZjLgBNi1 FHhS1gcnGpQL3+QgshiY5/pmJr9U8fGnPPXAoHJ+qF3pc2fs5FgEmK0iX5YUx3IIDMsL ey8fbi5nxiSRhHIRVOtzsJOWvwYzapv1KIr96QcOY9F0IJXhOoFVLCMBbg9btvza3eZD jVmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=XfD1BP8f6Ut8p4xliuONXRawCNEWzUDQY9J8wpycFa4=; b=mURh5Ra2kffIObZh90p1ktt9YvNCVY7HaxXkiOYbrz81UG2nlatdSIqMx/nV/7YO5U oGtX1rLKSFHmSolveRWBFYZOeiGym6rBUAhqeSBWXkPcuE/hy9NutvFU8V+za2p24TVn FDqF87tiQQyCUfxUlAKuAPEOpzYW8HLB2wc6ee58BYqDV2eRIKQhY+p9w6uI41nV5Oaa N2f4+nMKsiQaaePIU+dXM0eZl4+XMTUFXMx7JB6U/4k29K47QMv3G0awDiqmtmm7fcAz 9P0TN5OTcjFoeUdk6XqEdExIJLVuWIkmql6CC0YWw5ZuTH7LG7800cm4JtYhJWNt2K4k BL3Q== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10si4993826pll.179.2019.01.18.11.55.26; Fri, 18 Jan 2019 11:55:42 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729356AbfARTxi (ORCPT + 99 others); Fri, 18 Jan 2019 14:53:38 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:34677 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729206AbfARTxh (ORCPT ); Fri, 18 Jan 2019 14:53:37 -0500 Received: by mail-qk1-f193.google.com with SMTP id q8so8779735qke.1 for ; Fri, 18 Jan 2019 11:53:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XfD1BP8f6Ut8p4xliuONXRawCNEWzUDQY9J8wpycFa4=; b=NxYqUVSv27A5nJpC6hQeIDjKt3xUL0CPRAW1gXgC+eC/rufOD6r7gUb8lSdE6pvAy3 eQO+jKl6Wz8IaO+D5EHuyPg1882o83EcJ1YmXAB5ljx8M21DFhL6r4V2QxRcUdhV61Sx 4vMCwfuEf5hvKBO33Zmjza862CZ1dFpOv7NFPZFphZFjw5AB4S/tyhVTzB9qvgqRJgmW qTtIISuMtRkE8LHjK22S9pvFGJ8Ee48weXP3KIzOYWJjAD6a4bOscQYc+yO/x63m8tFs l8cNv7boxn9gVGFzZYfsFPb6Uaq/wREWOWUv8eHbR6pReFyQoZ5Athe26uWGxRfeXUVO YIMQ== X-Gm-Message-State: AJcUukdCroZbRjDCN7zIjV91O6203NY4D7prejAGh2Ul9ke7AuFu/t3N uCfOSDcNGXs6l7rsblmaXnQleQ== X-Received: by 2002:a37:3293:: with SMTP id y141mr15227376qky.132.1547841216510; Fri, 18 Jan 2019 11:53:36 -0800 (PST) Received: from ?IPv6:2601:602:9800:dae6::fb21? ([2601:602:9800:dae6::fb21]) by smtp.gmail.com with ESMTPSA id e29sm35243800qtc.74.2019.01.18.11.53.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 11:53:35 -0800 (PST) Subject: Re: [PATCH 11/14] staging: android: ion: Allow heap name to be null To: "Andrew F. Davis" , Brian Starkey Cc: Sumit Semwal , Greg Kroah-Hartman , =?UTF-8?Q?Arve_Hj=c3=b8nnev=c3=a5g?= , "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , nd References: <20190111180523.27862-1-afd@ti.com> <20190111180523.27862-12-afd@ti.com> <20190116152807.phyq5pqrmbkj6oxk@DESKTOP-E1NTVVP.localdomain> <39453e0a-2db8-3a59-1909-e02caa9afa31@ti.com> From: Laura Abbott Message-ID: <042dd3b1-9a41-2a76-270d-1c992d782c40@redhat.com> Date: Fri, 18 Jan 2019 11:53:33 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <39453e0a-2db8-3a59-1909-e02caa9afa31@ti.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/16/19 9:12 AM, Andrew F. Davis wrote: > On 1/16/19 9:28 AM, Brian Starkey wrote: >> Hi Andrew, >> >> On Fri, Jan 11, 2019 at 12:05:20PM -0600, Andrew F. Davis wrote: >>> The heap name can be used for debugging but otherwise does not seem >>> to be required and no other part of the code will fail if left NULL >>> except here. We can make it required and check for it at some point, >>> for now lets just prevent this from causing a NULL pointer exception. >> >> I'm not so keen on this one. In the "new" API with heap querying, the >> name string is the only way to identify the heap. I think Laura >> mentioned at XDC2017 that it was expected that userspace should use >> the strings to find the heap they want. >> > > Right now the names are only for debug. I accidentally left the name > null once and got a kernel crash. This is the only spot where it is > needed so I fixed it up. The other option is to make the name mandatory > and properly error out, I don't want to do that right now until the > below discussion is had to see if names really do matter or not. > Yes, the heap names are part of the query API and are the expected way to identify individual heaps for the API at the moment so having a null heap name is incorrect. The heap name seemed like the best way to identify heaps to userspace but if you have an alternative proposal I'd be interested. Thanks, Laura >