Message ID | 31f5366d3245f5405185a0b4057b305613ce60ee.1605305978.git.andreyknvl@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=AU6j=ET=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CECB0C4742C for <linux-arm-kernel@archiver.kernel.org>; Fri, 13 Nov 2020 22:40:32 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B24922252 for <linux-arm-kernel@archiver.kernel.org>; Fri, 13 Nov 2020 22:40:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QgRoucG1"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="NbjGOqNw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B24922252 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version:Message-Id: In-Reply-To:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4/tkmoY92+2o08xFaqKHW+DusXh/LlhKCBwmXPMGbQA=; b=QgRoucG108sleg2pmTwAge6DM 7sMn7lm3wU01jKw7OsTb/cW40dUkW55xYf19S5pyjkdm2GYcF7gByoiULxnbQc3vI2Z3JcWaWDS1L 4qFnornlJwfg2o3wts53HBsB1hh+U/LBfYN56O1L+uj4TD59lsno2MKAputcnfWLLTQrjwSATAMje F7C/+2Ny7D2vDWBpkTTzAE5w/yGBWt0aLkZE6xxhri4ZmwPfM+IccGkRM8jzcjtNfa6utneHRPaXF IPm7VtYPjyBIY+Rc5AYKR5ST6ZnPwoQ/8SvE6+Xk3KT66C4+v1risPLl1oXdNLwQaiM3ZIUxObVAB oWDOAMfWA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdhiU-0001Sa-CY; Fri, 13 Nov 2020 22:38:50 +0000 Received: from mail-wm1-x349.google.com ([2a00:1450:4864:20::349]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdhQi-0001TT-LB for linux-arm-kernel@lists.infradead.org; Fri, 13 Nov 2020 22:20:31 +0000 Received: by mail-wm1-x349.google.com with SMTP id a19so4011923wmb.1 for <linux-arm-kernel@lists.infradead.org>; Fri, 13 Nov 2020 14:20:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=mI/2rW8u6CFpBd7nyudEpTk9pqQDS3YjqZmg/d3PQMM=; b=NbjGOqNwl3sICIUuy2Dx6Xzsk+mkCs6fm3XUGKRsfG3RlwtzwJeMtGqzhnOtjIOoiT Rot4BuMouS9KdzhIncvVUDcdcTBFMKkaN6qwjznaCmoM7krl5OFJ6ix+0sWy8GuPLay+ e2mJaLuz2BFxMMdHZ8SVcxa4QWYAge/CciV1HtckmdeKroa7ui8YIubpomJfLEoJ1dEc GBNCFWI8S9GHN0gntUUsZaqfFg/Mpc6BhsEB7G2dkF8gCf7kEbANocv7Q+U3YZWQavL/ CxUEXJS9haZSNAG33cDsoNwaEc22R7xi0HycIMDSfOILK2oAZVPrHH2nAhLqdyaCGBkG gbdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=mI/2rW8u6CFpBd7nyudEpTk9pqQDS3YjqZmg/d3PQMM=; b=NKpLxoCYpklV9yJForhFi5p70e3+cl/wYScX+jlK6aw28kv1tzmJaWiymbIym0oyVq 3gROIsugnWGBemZ7uxlbeUTYngPqbqvogGFeLAc6mUF1bJD4zbWHMqIBDAtxbWkEX0by B+vGE1N5QzCztov8Zq2FTwDX2TmLydiTEgGlsIMqrkcQOTik63oFpdwUWe4TfZOLei/B EqDLd4tVHMnRuco01J9OG8Pgwl9ZU0Fx/PR1csQGwdGqtULp6wvbszL8P0UEgi3PXab/ EvDhGmmJWaQuMLSdGfYBrmFi89NEhvJ5sn3MIIHpZDToy7qiIUGHbzBtKzsJGBMhUIjx Widw== X-Gm-Message-State: AOAM532RRmA+HG3lxdn0nyq7rDAwPaPf6yFoywp74m5by/W9J7FtlDe1 rCJ1+kW3irLuF99A2qGd1NlCVDyY+xum2eYs X-Google-Smtp-Source: ABdhPJxYtR4bh2WHC0w/07Gb/OQVXh3sZOJbZ2iTC6HhuummnwnQy7wvSSFekrmaH6T8oUMdO+1HYMOCfV40XpEX X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:adf:f04b:: with SMTP id t11mr5710125wro.147.1605306022529; Fri, 13 Nov 2020 14:20:22 -0800 (PST) Date: Fri, 13 Nov 2020 23:19:53 +0100 In-Reply-To: <cover.1605305978.git.andreyknvl@google.com> Message-Id: <31f5366d3245f5405185a0b4057b305613ce60ee.1605305978.git.andreyknvl@google.com> Mime-Version: 1.0 References: <cover.1605305978.git.andreyknvl@google.com> X-Mailer: git-send-email 2.29.2.299.gdc1121823c-goog Subject: [PATCH mm v3 03/19] kasan: introduce set_alloc_info From: Andrey Konovalov <andreyknvl@google.com> To: Andrew Morton <akpm@linux-foundation.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201113_172029_097115_3D1A7A42 X-CRM114-Status: GOOD ( 12.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: linux-arm-kernel@lists.infradead.org, Marco Elver <elver@google.com>, Catalin Marinas <catalin.marinas@arm.com>, Kevin Brodsky <kevin.brodsky@arm.com>, Will Deacon <will.deacon@arm.com>, Branislav Rankov <Branislav.Rankov@arm.com>, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Alexander Potapenko <glider@google.com>, Evgenii Stepanov <eugenis@google.com>, Andrey Konovalov <andreyknvl@google.com>, Andrey Ryabinin <aryabinin@virtuozzo.com>, Vincenzo Frascino <vincenzo.frascino@arm.com>, Dmitry Vyukov <dvyukov@google.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
kasan: boot parameters for hardware tag-based mode
|
expand
|
diff --git a/mm/kasan/common.c b/mm/kasan/common.c index 8197399b0a1f..0a420f1dbc54 100644 --- a/mm/kasan/common.c +++ b/mm/kasan/common.c @@ -327,6 +327,11 @@ bool kasan_slab_free(struct kmem_cache *cache, void *object, unsigned long ip) return __kasan_slab_free(cache, object, ip, true); } +static void set_alloc_info(struct kmem_cache *cache, void *object, gfp_t flags) +{ + kasan_set_track(&kasan_get_alloc_meta(cache, object)->alloc_track, flags); +} + static void *__kasan_kmalloc(struct kmem_cache *cache, const void *object, size_t size, gfp_t flags, bool keep_tag) { @@ -357,7 +362,7 @@ static void *__kasan_kmalloc(struct kmem_cache *cache, const void *object, KASAN_KMALLOC_REDZONE); if (cache->flags & SLAB_KASAN) - kasan_set_track(&kasan_get_alloc_meta(cache, object)->alloc_track, flags); + set_alloc_info(cache, (void *)object, flags); return set_tag(object, tag); }