Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3246826rwb; Mon, 5 Sep 2022 08:33:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR5cu+AY0XR9upq5zE6x4JPLtJ9JeispY29oc8ScCRlvqwphMtY5yvBL9Aqrqax4IQ86TznK X-Received: by 2002:a05:6a00:bd8:b0:537:ea87:45f3 with SMTP id x24-20020a056a000bd800b00537ea8745f3mr46347674pfu.55.1662391987909; Mon, 05 Sep 2022 08:33:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1662391987; cv=pass; d=google.com; s=arc-20160816; b=tNVL6mCkiDXDab4YoIrO7gMOfd/Idy04208V6oVJQXyxXVD99QP83JsZzToTBeDscA 21706tGyclWKAZ/D6KFRGotDt12RgvxkEhzk8sHybb5sgy8JvrLKWJ3l+YrIOhZ/z92T aD21mzHU8IoiPzjK06wPdpw5BDEZblUuQ1X5J2RS84mn8S9A57bHe5S81L1FXBx/dcgv cYrr9hqnoG3nL8gJLK8JdRA7Tiuxcr3eLQ763aB6am5sdZ5S6gRiRaHjXpPaPtqh1Lmv rBC4TYUxiWWtksNpXZPFbuPnhxz5ClCBTrtBRtPzjE99kmcWVSp0ibXqST8No+HmBevK /MeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=oqqFoZBeOWjlgGBY8whrOB0QCiuQvuJPZI1cf/8bcig=; b=GlI9iEW/rloOyJQayYHneXg3Dt6CP2FHQAHy0Wx9flIe+1lH6Ct2M0E4bySBpt4ILI mVcHZZ5GeduWN86YEEq5Qzwdsis7AKXV6iRIoUuwDN+IqNI1bOHQm+RvH0bfcfDYwO72 wT2tWGizsjGl5qSl8/BpiG5PTGbowZSpTt5BPNXlRjld1XByb77YvrMIPaP6YnweMecT fdHXKlne7o0jVc5J4PAHHg/0iw6Pb69hLajhYWWRyAZIJsUXxE4a23gEN2isCv6PbO47 +rPljMcWJTSo9kW6QJi3TYufHKK0zxMRfDgjzwZAWrworptESugomFnX9Nx5bGNaLjbb Rymg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nokia.onmicrosoft.com header.s=selector1-nokia-onmicrosoft-com header.b=w5NR5yYA; arc=pass (i=1 spf=pass spfdomain=nokia.com dkim=pass dkdomain=nokia.com dmarc=pass fromdomain=nokia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nokia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t33-20020a056a0013a100b00536d5b41c8bsi12428161pfg.165.2022.09.05.08.32.44; Mon, 05 Sep 2022 08:33:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nokia.onmicrosoft.com header.s=selector1-nokia-onmicrosoft-com header.b=w5NR5yYA; arc=pass (i=1 spf=pass spfdomain=nokia.com dkim=pass dkdomain=nokia.com dmarc=pass fromdomain=nokia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nokia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239090AbiIEPa3 (ORCPT + 99 others); Mon, 5 Sep 2022 11:30:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238776AbiIEP3p (ORCPT ); Mon, 5 Sep 2022 11:29:45 -0400 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80117.outbound.protection.outlook.com [40.107.8.117]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84E3A6410 for ; Mon, 5 Sep 2022 08:28:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fqi51JWAbWqf0veDsR7qz/PPhHv++LqujMU26OTwApFWyRJv3k9aP3uEzvXZJ6quZHyo46GDy7gnRs+EQ1zJf0IlH5yS4YUS0ApSC4WkBfPHe5MllyTIXN11xUI4W0qTZIKsIghZaJ+fMhj9lkENHaqef7XfzIdffegdpl9E7Qs/6oQqNSoGf1n651Uc7vsLcJr4xu6xaHr3o/8VnfC3GiZ1791s11NnvtEwd+bsWx2v19goBnoG02MP1hakEISyZ7njE3ZhnIENRd9tIrLYbrZz2VbJdCZUU8CPBqBf3C8rpCIBACoIDdOm5XVll3StL+YO5dUMhffh6axS9Sx5wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oqqFoZBeOWjlgGBY8whrOB0QCiuQvuJPZI1cf/8bcig=; b=fbQc5pQp7xj7fGhaTPRSJShh6ZtE2bohEe8ch56gj2NxekXz9TkUDPmdMeqTX0T8FBqJfJPoyNN3C6IQ/L0BjgeeeMrhv4DOvtCrydW9HLHebZYdPjpjwjE6mMFu8l0j64rwPsttti/BOqLTisU2aFJVgq+5+Wi6jW3VYcF1j4KQq2KmeYsULVHwE9IC+tGGtHtr2zjHb5skGQ2PDlnL+e7h9tEhhEBubJk+TII29x9Ln0c2UUuv0nV6y4pkQuPXw132YMuPTjFn7tr3k5BxbXP4tXXU0y7ehwG7wumh4B+EfYG/RFrH5MnsehDxf77u6/9XKl0m+z6fqEw9wusOvw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia.com; dmarc=pass action=none header.from=nokia.com; dkim=pass header.d=nokia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oqqFoZBeOWjlgGBY8whrOB0QCiuQvuJPZI1cf/8bcig=; b=w5NR5yYAEb2ESMF7qoo68Uyt4P7xWJH+eSKssWxVoSYDUJ0qjAjH96VG383xBxVcXZJ5dKlxZ54NcDHn/CiF7Isw40GWLoAGSB+w/+G1rtKUgu7kgkXye4l/mPflrxkWpqvhg/vQeKUMJbnSqPxCiKA2A/ZAPYCY4z1YJ8zVYus= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nokia.com; Received: from AS4PR07MB8658.eurprd07.prod.outlook.com (2603:10a6:20b:4cd::12) by DU0PR07MB9161.eurprd07.prod.outlook.com (2603:10a6:10:407::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.12; Mon, 5 Sep 2022 15:28:39 +0000 Received: from AS4PR07MB8658.eurprd07.prod.outlook.com ([fe80::b333:1f3b:1b01:50d9]) by AS4PR07MB8658.eurprd07.prod.outlook.com ([fe80::b333:1f3b:1b01:50d9%3]) with mapi id 15.20.5612.009; Mon, 5 Sep 2022 15:28:39 +0000 Message-ID: <66a173c5-553e-8788-7e9a-153382f1f9a5@nokia.com> Date: Mon, 5 Sep 2022 17:28:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v2] ARM: kasan: Only map modules if CONFIG_KASAN_VMALLOC=n Content-Language: en-US To: Linus Walleij Cc: kasan-dev@googlegroups.com, Lecopzer Chen , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220905122754.32590-1-alexander.sverdlin@nokia.com> From: Alexander Sverdlin In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR0P281CA0098.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::8) To AS4PR07MB8658.eurprd07.prod.outlook.com (2603:10a6:20b:4cd::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR07MB8658:EE_|DU0PR07MB9161:EE_ X-MS-Office365-Filtering-Correlation-Id: f9485fa3-53b4-4f64-cbbe-08da8f534eea X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UMVZ2011ygruPfpBmLQOH67/XLvgPkQQrn+pYmWvX1Q9Q0ZcPvsmIZNhxK4tZoab3UKEimkootpf+GeOglKCnU+Ru1BgaE2ff50f+2cSeSQWYyvZloKpSQACfvl8cD8PPtLZc258WYqtglPzakbgC6GOxOe7vG9LPrlZECrJOu4xBudp1JR8CRvteajQWHwyKNsK0mVI3MrwE21NWMlxWoFA+QSmPV/89rEt2IkpzHbnzdhI1qjoOnhaSUzLhf3r07V2BCUc8d0wI1E/QcVisgF4FNMuAcwRhGDcOkok2pme2pGNxQPuVKnteH19ZDS5fAwsUXumgoZ2sApOLKfQBYsR1YdLVHHid6GiQYfzmJ9Ue+nhXAAyO7k1eyiODZZ6CQOmKYYtDPWlgCUNhHmiCj59TpeDYB1T8SytNM4G1op+pIvv37Yun3jB4M90bA0VChf2a6oMEvWSQayODK6zmqZ72M7cJ6ZPXvIWH3xj9MoESZK/Laui4edrYQ6ULvMCbZ0YPhHwcZjwccicmdopKr1PB26UerwYbFLGmbyWXXm2kSNen3veyQ7ScGdFHjT/XNnJw+bFdqP+D0pBxrnJ9S5AnDJ2aScp2wouyDkKO/Ih0Co/wm0WnPx5bk/OKDJKA9N4b6a1Z2R6lKxSupHGXYPrkwF04JCWct+DEP8b6WrM2cdhjtPtEqgpBKROvtFE2aM9nms+97YDs/BdLRcgpoi8RLcrILs9d2hlyXE9pp+UT2nnDiCIkwkI1HHq4SFISLv6DJH+8ww7GgllZYiDeOS2svmQk5lxaEXQeanvR/mCG6mEEJ2VfIxo41+vbMxiB2HSmgo2sApcixOQsONbMv0xvKnxDlIXCi0cSXfHncM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR07MB8658.eurprd07.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(366004)(136003)(39860400002)(346002)(396003)(376002)(6512007)(26005)(38100700002)(8936002)(66946007)(66476007)(8676002)(4326008)(66556008)(478600001)(2906002)(6506007)(44832011)(31696002)(53546011)(86362001)(41300700001)(6666004)(4744005)(5660300002)(7416002)(82960400001)(2616005)(186003)(316002)(36756003)(966005)(6486002)(31686004)(16799955002)(54906003)(6916009)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WktYQWhneG5tTWpBY3E2U1RwVjVac1E0L2JubmhrV3lNV3BzdFBjU0hwQ0Z5?= =?utf-8?B?TGdZODllUnRReW1Ddk04TlpCNjJIRWc5SkcyYkJKV1RLbU9UemxPbHUzVHdI?= =?utf-8?B?T3QxN0VTRUhrQ3RHRDR1RVZWODdSZS9pK0JBMnl0MG95OGkrbGxDeUZpZ0pF?= =?utf-8?B?TnpoUjQ4MjJLUCt3VEc0MXVIMUczRENldm9oVHVNUkpHclR5MC9yQ2xDYVUv?= =?utf-8?B?blErNkljQzVpRGVKRWtJc3QrZnVvWWZBY0lsVXV1eUVhVE9VVDlr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gzUHV4OGRVbUxEQnZKWUhpWW02WnBxUGNa?= =?utf-8?B?Q095Y2NVRHg2OVZ0RCswQW1iVlk2clJHNks2SWZrNm0vTzMzRWFtWVg2Q0lo?= =?utf-8?B?Ync9PQ==?= X-OriginatorOrg: nokia.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR07MB9161 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Linus, On 05/09/2022 15:38, Linus Walleij wrote: >> In case CONFIG_KASAN_VMALLOC=y kasan_populate_vmalloc() allocates the >> shadow pages dynamically. But even worse is that kasan_release_vmalloc() >> releases them, which is not compatible with create_mapping() of >> MODULES_VADDR..MODULES_END range: >> >> BUG: Bad page state in process kworker/9:1 pfn:2068b [...] >> >> Reviewed-by: Linus Walleij >> Signed-off-by: Alexander Sverdlin > Thanks Alexander, will you submit this to Russell's patch tracker please? done! https://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=9242/1 Thank you for the quick review! -- Best regards, Alexander Sverdlin.