Message ID | f64f5f1093b3c06896bf0f850c5d9e661313fcb2.1662411799.git.andreyknvl@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6850BECAAD3 for <linux-mm@archiver.kernel.org>; Mon, 5 Sep 2022 21:10:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0144A80220; Mon, 5 Sep 2022 17:10:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F049180214; Mon, 5 Sep 2022 17:10:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D7E5F80220; Mon, 5 Sep 2022 17:10:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id C293980214 for <linux-mm@kvack.org>; Mon, 5 Sep 2022 17:10:16 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 9BFDCAB8F6 for <linux-mm@kvack.org>; Mon, 5 Sep 2022 21:10:16 +0000 (UTC) X-FDA: 79879274832.16.7B48A68 Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf16.hostedemail.com (Postfix) with ESMTP id 374C5180068 for <linux-mm@kvack.org>; Mon, 5 Sep 2022 21:10:16 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1662412215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HG8amreOT6Boo2OYpfsAisJYLLHPkbhrfrZ7vEhyKIU=; b=hjZEe66lYGDZc3DHO2OTGnJrvW/RGewUVnd2Hzcn/FX7J3MbM+slzlQ08TFOkf8L4DCWJU BpQte9D3I0RPeQ6bad+pQOcAQA1+Gh3UeVdJQ26IMQzTz7vd/JKRoWSdAzvnjl5taBIAwX VubFPiPflFahgW/sbOGvOPk6VjRWrg0= From: andrey.konovalov@linux.dev To: Andrew Morton <akpm@linux-foundation.org> Cc: Andrey Konovalov <andreyknvl@gmail.com>, Marco Elver <elver@google.com>, Alexander Potapenko <glider@google.com>, Dmitry Vyukov <dvyukov@google.com>, Andrey Ryabinin <ryabinin.a.a@gmail.com>, kasan-dev@googlegroups.com, Peter Collingbourne <pcc@google.com>, Evgenii Stepanov <eugenis@google.com>, Florian Mayer <fmayer@google.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov <andreyknvl@google.com> Subject: [PATCH mm v3 25/34] kasan: simplify print_report Date: Mon, 5 Sep 2022 23:05:40 +0200 Message-Id: <f64f5f1093b3c06896bf0f850c5d9e661313fcb2.1662411799.git.andreyknvl@google.com> In-Reply-To: <cover.1662411799.git.andreyknvl@google.com> References: <cover.1662411799.git.andreyknvl@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662412216; a=rsa-sha256; cv=none; b=tcOuITKFSc+a61HRaBRP2XVjqAXpQyqS/Tm79PhKXsiuyrpV3V7ucCAXCYxKAkN46JUsoG M3BYL4COKSUM8W6FYN14QBUwjBoW2R4vzf9fYtLfXxmSZFof6RCSDhZFqy0eB8IJg5VxWl oClW/QJ8GFnZMCa7ycyHgYBE8xaR42M= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=hjZEe66l; spf=pass (imf16.hostedemail.com: domain of andrey.konovalov@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662412216; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=HG8amreOT6Boo2OYpfsAisJYLLHPkbhrfrZ7vEhyKIU=; b=p9zND+1BvW6D1mUAw1rqVaNKj9uBEv9Xaf5T65huZhLL/tVsoqxf5hLCbHI4Y0TjY1XWGQ N9iPjU1PspoHec9gx7tTRMjPZBfn3E+0kX+9BDhKzAiiLJT2lrprNOZ0rR22ZJGoHzgFtj kMlH3JwJda2LjZ3AS18PgGwFeTnrf3U= Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=hjZEe66l; spf=pass (imf16.hostedemail.com: domain of andrey.konovalov@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 374C5180068 X-Stat-Signature: o15dopo1jiepgujoygjdtpa77pg41ix3 X-Rspam-User: X-HE-Tag: 1662412216-921511 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: switch tag-based modes to stack ring from per-object metadata
|
expand
|
diff --git a/mm/kasan/report.c b/mm/kasan/report.c index ac526c10ebff..dc38ada86f85 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c @@ -397,17 +397,16 @@ static void print_memory_metadata(const void *addr) static void print_report(struct kasan_report_info *info) { - void *tagged_addr = info->access_addr; - void *untagged_addr = kasan_reset_tag(tagged_addr); - u8 tag = get_tag(tagged_addr); + void *addr = kasan_reset_tag(info->access_addr); + u8 tag = get_tag(info->access_addr); print_error_description(info); - if (addr_has_metadata(untagged_addr)) + if (addr_has_metadata(addr)) kasan_print_tags(tag, info->first_bad_addr); pr_err("\n"); - if (addr_has_metadata(untagged_addr)) { - print_address_description(untagged_addr, tag); + if (addr_has_metadata(addr)) { + print_address_description(addr, tag); print_memory_metadata(info->first_bad_addr); } else { dump_stack_lvl(KERN_ERR);