Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3470646pxt; Tue, 10 Aug 2021 04:34:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiXIPP01oYaeABLBO2xEbg/BN/dYKjmh9049hc1k8/6NRbrzIByBKWbduLsRp/Fp7Hs1dl X-Received: by 2002:a92:ca8f:: with SMTP id t15mr635847ilo.262.1628595299387; Tue, 10 Aug 2021 04:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628595299; cv=none; d=google.com; s=arc-20160816; b=YXKQcKk6Sur8vgByKB0vgIjYaWogHI4XwmpfJO0zxdDerR7jB8b584llNIH4Yr2p+1 yHnSJI2iKQxzJEV9/XX8+iaz3H9mhs5+lVXVqDaMw0HZ9ZpVkK4LS8Dob5h4TASvx4P9 KwpTQRUX4P1kvXnorio2oUEjBAEN9s2UEfazn8shu9m2MfJ0cXfUqZyFXwG6VjmFr756 T14ZZBy+WgVETi/ZmgRDIMkKCdx0MvobGFvN6aeRfijzbq/Ujh4E5+tn+dp88PMEJJgP uz3+ORLchBM8z/RKEmMD+FwTk4Mv8yL9qpNta30nimKIds3QipOo78zIi9VYPN9eA9jd 20fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=djm4DWbOF22GhsSvHwwgQ4MO8NZc/LJRB+Vb97tWuW0=; b=Bee6D831wrPbYLKz0Kl+tCqFHyXNuaLPNxlfMqr9rkUU9h/fiq4dEnxzrHAK0KMYV5 yTBBW99c8gFgdhRsZa27D1aVzY1FHjrzAX8EuDspjY1MNM110Z+Xq0AA7qKGK6oZ39Ct Jag9suv7LikEdQ2lIsbrH09oAfNeqgsm+2raQHaSRbs3KrPJGIbOf52ONJWuuacb/Hre xa7ff/TBbMMu+iAqOKcvz4pdkLVjiK0qJcLd5Qr0LRnl1EjYF5EUYlkwKRoSR/H/P6P2 Q9g2Cb0HiQHJriB8CuZB9LE+oQ8s1bGffjBlN00dl+886R3FKRGHfS7Hib9LA9WsG5Oi NlmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QtQSkDYS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g7si25752200iov.41.2021.08.10.04.34.47; Tue, 10 Aug 2021 04:34:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QtQSkDYS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237028AbhHJI0y (ORCPT + 99 others); Tue, 10 Aug 2021 04:26:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232772AbhHJI0x (ORCPT ); Tue, 10 Aug 2021 04:26:53 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7433C061796 for ; Tue, 10 Aug 2021 01:26:31 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id b6so23518669lff.10 for ; Tue, 10 Aug 2021 01:26:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=djm4DWbOF22GhsSvHwwgQ4MO8NZc/LJRB+Vb97tWuW0=; b=QtQSkDYS9w7avyA8UUAyR1p5yorxliXuFlS5AocLoZh8RLzymJJOhaznYtkRR1WTD5 j0niLWf+G96pJbeqX2YyGUDJYSG2qwUgtzbhNIku7WnBVHtO0tXJcICn4+zeXuIcaVXD bENk6TgC1mpKQN/tMKlIEtmY6eWttigESp5KeiPIq2Fu6hrtyzz6vap2z7gtt3Nxzz7R bMlE5Kz4+ywpLvucwqdHorJd2b0uV/PvoQLrI5gSxvGXK1+yiGLSfLDqCpBDEqPSRzWP LtVW+VrAP/RKPjh+yxi0J30EbAP0w113KgYXaAjfM7j5dEo7FS/4XSaamI+59oW6Yc08 Expw== 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:content-transfer-encoding; bh=djm4DWbOF22GhsSvHwwgQ4MO8NZc/LJRB+Vb97tWuW0=; b=ZVnLXEVc5RqNYrnEpQr7DYaZnXtwXq1Dsewo9fGncUFN62R8ilGGjyqOqqd08InwEO MXxdVQbYwa+xRV9BwQYRAD243eig86sfsroHkH26MT9wkx9gy9jo+cV2NeKWm1CYguZG azwpL+8IoAuouMeVCUp3kcxk8xbBHS7a/REZlYk6Ci5Rz98p+MDmXhl/ZMPgElYCHV/c /pRguz42PxOaV0QrgMyac4r02pIqbmk9+Z7V4tD42U7x8tcbo04BF58VRGdSQI1uxPa0 NSdYng+mddZC5+RTfQ6ScCrHbl9B0qzuZyFyCwqP6Y0UWVTPxCsMai/2czjQrbs/qPhm dPow== X-Gm-Message-State: AOAM530nyeG1udu5q8MQ44/rKrd59135scdUF6UxcW121tyfs7BCfLqY ZrH4nTraVwgsdl2y6MYnHZjas4YctFTSapCD7y21NQ== X-Received: by 2002:a05:6512:1141:: with SMTP id m1mr20542919lfg.492.1628583990192; Tue, 10 Aug 2021 01:26:30 -0700 (PDT) MIME-Version: 1.0 References: <20210722190747.1986614-1-hridya@google.com> In-Reply-To: From: Sumit Semwal Date: Tue, 10 Aug 2021 13:56:19 +0530 Message-ID: Subject: Re: [PATCH] dma-buf: heaps: Set allocation limit for system heap To: Hridya Valsaraju Cc: John Stultz , Liam Mark , Laura Abbott , Brian Starkey , =?UTF-8?Q?Christian_K=C3=B6nig?= , linux-media , dri-devel , "moderated list:DMA BUFFER SHARING FRAMEWORK" , lkml , Android Kernel Team , Greg Kroah-Hartman Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hridya, Apologies for the delay in responding; On Wed, 4 Aug 2021 at 03:09, Hridya Valsaraju wrote: > > On Mon, Aug 2, 2021 at 7:18 PM John Stultz wrote= : > > > > On Thu, Jul 22, 2021 at 12:07 PM Hridya Valsaraju w= rote: > > > This patch limits the size of total memory that can be requested in a > > > single allocation from the system heap. This would prevent a > > > buggy/malicious client from depleting system memory by requesting for= an > > > extremely large allocation which might destabilize the system. > > > > > > The limit is set to half the size of the device's total RAM which is = the > > > same as what was set by the deprecated ION system heap. > > > > > > Signed-off-by: Hridya Valsaraju > > > > Seems sane to me, unless folks have better suggestions for allocation l= imits. > > > > Reviewed-by: John Stultz > > Thank you for taking a look John! Looks good to me; I will apply it to drm-misc today. > > Regards, > Hridya > > > > > thanks > > -john Best, Sumit. --=20 Thanks and regards, Sumit Semwal (he / him) Tech Lead - LCG, Vertical Technologies Linaro.org =E2=94=82 Open source software for ARM SoCs