Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6248518ybi; Wed, 31 Jul 2019 10:52:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxX/zs+oHdo2HALn2FUxbmVqDv/FZk4YQSr+gahxHCRZv8HRrBbiOE//XIIDqHEcIh5v2/t X-Received: by 2002:a62:be0c:: with SMTP id l12mr48990018pff.224.1564595573385; Wed, 31 Jul 2019 10:52:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564595573; cv=none; d=google.com; s=arc-20160816; b=pCp9vJKgp+oLV2cIg/ySeIGhh5eD99GK3X7E/+5tYwvh9d3tXh0QnlekxqC66g9pdx nByt9wodqrlTXN8v8QuXK0XcfNLv8tqEp2uuUMiG0fLqCVK3VbteMs0hdv5w01jBK/TD 7wo4ArD541lPYPmPz+ttQH8FRWiKavSfVYOMHm9LGU4KHHVwNHa32wWuQigfFGPHBioh C8CK02koub2Irr97XhEIEdvCJGtrqLWnQp4roY28s0UXsX7kcB5rr001vUwrnat3JIbE IeEFtfZEU2V56N4ZP11QVc4sU80i5HlEAsYIf8eXVLm2o9tCrxab8pf0XvACTGbBo/mm TXgw== 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=gLsZksY+gBpgTVjGj1ZFUu3CK/yOt5FqgBnNEXrwvKg=; b=G39yfz7DnDhZFpl0MyIXR9rtFno22lzk23YP7k2i6dbHal2S24dX/p/YxymJK4xpmA rdRKldDMuPCIGCJRG4PKdn0Q5ZQz39ZysGd7NPbPDGBFs1MLl3jQWYR3GU3s8sDvgnqJ VzYD/+DZ8/aqlkOZpieFX6wykp0BeYTo6E/896rpXBePdCI5l3K1WkO08zjS3KsZehez H/o0co+CkeeJk4368B6NIbH+oLeARa6DdLD1P87DIcK3fYdRAkot0P+6MmvYVbtx7Kbg OO9TrQ6WLT3G6fV54O7ijUBHJhezMKHbFhnPK3CgfSSZJqIAKVzzMWww/OcPxKWMowbh g9dA== 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=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e25si38732986pff.30.2019.07.31.10.52.38; Wed, 31 Jul 2019 10:52:53 -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=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730488AbfGaRFH (ORCPT + 99 others); Wed, 31 Jul 2019 13:05:07 -0400 Received: from relay.sw.ru ([185.231.240.75]:36950 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726582AbfGaRFH (ORCPT ); Wed, 31 Jul 2019 13:05:07 -0400 Received: from [172.16.25.12] by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hss1z-0001ux-M2; Wed, 31 Jul 2019 20:04:51 +0300 Subject: Re: [PATCH v3] kasan: add memory corruption identification for software tag-based mode To: Walter Wu Cc: Dmitry Vyukov , Alexander Potapenko , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Matthias Brugger , Martin Schwidefsky , Arnd Bergmann , Vasily Gorbik , Andrey Konovalov , "Jason A . Donenfeld" , Miles Chen , kasan-dev , LKML , Linux-MM , Linux ARM , linux-mediatek@lists.infradead.org, wsd_upstream References: <20190613081357.1360-1-walter-zh.wu@mediatek.com> <1560447999.15814.15.camel@mtksdccf07> <1560479520.15814.34.camel@mtksdccf07> <1560744017.15814.49.camel@mtksdccf07> <1560774735.15814.54.camel@mtksdccf07> <1561974995.18866.1.camel@mtksdccf07> <1562640832.9077.32.camel@mtksdccf07> <1562839579.5846.12.camel@mtksdccf07> <37897fb7-88c1-859a-dfcc-0a5e89a642e0@virtuozzo.com> <1563160001.4793.4.camel@mtksdccf07> <9ab1871a-2605-ab34-3fd3-4b44a0e17ab7@virtuozzo.com> <1563789162.31223.3.camel@mtksdccf07> <1564144097.515.3.camel@mtksdccf07> <71df2bd5-7bc8-2c82-ee31-3f68c3b6296d@virtuozzo.com> <1564147164.515.10.camel@mtksdccf07> From: Andrey Ryabinin Message-ID: Date: Wed, 31 Jul 2019 20:04:59 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <1564147164.515.10.camel@mtksdccf07> Content-Type: text/plain; charset=utf-8 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/26/19 4:19 PM, Walter Wu wrote: > On Fri, 2019-07-26 at 15:52 +0300, Andrey Ryabinin wrote: >> >> On 7/26/19 3:28 PM, Walter Wu wrote: >>> On Fri, 2019-07-26 at 15:00 +0300, Andrey Ryabinin wrote: >>>> >>> >>>>> >>>>> >>>>> I remember that there are already the lists which you concern. Maybe we >>>>> can try to solve those problems one by one. >>>>> >>>>> 1. deadlock issue? cause by kmalloc() after kfree()? >>>> >>>> smp_call_on_cpu() >>> >>>>> 2. decrease allocation fail, to modify GFP_NOWAIT flag to GFP_KERNEL? >>>> >>>> No, this is not gonna work. Ideally we shouldn't have any allocations there. >>>> It's not reliable and it hurts performance. >>>> >>> I dont know this meaning, we need create a qobject and put into >>> quarantine, so may need to call kmem_cache_alloc(), would you agree this >>> action? >>> >> >> How is this any different from what you have now? > > I originally thought you already agreed the free-list(tag-based > quarantine) after fix those issue. If no allocation there, If no allocation there, than it must be somewhere else. We known exactly the amount of memory we need, so it's possible to preallocate it in advance. > i think maybe > only move generic quarantine into tag-based kasan, but its memory > consumption is more bigger our patch. what do you think? >