Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp125074pxb; Wed, 11 Nov 2020 22:27:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxMzNEId257V3WYlpPlMGi4ygPjmlmZdcQgWx3UyZoUXuDPYbYcxfnWHGRM+Gn2sLhRFzWP X-Received: by 2002:a17:906:60c4:: with SMTP id f4mr29264825ejk.336.1605162447975; Wed, 11 Nov 2020 22:27:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605162447; cv=none; d=google.com; s=arc-20160816; b=FSRqH6J3XEFUlzsCvHiTF6DIXA0cH11VKozsqbDNCTvZWU4aLmMOFzzUFYVo0jtev1 JHQXikAyQ+VCWJfI+QUjPfOsWddFv8K81DHkrC3ItHKokEIS012L44BR8jLdtoqANF6O FJYJn79gqgXUfdJryd0mNNfGj3FKXfYqj0OXZlFOUgeEL3uQV0MYkapC2R249sCUtlnj SjMxjYUZOvi66nb605py8qwQVavvSfkZW4inOJfzbVUj22aBsPidKiwehzYzhr3ubQvV 1p69Kp6m0tFNmIFX0mNHOKH868S2QG+WFn0fcE5q7seOMxQ+VqSu2z0JEOYHlybGYjlF Rvdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=gJbzxYcbFuEmceJX85c/AxjD+0HdLDfYZ6K+NhsBTqw=; b=PnV3vBse+W8LpWE2qlmfOazNPPuY4MKw8B47Xf3Kdn1HGfm/8vbGVBWrgUZsPFM7Bd JPvSoUJc/ZMz2wHPCrLE89K6x79NhknoFKL02Hv+07r60m0lr7U4yWOG3G2nSNdK5XIL 7iWYcX/SDWTNwe9Fmxp17uBgGemyGEqO43Uyr49yvh0uLDjHL1Eg9vI3rAnFFjta+4Km nDnrQObxZuNlZgfMaFeVb7ydWp0LqsvVv7RLbrMR3HKYh/vsiuE1azW5JU//EzMdgrqa qdOyxEwYsTdpa3rxHRxWK2V2ygxio9f59lmaZ7kF9NrDXttX3hezLRrQSlt8lYmFdVzV LiEg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j9si3332794edp.113.2020.11.11.22.27.04; Wed, 11 Nov 2020 22:27:27 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726287AbgKLGY6 (ORCPT + 99 others); Thu, 12 Nov 2020 01:24:58 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:39561 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726020AbgKLGYy (ORCPT ); Thu, 12 Nov 2020 01:24:54 -0500 X-UUID: 0fca04583e6f4935af9d2e5f172a45c4-20201112 X-UUID: 0fca04583e6f4935af9d2e5f172a45c4-20201112 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 542004095; Thu, 12 Nov 2020 14:24:49 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 12 Nov 2020 14:24:47 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 12 Nov 2020 14:24:47 +0800 From: Kuan-Ying Lee To: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Andrew Morton , Matthias Brugger CC: , , , , , , , , Kuan-Ying Lee Subject: [PATCH 0/1] Fix objects remain in the offline per-cpu quarantine Date: Thu, 12 Nov 2020 14:24:11 +0800 Message-ID: <1605162252-23886-1-git-send-email-Kuan-Ying.Lee@mediatek.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes object remain in the offline per-cpu quarantine as describe below. Free objects will get into per-cpu quarantine if enable generic KASAN. If a cpu is offline and users use kmem_cache_destroy, kernel will detect objects still remain in the offline per-cpu quarantine and report error. Register a cpu hotplug function to remove all objects in the offline per-cpu quarantine when cpu is going offline. Set a per-cpu variable to indicate this cpu is offline. Kuan-Ying Lee (1): kasan: fix object remain in offline per-cpu quarantine mm/kasan/quarantine.c | 59 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 2 deletions(-) -- 2.18.0