From patchwork Thu Jan 3 18:45:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 10747705 Return-Path: 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 A919114E5 for ; Thu, 3 Jan 2019 18:45:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B4DA28D06 for ; Thu, 3 Jan 2019 18:45:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8EB0B28D12; Thu, 3 Jan 2019 18:45:29 +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=ham 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 6DB0A28D06 for ; Thu, 3 Jan 2019 18:45:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 970C98E0095; Thu, 3 Jan 2019 13:45:27 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9207E8E0002; Thu, 3 Jan 2019 13:45:27 -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 7E8708E0095; Thu, 3 Jan 2019 13:45:27 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by kanga.kvack.org (Postfix) with ESMTP id 272AF8E0002 for ; Thu, 3 Jan 2019 13:45:27 -0500 (EST) Received: by mail-wr1-f70.google.com with SMTP id y7so15816407wrr.12 for ; Thu, 03 Jan 2019 10:45:27 -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:mime-version:content-transfer-encoding; bh=ITHs4YFYCIBJqlnIEDmL4pdf24tyFGf+yxfC0Fh4pdM=; b=qukzSnF/mWc7mCKHBnH8GF/aaWWfohCu+IYMPu8BBEUfY7jmM7Kcg/RyU3vrfDOAP/ p/zAo9qhkGNfcQrFlbIppWjsPvWpl4FVPMDDwsX/k06oTbvbgZcFhhAZxP59tGKPpnC/ lRvqmI24AuLYQWHtqWFEA5Ht5jVlPcbAjcVRcaBkuZmVAKLgQejICrvcfwWFNn8uUnkj HkR76wSMUqXCBYql7C3tx45akYfCVBQCF/wTQL5fa2mYryB5zO90jSDf+mhhPbltGjSY 9EsBGCtrB2CvGpr1aKc8qkys1XfA++0By5ewOYlH17oepElv077oC6YuBSb7wpaDbNB+ XMXA== X-Gm-Message-State: AJcUukd/ce6TASL1gaoPZ+Ith4BqvT3eNkMH5QXN+hQRykBfHLaR1Pt0 NaxGrTcb2z3/WOAZ9B1xBCYs09RolnrEVw0V05hOYKbkAUEz0vBAXwr1T617ah4Ww8pdTYzDyF7 TWqbxpMSov6qjQHwwNWcOI3jgFbWwFtuV0q0cnFcmhRCutnvqsOWjhRzmvdPmoQrFkqhqUXSrGE KdK6IpSqKKkP8o1KhvNmWXaeRYhXZonXuPbIQinmlhW9GmbQ4EGv4IwWpV0xUyvcgQdZrky4pcP zs9ztsivh9tvZlZPPCoJGOiZYFc3By8JJ42VJIuLk9h1EMzQL3ek+Zs/EIyn+PmlU8aIJ+s30L/ d7kfqL/rNW0JMeET4cn8rlhmlW1yhqpse0KLs0oLVpMriw+M/Nt0O5QmN0ngi0XozCkCXADzrN9 K X-Received: by 2002:adf:f350:: with SMTP id e16mr40534108wrp.125.1546541126511; Thu, 03 Jan 2019 10:45:26 -0800 (PST) X-Received: by 2002:adf:f350:: with SMTP id e16mr40534075wrp.125.1546541125628; Thu, 03 Jan 2019 10:45:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546541125; cv=none; d=google.com; s=arc-20160816; b=qFsCq9r2SkZE6K1Y/u6R20r5G+RLcYWC6u6Uvu8x4S9RU4u0G9PhT+5DZ0c8pMO9kM /2lHO/1INGbr0LQlHF/c9+tA2wAYe6vwllPiHE/h5N2lIT0SBXL6v0OTljmf9/GzX2Dm tYUWd2L3py3Dh3Zx82CjLna/k3hDmqkI0L6cjt6DvyltbS3yMSTuk3VSRq6Xn+Tg3IzS MZuPUDuXCG1bxas8GGoGjgqD998sTo9Zzc18hp6cS2qwfRMpbjPTthvragWgK4W6pKdR dqqBeWiRjrjxs8CL84zep4zQ7HdUhzpBIrQ7AdFcc4pgzf/4G6oA3N2OCdT8pPoWeYQ2 vbhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=ITHs4YFYCIBJqlnIEDmL4pdf24tyFGf+yxfC0Fh4pdM=; b=SewP3G2TniOuGMMgSJ2bYzVJzqQh1Vc9/Vqse2GVxtl974LN6ZWlQ3f3aitm2y8Yyk KAcnzXpZduMupEMM7dq4xvayt7vrJUoN8ZAL2ySWOYjLrGOvsSucebYvKMs+R5IkqxfU E9KhQ89gH3v9DYMlY/jM3pFIh672E1vIGH0NiSMBVC/4hdMVtq0ENwjSV9uiEE6v/6W3 zMecp2l3ezg37p8aWSIp7V9lZwJQcRlvK3OnADK6K32B9kNW+rCnj3O6eAGhstGFwlJk Hb5/w5brDebfpgSo4sWigOoF5TWXuN8aOpCDKg7YH1Bpu6l/0oLtRa9+GdmScGBs9j7/ O8RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=h7mND0Ja; 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 a13sor26035505wmg.13.2019.01.03.10.45.25 for (Google Transport Security); Thu, 03 Jan 2019 10:45:25 -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=h7mND0Ja; 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:mime-version :content-transfer-encoding; bh=ITHs4YFYCIBJqlnIEDmL4pdf24tyFGf+yxfC0Fh4pdM=; b=h7mND0Ja2CKX3WEOQZZNYqd9Wl32B4mOeHcoyNptcwaUsD1PDVzEu47VrmDVJUf5I/ WypbBGhjGDrsNseH3LE81ezH6HRM+2k+CLcnghlohirns+/D5S+RzY88W5ncYB/QXGE4 FbSucETcPMTEFkrY8hH7Ezrp+JFajaHzL+fEpNCZVUcWhEeCvstyL4ZBK2jmpnv3KX// zhlc96slJeXGPvl+PDvcNgEKSIZ3PYuexVQtTtCSTtMcJRwOKvVuipGRsELAuHweHeIM 5kGT8cfnOeSShUJDPY4ZZYwnvDDgcJHkq2gdObP0PmXMvHEIam2ksYVYLTM8kno/zPM2 fQWQ== X-Google-Smtp-Source: ALg8bN6PfR1Ylu4w+0u4VmomLr/zJW+6Qt2xgzQ9hKBfW94sc2lkLW4VnkWuDt9Lz7DbH3yYH4+Q1w== X-Received: by 2002:a7b:cb18:: with SMTP id u24mr37572044wmj.138.1546541125030; Thu, 03 Jan 2019 10:45:25 -0800 (PST) Received: from andreyknvl0.muc.corp.google.com ([2a00:79e0:15:13:8ce:d7fa:9f4c:492]) by smtp.gmail.com with ESMTPSA id t12sm52236944wrr.65.2019.01.03.10.45.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Jan 2019 10:45:23 -0800 (PST) From: Andrey Konovalov To: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Catalin Marinas , Will Deacon , Christoph Lameter , Andrew Morton , Mark Rutland , Nick Desaulniers , Marc Zyngier , Dave Martin , Ard Biesheuvel , "Eric W . Biederman" , Ingo Molnar , Paul Lawrence , Geert Uytterhoeven , Arnd Bergmann , "Kirill A . Shutemov" , Greg Kroah-Hartman , Kate Stewart , Mike Rapoport , Vincenzo Frascino , 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 , Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Jann Horn , Mark Brand , Chintan Pandya , Vishwath Mohan , Andrey Konovalov Subject: [PATCH v3 0/3] kasan: tag-based mode fixes Date: Thu, 3 Jan 2019 19:45:18 +0100 Message-Id: X-Mailer: git-send-email 2.20.1.415.g653613c723-goog MIME-Version: 1.0 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: X-Virus-Scanned: ClamAV using ClamSMTP Changes in v3: - Fixed krealloc tag assigning without changing kasan_kmalloc hook and added more comments to the assign_tag function while at it. - Moved ARCH_SLAB_MINALIGN definition to arch/arm64/include/asm/cache.h. Changes in v2: - Added "kasan: make tag based mode work with CONFIG_HARDENED_USERCOPY" patch. - Added "kasan: fix krealloc handling for tag-based mode" patch. Andrey Konovalov (3): kasan, arm64: use ARCH_SLAB_MINALIGN instead of manual aligning kasan: make tag based mode work with CONFIG_HARDENED_USERCOPY kasan: fix krealloc handling for tag-based mode arch/arm64/include/asm/cache.h | 6 ++++ mm/kasan/common.c | 65 ++++++++++++++++++++++------------ mm/slub.c | 2 ++ 3 files changed, 51 insertions(+), 22 deletions(-)