Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2814349pxy; Tue, 3 Aug 2021 16:21:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDCnpvTVERNwpCmlYrsMq2cL6MiI5jBVSUB7L/Dnu5WtgBiiP3wyiIVFAV7ftf0EryOqhc X-Received: by 2002:a05:6402:898:: with SMTP id e24mr28497623edy.197.1628032867848; Tue, 03 Aug 2021 16:21:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628032867; cv=none; d=google.com; s=arc-20160816; b=NGy+UqibrJn9C0Jxy+xcMg/liEH95Pkir9PEVOSSk4o8CzfINvxRDQtZoyXi9LnK8/ uCL1AlnsLP/2mIpqp38xN6msaYUrVkpva59m3rvbxMSmtblaJQDKzlPTTYtbB3w+Hw+C +lCNmrr/STEUDaosjSWfSfXNs/QWLF1typzW8CDgTS1mSHx+P32gZUXpE54N3NijPqK7 3EFNyAHj2a5/PGV9RZi4NAxyd1IMVVSft3n9qvHRRSfjIFE3caMPXkIogyCtGhvK9Jm1 GPjqThp0Pl/xrTdny0FGyJ6ltSGLQTHVmSo81B0WTlaC66Jgl4NmE4qR0n8bewXXG6yj B1lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=eH7F2c4Hn9egywDlY45TqR5QW7h6BJhJpVKajFn/Dvg=; b=e23/AI52wSMlLaiTh8U4isaatfPaxte1qXcsPuHdRP9iEk3ZhpRQmpe7Uxeagy61RP 34nmE092yNIfIq3MsTQDZnanAA8fFOu8u3snACfWUEv9YahSvLdrGPLRAHWKQjjlc2Qa 0T8JnrKwa4+iha5DuJnoPrLmYcXZZu+0MsHecCpPTMMH4WqKReSV87aZ/V6YJ9YCramt rpQJdWKMUu63aAdgUDwelqNV9M2eTmOZIGstYyRIDu6SC1R3nCHaEmyRI649Zavxyt21 BCEYGvjiQPICf4wvq/2X7C+p1BcH/a8zszWfHPRxZC5rypnulBVxVul0DlVr9rQ8VDAJ MysA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=frGpZAuU; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ks26si244724ejb.542.2021.08.03.16.20.39; Tue, 03 Aug 2021 16:21:07 -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=@google.com header.s=20161025 header.b=frGpZAuU; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232710AbhHCVkM (ORCPT + 99 others); Tue, 3 Aug 2021 17:40:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232384AbhHCVkM (ORCPT ); Tue, 3 Aug 2021 17:40:12 -0400 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F040C06175F for ; Tue, 3 Aug 2021 14:39:56 -0700 (PDT) Received: by mail-yb1-xb2e.google.com with SMTP id y7so986856ybo.2 for ; Tue, 03 Aug 2021 14:39:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eH7F2c4Hn9egywDlY45TqR5QW7h6BJhJpVKajFn/Dvg=; b=frGpZAuU0TNGycNOUwSntnWTwUNXJjKhM/djmFxpOw4RLjxj4ZIMH/kWc6KmsJtmzd 5DZZF1XvLkwEjfV0d1g/+qd7fYu4p3IcXqxRh2+j2cEJmx1zwJZD59Hk+1HpT49HtK7X Uqge3z5MMAj3GqdriP0bGY+4uxvfDwPHI/8AUaTv/dYUqCfItsy4CzgGG4YcVxQ2W+3k 8yFws8bfEWrZyIXSyrNOM13JM5LbYjDmUdpWEgK5q3XHMwmDZUH16Fn3Lcmdkk1kJ+tR 5f+ICl8eIJ74PX6+7FzayWfSiwsOc3t/1lDkBGqzyqADZbXQ5H4FBtmOqjk757mpLOmy DCGg== 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=eH7F2c4Hn9egywDlY45TqR5QW7h6BJhJpVKajFn/Dvg=; b=WLN0o0QOPDJCgFCWDlFRLxDlqIRR4Hay6j7WrvoFhG+EXUDcws2TbwD43bW5jUm+rA ioyRJXZ+zY16bTiTy9nesydWPb6SJvPM0nk9WTLcTXmMM+u2A7uwcHogvjyhwTMQP/xx Klfz3vUzl0J3V30KoXoxW989eyF1PTDsYBpSERblHjIwSjnnINfL9Lmyi8InPcKtThq0 5V1ZxrCoa4ZXef/hJAf7YiWG7/DNaD+pnBns6btXHnnGA/HB03qg8Ydc5dXsn3uEELye q+AyuwjqO7w/YAJx2a3Ggnyoy3FIgXCDC2jj2Dinug1J5hxEfmlDhbMzhrEOj5MqXVib vjfg== X-Gm-Message-State: AOAM532rUlJ7tafVRC7ekNKxGQBDmLa5kuU34IRGXdg6wXVTMnpMPuoP Cw9ZKAT8Sv2bgzJs9r2cdCAJYY9qTJpPKgc4dRUtqw== X-Received: by 2002:a25:cac7:: with SMTP id a190mr14975276ybg.290.1628026795438; Tue, 03 Aug 2021 14:39:55 -0700 (PDT) MIME-Version: 1.0 References: <20210722190747.1986614-1-hridya@google.com> In-Reply-To: From: Hridya Valsaraju Date: Tue, 3 Aug 2021 14:39:19 -0700 Message-ID: Subject: Re: [PATCH] dma-buf: heaps: Set allocation limit for system heap To: John Stultz Cc: Sumit Semwal , Benjamin Gaignard , 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 2, 2021 at 7:18 PM John Stultz wrote: > > On Thu, Jul 22, 2021 at 12:07 PM Hridya Valsaraju wrote: > > 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 limits. > > Reviewed-by: John Stultz Thank you for taking a look John! Regards, Hridya > > thanks > -john