Message ID | ebef6425f4468d063e2f09c1b62ccbb2236b71d3.1606161801.git.andreyknvl@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=gjjd=E5=kvack.org=owner-linux-mm@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=-16.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,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 DE5B7C2D0E4 for <linux-mm@archiver.kernel.org>; Mon, 23 Nov 2020 20:09:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 59B7D20715 for <linux-mm@archiver.kernel.org>; Mon, 23 Nov 2020 20:09:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="vkxW6RZN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 59B7D20715 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1CCA96B00B5; Mon, 23 Nov 2020 15:09:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 156446B00B6; Mon, 23 Nov 2020 15:09:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 01DC26B00B7; Mon, 23 Nov 2020 15:09:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0142.hostedemail.com [216.40.44.142]) by kanga.kvack.org (Postfix) with ESMTP id C37AF6B00B5 for <linux-mm@kvack.org>; Mon, 23 Nov 2020 15:09:42 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 5307C363D for <linux-mm@kvack.org>; Mon, 23 Nov 2020 20:09:42 +0000 (UTC) X-FDA: 77516773404.24.cord23_130138e27368 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 342511A4AA for <linux-mm@kvack.org>; Mon, 23 Nov 2020 20:09:42 +0000 (UTC) X-HE-Tag: cord23_130138e27368 X-Filterd-Recvd-Size: 4655 Received: from mail-qt1-f202.google.com (mail-qt1-f202.google.com [209.85.160.202]) by imf50.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Mon, 23 Nov 2020 20:09:41 +0000 (UTC) Received: by mail-qt1-f202.google.com with SMTP id a22so5032152qtx.20 for <linux-mm@kvack.org>; Mon, 23 Nov 2020 12:09:41 -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=JqOdOudIAs6fCsGoOMJBOXRAJ4nBM51Q9IuLvpe9X7o=; b=vkxW6RZNeiKt3uDXc9cHATR3yMNcOPJqStPkUehbC/zuvJcXUjcLUlqnCHiChMMXOM c71zmtYoiGl5xy8iIG7mT1M1VQucOQvK1LAC5ywznp2VK69TDjuYjE4jSsbKaRpiUm8y sM6M/LJaplFV13/x/OJvNqf/icVGsPo2tG/Lf+RwL6jkzxr7ofjAqqsanPWI677zjgYP lbRjaTr3RXJWAWEbSbifTQIYdzFOZ9607IvrKeoWsbPXMOJQyh/MOW++TV1RAnTyiBD0 rGAzeg91KocpdVKgKspqM96WumykTFfRxbnrlu4hk2QablCk2YfVGGBB8TQ2fNZAYkRT bJOw== 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=JqOdOudIAs6fCsGoOMJBOXRAJ4nBM51Q9IuLvpe9X7o=; b=H315D87h6Begjl3xW9eP/CBeDYYZ5ZdkPk9FxKyDWlm4qKItFa/T6oPM/f1tKFIQ7/ xrC9sAxd/3V1UBxzLAxFHIVAB6MAGApCKfDIfwXore4LrcRIj/Vl5cD3knPTgda2FBMz 1xwk+93acGci51DFCZT9IBSG/viSlR3FcvI/h/BHYC9ZUOw3/P9hgdPii3plg+UczKsT 1E/e8MwIkUfwyQV0HZuaGVn6uyscCHUqcK3/2kiXKwHxg+mZV4aw0wln5DjkQWF+pKZl fReP9WUn/k4bmg41mjiKfclweUFAs1Fd65EKna7Ogdwb4oc++oKzbybiLd2R5Olj81Xo UyZA== X-Gm-Message-State: AOAM533KnugOlkef8lria1ykfSvykStCDA5z8Pid6MjSU2lf4itCC0qs nYmYU0HOzEwgt3zRx8g9B2Y+m+mOPpbtR7y1 X-Google-Smtp-Source: ABdhPJw73/jwZg0RlewlvU4441kNk0gTp+b0T2ipYrKP6rHNENxFPnemmxMhgs3u5M7bN/vqoeTq/VUwN6Xwbz1I X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:a05:6214:a8f:: with SMTP id ev15mr1201051qvb.20.1606162180614; Mon, 23 Nov 2020 12:09:40 -0800 (PST) Date: Mon, 23 Nov 2020 21:07:55 +0100 In-Reply-To: <cover.1606161801.git.andreyknvl@google.com> Message-Id: <ebef6425f4468d063e2f09c1b62ccbb2236b71d3.1606161801.git.andreyknvl@google.com> Mime-Version: 1.0 References: <cover.1606161801.git.andreyknvl@google.com> X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog Subject: [PATCH mm v11 31/42] kasan, mm: untag page address in free_reserved_area From: Andrey Konovalov <andreyknvl@google.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>, Vincenzo Frascino <vincenzo.frascino@arm.com>, Dmitry Vyukov <dvyukov@google.com>, Andrey Ryabinin <aryabinin@virtuozzo.com>, Alexander Potapenko <glider@google.com>, Marco Elver <elver@google.com>, Evgenii Stepanov <eugenis@google.com>, Branislav Rankov <Branislav.Rankov@arm.com>, Kevin Brodsky <kevin.brodsky@arm.com>, kasan-dev@googlegroups.com, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov <andreyknvl@google.com> Content-Type: text/plain; charset="UTF-8" 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> |
Series |
kasan: add hardware tag-based mode for arm64
|
expand
|
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 42c32e8a9c5d..236aa4b6b2cc 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -7659,6 +7659,11 @@ unsigned long free_reserved_area(void *start, void *end, int poison, const char * alias for the memset(). */ direct_map_addr = page_address(page); + /* + * Perform a kasan-unchecked memset() since this memory + * has not been initialized. + */ + direct_map_addr = kasan_reset_tag(direct_map_addr); if ((unsigned int)poison <= 0xFF) memset(direct_map_addr, poison, PAGE_SIZE);