Message ID | 5045db8a8e249a1eda3199b952120035eacb3bd4.1543337629.git.andreyknvl@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 87BC714E2 for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 27 Nov 2018 16:56:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72FFF2C455 for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 27 Nov 2018 16:56:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6637D2C4B2; Tue, 27 Nov 2018 16:56:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, USER_IN_DEF_DKIM_WL autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E7082C49D for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 27 Nov 2018 16:56:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 848FA6B4951; Tue, 27 Nov 2018 11:56:18 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 7D8016B4953; Tue, 27 Nov 2018 11:56:18 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 64CCC6B4954; Tue, 27 Nov 2018 11:56:18 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by kanga.kvack.org (Postfix) with ESMTP id 097026B4951 for <linux-mm@kvack.org>; Tue, 27 Nov 2018 11:56:18 -0500 (EST) Received: by mail-wr1-f69.google.com with SMTP id w12so17568684wru.20 for <linux-mm@kvack.org>; Tue, 27 Nov 2018 08:56:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=cdKIYS87jEKsGaVGv0J/kyzmIxkse0BLBOe4/s6kF2g=; b=Y5xiYF5S2BDiduHVBZyz9gu3Uq7MX0UgloZNLwGbd/+tBLhQczobc1E2XXkclOVG3j 7MH108K90Q/IYZGYO1DNPYwes6nStAIg/e9qg2CSo7ekJT9BuM/PZ0WR0aoWniv6sF7u XvuSOumBrhVLzX3xbFqWsQB8l7xKICLUTErJFY6XzSlBsiDncEau0BtA2ajZ/ksEhoAt vwux5gXGxs+jZFg+L3EH4vRNurkhvgf6xIl4jwpisEbm3J4Aafx7Q47fa/R3zwAEzste UBQ7UHRV90LiD2r+q/49qvfTeWFXjY2UFpXmPzdPnJZ/I5loMIKMp97ykwr2U27UTT8f sePw== X-Gm-Message-State: AA+aEWYqGD7HP5YeOsiy6Djw5hAA5g/E79LujTytw6nUwnRP04c6rfPZ qvhNab7m2xniToEo9IXnIm+LhpU1cv51UfvLpmZNSvEv7BSszS2WILMqsJTLmKn2DrRkm/RVkfJ uXcGz1skf/oDToAqII1jhegbrw7wa/Ip1C+F9HN7stUhyq0c3siXArgBuzHLlGV67bzAaTnYnQz 7PuIm+tc/b8dWsn3b/68hGD0a/ivJN1bCN1g2MJE4m37sS9EjZG0fXPAezsEnCIEYhSOj0XWrs9 K6KVzEz/sxy6+xa97hNqtWAO0EJmloObLcE0PDkYxiHjPAOjcXBAr0HExgRb7zrACoS7Zban26a VOWNEmMPIMrkX+hI1ztE/0VF5SWnaCmrfOvo/kY6vwMy17UsExLGcD8Fxm859kupi3VO9UXRp0Z N X-Received: by 2002:a5d:418b:: with SMTP id m11mr26108288wrp.8.1543337777436; Tue, 27 Nov 2018 08:56:17 -0800 (PST) X-Received: by 2002:a5d:418b:: with SMTP id m11mr26108253wrp.8.1543337776720; Tue, 27 Nov 2018 08:56:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543337776; cv=none; d=google.com; s=arc-20160816; b=kkDj1Mc5rwsSVdXkJXBGcEJ9/vXzwteUFc0fe5QiSpTjs9qqT4709cLoQ3b7nczK5F 6BMPW2vGnvrShBdptOOa40cj+oaNmL7Lpj9t0EpTHU4ieeNEpb/zyQD2Z373uMwZ0SDw FWc/ecjjdR1AiqG2H3VSD8iLcPc/on7HQTBqXM/9tKTUgH4m5IaWs/0xCLNf0NuAB33q ipMu4vlY6kdSGFXf+N2ct0OkJ4D8GQzT1IFxVuaWHdg+MEZe8NgWsg/ZYJMuuFKFwwLm SAGCYdn9JNLawHCuJ9dJNE2PT3pKe52ZzyF+45mwUyMVbBtIdR18YJFeurp5QpDS/oxt qGNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=cdKIYS87jEKsGaVGv0J/kyzmIxkse0BLBOe4/s6kF2g=; b=h2k0bND2aav7867m7JHtp5fzJ/49Px0agWxuf53JF8h1C24ZGB59P30E7lafb6/hab 4ow05jkl0UND4yp7qesfP8Y4/QbZWuzRnJeDnPAMMQf9Kr0DjohbXuN1iGCSsjdhKPQ4 RKOR0BMFLG13bbAbRjzZt5yyhGRszXsyvqrPLTGvnGcVsXYUr6eyQzmCkgA0l0uxAQYT xjhfZEdPh8grgTpuQBxr7sHFIkLcJnQNYKA5SWek9xXjOxqFy6p7wkeUOPxiGFr24+km 8v6vtg0w/i9gF5MFljXZgZpHCl8UGObsJfSFp2ZeNgV5QKHEbhw45gMpK1GUkGQJCbqG nyGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Ip5ogpaH; spf=pass (google.com: domain of andreyknvl@google.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=andreyknvl@google.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id t18-v6sor3058862wrm.30.2018.11.27.08.56.16 for <linux-mm@kvack.org> (Google Transport Security); Tue, 27 Nov 2018 08:56:16 -0800 (PST) Received-SPF: pass (google.com: domain of andreyknvl@google.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Ip5ogpaH; spf=pass (google.com: domain of andreyknvl@google.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=andreyknvl@google.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cdKIYS87jEKsGaVGv0J/kyzmIxkse0BLBOe4/s6kF2g=; b=Ip5ogpaHKgzTpQygvmjooBMBVAtgRQRl+qgkAzJ7PDkUUpZM+3enXRCKJyUfAgUpE2 KN4RrLzeJzOlxK/NsObxYkCP+bixblO+FW6Kw8UNmAe67lAywwzxntNPQRi2tWP/U1Nv LDacTNsQuT1QzFPoYQfPMDS7CAGKpR6YYaA9G48zPxMzb8HczWqI6KI9Jw5GL5v4+IIF bjmifMvo2LAjKTHeBt10/F+/nr5I2kCBQsXpc0Va3VG3isKuzUhCiZMtkIYhODra3bQw lH/pUxLW+O25D3hQXEqFG11Y2SK/POzwZxDFO/ZXGOESU2l6kT/8Hbc/gMs22CZbK1Gu AlPQ== X-Google-Smtp-Source: AFSGD/Va46vaty03/ntt8AicD2YvJXz8QAHtsdGhxXNOFGp6Fe24s3POR4AZg6sU6IkJKiYDLbbUeg== X-Received: by 2002:adf:fd87:: with SMTP id d7mr27062120wrr.74.1543337776184; Tue, 27 Nov 2018 08:56:16 -0800 (PST) Received: from andreyknvl0.muc.corp.google.com ([2a00:79e0:15:10:3180:41f8:3010:ff61]) by smtp.gmail.com with ESMTPSA id k73sm6383099wmd.36.2018.11.27.08.56.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Nov 2018 08:56:15 -0800 (PST) From: Andrey Konovalov <andreyknvl@google.com> To: Andrey Ryabinin <aryabinin@virtuozzo.com>, Alexander Potapenko <glider@google.com>, Dmitry Vyukov <dvyukov@google.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>, Christoph Lameter <cl@linux.com>, Andrew Morton <akpm@linux-foundation.org>, Mark Rutland <mark.rutland@arm.com>, Nick Desaulniers <ndesaulniers@google.com>, Marc Zyngier <marc.zyngier@arm.com>, Dave Martin <dave.martin@arm.com>, Ard Biesheuvel <ard.biesheuvel@linaro.org>, "Eric W . Biederman" <ebiederm@xmission.com>, Ingo Molnar <mingo@kernel.org>, Paul Lawrence <paullawrence@google.com>, Geert Uytterhoeven <geert@linux-m68k.org>, Arnd Bergmann <arnd@arndb.de>, "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Kate Stewart <kstewart@linuxfoundation.org>, Mike Rapoport <rppt@linux.vnet.ibm.com>, kasan-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sparse@vger.kernel.org, linux-mm@kvack.org, linux-kbuild@vger.kernel.org Cc: Kostya Serebryany <kcc@google.com>, Evgeniy Stepanov <eugenis@google.com>, Lee Smith <Lee.Smith@arm.com>, Ramana Radhakrishnan <Ramana.Radhakrishnan@arm.com>, Jacob Bramley <Jacob.Bramley@arm.com>, Ruben Ayrapetyan <Ruben.Ayrapetyan@arm.com>, Jann Horn <jannh@google.com>, Mark Brand <markbrand@google.com>, Chintan Pandya <cpandya@codeaurora.org>, Vishwath Mohan <vishwath@google.com>, Andrey Konovalov <andreyknvl@google.com> Subject: [PATCH v12 15/25] kasan, mm: perform untagged pointers comparison in krealloc Date: Tue, 27 Nov 2018 17:55:33 +0100 Message-Id: <5045db8a8e249a1eda3199b952120035eacb3bd4.1543337629.git.andreyknvl@google.com> X-Mailer: git-send-email 2.20.0.rc0.387.gc7a69e6b6c-goog In-Reply-To: <cover.1543337629.git.andreyknvl@google.com> References: <cover.1543337629.git.andreyknvl@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
kasan: add software tag-based mode for arm64
|
expand
|
diff --git a/mm/slab_common.c b/mm/slab_common.c index 5f3504e26d4c..5aabcbd32d82 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -1534,7 +1534,7 @@ void *krealloc(const void *p, size_t new_size, gfp_t flags) } ret = __do_krealloc(p, new_size, flags); - if (ret && p != ret) + if (ret && kasan_reset_tag(p) != kasan_reset_tag(ret)) kfree(p); return ret;