Message ID | 6920a74ae141ec8f45f19c8ebf3622910d10a5ed.1655150842.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 A4F15C43334 for <linux-mm@archiver.kernel.org>; Mon, 13 Jun 2022 20:19:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AA7A98D01CC; Mon, 13 Jun 2022 16:19:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A26728D01DD; Mon, 13 Jun 2022 16:19:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 687DF8D01D8; Mon, 13 Jun 2022 16:19:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 3E5B38D01DA for <linux-mm@kvack.org>; Mon, 13 Jun 2022 16:19:52 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 1EC7160F1B for <linux-mm@kvack.org>; Mon, 13 Jun 2022 20:19:52 +0000 (UTC) X-FDA: 79574328624.06.7DDD7AD Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by imf31.hostedemail.com (Postfix) with ESMTP id 8FE06200AC for <linux-mm@kvack.org>; Mon, 13 Jun 2022 20:19:51 +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=1655151584; 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=xD+jOMbc8v/VbHqobo7HTP4Hy7ebCjo8HGnwIkjNmQg=; b=uV4k7v6j0gg2WNGE2AGUi+jftnP6i13EVs8rWhI+Mznu6bMnCcoEx7t6dQvsOLijyruwRb Bnb/ljj+Y/69/ZVheqbQ8nWo1Q2aQYKgjsxn4fv64f2dR7RxPtUroYLFBAZjgai+byrc3O hJnu05PzYAADy2CUt5i3GARZUN+wHes= From: andrey.konovalov@linux.dev To: Marco Elver <elver@google.com>, Alexander Potapenko <glider@google.com> Cc: Andrey Konovalov <andreyknvl@gmail.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>, Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov <andreyknvl@google.com> Subject: [PATCH 26/32] kasan: simplify print_report Date: Mon, 13 Jun 2022 22:14:17 +0200 Message-Id: <6920a74ae141ec8f45f19c8ebf3622910d10a5ed.1655150842.git.andreyknvl@google.com> In-Reply-To: <cover.1655150842.git.andreyknvl@google.com> References: <cover.1655150842.git.andreyknvl@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655151591; 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=xD+jOMbc8v/VbHqobo7HTP4Hy7ebCjo8HGnwIkjNmQg=; b=pBjBJutw7BL2aKiFT/gSV1HPC5pl+FN+E6+58gc39w2Y4OMCRZ3XLiEEiIz6D2HRF5n+QE taEhgkG0d//17BCbHFhLH6NwcibsEwibSZsuv4zso35gr2EylVws9FErF18NIJd7LYxUL+ hb/M4Ikp4feUPABL/xojAtxmExNtnxk= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655151591; a=rsa-sha256; cv=none; b=7hkWyf/G8pzv4TVw67xXTheOVskmIrRSFMQPOrxW3LSDa9+w2S44cQddqt8iHj2xx/tp6i +NXGp1JgHVbqfo+pVrHBKb7v+904LtJcKJwnzvv6ltaIehxP9eKfQNwkHsX0l3hXE2YCry rdIWua7/9e9yC76pmuCv/TgqcXxxwBU= ARC-Authentication-Results: i=1; imf31.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=uV4k7v6j; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf31.hostedemail.com: domain of andrey.konovalov@linux.dev designates 188.165.223.204 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=uV4k7v6j; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf31.hostedemail.com: domain of andrey.konovalov@linux.dev designates 188.165.223.204 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev X-Rspamd-Server: rspam12 X-Rspam-User: X-Stat-Signature: tzr6ownyj643xteyrhkenidd9ukpjrze X-Rspamd-Queue-Id: 8FE06200AC X-HE-Tag: 1655151591-728138 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000002, 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 f3ec6f86b199..cc35c8c1a367 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c @@ -391,17 +391,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);