Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2567813ybi; Mon, 1 Jul 2019 14:24:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSHP7+aQOz3A34lT637HvYIvmp0Z1gArz9eG02dS/Ptku+xTRhe2xoyDncNcSpUIUChtv2 X-Received: by 2002:a17:90a:3401:: with SMTP id o1mr1460084pjb.7.1562016268833; Mon, 01 Jul 2019 14:24:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562016268; cv=none; d=google.com; s=arc-20160816; b=tHP0FeJ2amXai0C7cKP/OunJWV5I5W270dUGoji+Zfb6ptwA7PuuAQAck18YHL1hEp Sqb+Y+TYA4Yu/OffNbvObmbEYhRNCtMDfwl8m9yZ0IItMkmL7On6r+IlQsK7xEY6xlGa JthCozvbBmP7hYx90LxyOjhu9At3Pu/39OuSReJ63NEKSchRHj/yhFHqi5g4awadwXmB BUIi8gaM37pTy3JxW27TL/qhauH8LH/5Fs2QsJfdEB3YgDtCWix41LWkSRhBlm77RMq4 sRat9WieTK6VAubdBgR5xTwiF2yrEnoepY+uuz2tnQIZtb07wBWc3d6jKQh38HujfJKQ jTGQ== 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=vimy2am5tc+rD/xkaD9O/1ePz04QqMZDvQsC/rSI12s=; b=mzW+tj8Cz/jHJ45phEqH21tbez6SfFPgHfk68KAmkzVTVO5/5Z6kXtfu4UOli4YjRD V1BlN+Y/awACRPO9Fp+w3/Ce4yy69qUqMZDOQeTHjvc9yHmbGuEjqZ9NswxsU8Gc/Fp0 3YZ1RAcW2Yri/NDbk3KutJpa8maq5fg+CnY9dxBWM8bZquU+prVG4yqyZGjnW5tWWKC/ VcjuEc25CIWzKFy+NMZCJlfEwUX5oaKyLfsz0NXlBVf1gOybydcNZkCyv/C5ge+g3Vzk PCMPM0sOtRNgg2QA9BEIxa5vaE0uouqhcE5uKtDZSgN/QW5SK2A9oOUNjUokGrvGjJSl nseg== 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 b16si11693795pfd.126.2019.07.01.14.24.13; Mon, 01 Jul 2019 14:24:28 -0700 (PDT) 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 S1726970AbfGAVVm (ORCPT + 99 others); Mon, 1 Jul 2019 17:21:42 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:33512 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726586AbfGAVVl (ORCPT ); Mon, 1 Jul 2019 17:21:41 -0400 Received: by mail-qk1-f196.google.com with SMTP id r6so12309334qkc.0 for ; Mon, 01 Jul 2019 14:21:41 -0700 (PDT) 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=vimy2am5tc+rD/xkaD9O/1ePz04QqMZDvQsC/rSI12s=; b=AvYMB/5UkUd0MiGVG4uID0Oqdpj7JGWzlm70Q/Lxmcsgf2SNFYWY4q+v+M3FSCTunG xud4HciKfCJvEIbEC90RtEj0Ue6fEco8cfZ3fqa5PX7ZYtgxRiGHA1WWl3qTxiOjcCGa nNYadNarw0dIK0SjaRknC6Wla3+7MxRKn2HzuPSuw3rKLWq6AXbICLxE/seMXSmihpFx mwM7cD/gZf9+bYY0OOoKtvNV4XiDnD9PCQXjoe823DGGj2Dml92+pDeUaQmk9bq5/69F B1RQ8Npnk0eRjm10X4yM2cL5DgrrXiyuq6USSiqpFur2dcNMz/LdVQNPm1Cp/N3shJwJ 46MA== X-Gm-Message-State: APjAAAV0uqq2OypfHivOIo3kHe5nTUnZkWNzweFyfU9gk6cgFZ7Zrsbc odya1xWjGkZHryGcViCmdv+3OV8P3Tw= X-Received: by 2002:a37:a541:: with SMTP id o62mr22546799qke.90.1562016100614; Mon, 01 Jul 2019 14:21:40 -0700 (PDT) Received: from [192.168.1.157] (pool-96-235-39-235.pitbpa.fios.verizon.net. [96.235.39.235]) by smtp.gmail.com with ESMTPSA id w19sm5032580qkj.66.2019.07.01.14.21.39 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jul 2019 14:21:40 -0700 (PDT) Subject: Re: [PATCH] staging: android: ion: Bail out upon SIGKILL when allocating memory. To: Tetsuo Handa , Sumit Semwal Cc: Andrew Morton , LKML References: <000000000000a861f6058b2699e0@google.com> <03763360-a7de-de87-eb90-ba7838143930@I-love.SAKURA.ne.jp> From: Laura Abbott Message-ID: <37ac2d6d-3fc6-53eb-c2cd-20c0e9ac2054@redhat.com> Date: Mon, 1 Jul 2019 17:21:39 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: 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 7/1/19 5:02 PM, Tetsuo Handa wrote: > On 2019/07/01 23:02, Sumit Semwal wrote: >>> Acked-by: Laura Abbott >> fwiw, Acked-by: Sumit Semwal > > Thank you for responding. You can carry this patch via whichever tree you like. > > By the way, is "memory allocation from ion_system_heap_allocate() is calling > ion_system_heap_shrink()" > ( https://lkml.kernel.org/r/03763360-a7de-de87-eb90-ba7838143930@I-love.SAKURA.ne.jp ) > what we want? Such memory allocations might not want to call shrinkers... > For what Ion gets typically used for we do want to be calling shrinkers. I've had discussions with people in the past about the risk of Ion as DoS vector due to its ability to allocate large amounts of memory. At the very least, we probably shouldn't be trying to call the Ion shrinker when we're in the middle of an ion allocation since shrinking won't do us any good. We're in the process of re-working Ion at the moment so this might be a good topic to bring up again. Thanks, Laura