Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2022833ybh; Fri, 24 Jul 2020 02:24:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyFu2L1Ap/5WKBnGKkLQuSCmqini2lHyGp1L6oIrJ+8eeZZgg2CPiyGCR0tVE/SGQLvHR4 X-Received: by 2002:a17:906:240d:: with SMTP id z13mr8214529eja.346.1595582669754; Fri, 24 Jul 2020 02:24:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595582669; cv=none; d=google.com; s=arc-20160816; b=y68RM/977OiGdUzjKdN1duPAOymfsQK0qDF+aWULBdACo2RhdOJkn8hnnlaJx9UWdz ChajXMl9tyQAiiecPFqPUXnRjF6Ag3+vixvwYG1LdW2HnTFIG0qqaBQiN0zTZr3LNvSb CwVpquTT+UNRUqf1zGjJ04qbDeCTPfemVKBh+rAnmHw8b3qyaUvsmEQNuW7O6mWgPn9+ YNMsh4J4hzUDBd4iWqWXntqf49Q3ZYo1oEsk0mOsVR4HIsetiXM7owD6iBfW8fMO294R 6IvHV9Ojpg98/vOMgPeXrUdHIxfGQD6RNpFWUTkvQ2UNOdFuDgKfdfTCGa0e+L6W4Ehu /INQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=LNGLkZP5D8/u8cZ8++DJl4JEFHoFdXiIn1C5bXtzgAs=; b=srTEmWBYYKTqMHH07V8TDk9s2Blr/CUvB0E5cvZHv5CHAHKqKfs+Zvg6riM4IO6nZm A6LYIc1WedHUBayuHiXjK1VKr9DYj7/BhcI9nxQBkhDv8yAiDhagruvOqQFIe4DcyWtr DtpaMkLKpaasSsBkLqlCd6Lv2S49ObQ5m2bgo0b+NTmmNA5oMDZLcPu/tYwoBnnBA7jO 6w1VzWYAdmVLsFmx52LwpEvk9+dxCB9yPmqmvEbyhsVSo9eyBJyBW8TrL987HwMYKeid XhOaZSBKlN7LLqYnzW/3CtcCQfMs+yTXgRRTzCtTiuhI7ooUTIptetadyolsgX/3zTdu Rmww== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=TVr8EnME; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c2si8176edd.322.2020.07.24.02.24.06; Fri, 24 Jul 2020 02:24:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=TVr8EnME; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727859AbgGXJXD (ORCPT + 99 others); Fri, 24 Jul 2020 05:23:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726995AbgGXJXD (ORCPT ); Fri, 24 Jul 2020 05:23:03 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBAD5C0619D3 for ; Fri, 24 Jul 2020 02:23:02 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id h28so6550434edz.0 for ; Fri, 24 Jul 2020 02:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=LNGLkZP5D8/u8cZ8++DJl4JEFHoFdXiIn1C5bXtzgAs=; b=TVr8EnMEYkpB0XNbRADjLeg2HaEo67xazjjWxA5VZcA++bSJRceRIQCCczT/6Rdyms PxD8N3rPU0zlDTLl0LiWRrFYiuJ+8lEymThg54tbeP37GA8lo/or9STAos35EffaRkAJ 5SNnbMVtTySpaFcoLrjOjuAWUxUmrWXLb1V4n0Mt+3mppuMNH3pD2zFLmqfIcIs/4Bcn uzAWTs/OYCwd4otci5b8oc2UaPkSA+Wd7CdgIYYKJmt2LOEyIJbt8rH66v1Awm/Gm8Bf KXQdXz7kBRGTdb/n5IiRWZnltOlcihVclXxs5yiTe6tr/TehnCANlzulMrpSvZ1g6bDJ CChQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=LNGLkZP5D8/u8cZ8++DJl4JEFHoFdXiIn1C5bXtzgAs=; b=nGkoA5oCPHTTiAgMoBUNxdfK+GFl9GHKBRxzIjiV2DVsxPbq8K2grX2128jBnGp90z tUlBnx09ICSOvHwtumvE2X5PHCrn8bF5ABi5h3arlc27c47gFXHPzYUuwd4cBtwv0Kyf 8jjuZVbrY/GpXydV35HYN8VNOd7E3xUuQ1d6koxJc/C4PCgYaWMc1MWxYHxoJuIo9ESz 8S7pkva7d/mKX4S3O7aheRFXUDxgdU8vxahUYDX8Lp4dpLlV1V2uRfcictu6Dsuu1nrV gP3cRUvoV6hTTbrjk3lc5UFo9gEftt+Bk5lUVg7G83JmKDDdTw4cr97yrW+bjRGr86eW mNjA== X-Gm-Message-State: AOAM533O/T11BIcpQ81wQ+WgGDM1c0hjr1MOdz2Ef+ooxp+y4RmwokvP yN5zZ0lt/9EkdPgEpX1pRSpi15g+ X-Received: by 2002:a05:6402:32b:: with SMTP id q11mr6140414edw.67.1595582581687; Fri, 24 Jul 2020 02:23:01 -0700 (PDT) Received: from gmail.com (54033286.catv.pool.telekom.hu. [84.3.50.134]) by smtp.gmail.com with ESMTPSA id d23sm287994ejj.74.2020.07.24.02.23.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 02:23:01 -0700 (PDT) Date: Fri, 24 Jul 2020 11:22:58 +0200 From: Ingo Molnar To: Jarkko Sakkinen Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Masami Hiramatsu , Andi Kleen , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , Andy Lutomirski , "Paul E. McKenney" , Marco Elver , Babu Moger , Brian Gerst , Nayna Jain Subject: Re: [PATCH v5 3/6] arch/x86: Implement text_alloc() and text_free() Message-ID: <20200724092258.GC517988@gmail.com> References: <20200724050553.1724168-1-jarkko.sakkinen@linux.intel.com> <20200724050553.1724168-4-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200724050553.1724168-4-jarkko.sakkinen@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Jarkko Sakkinen wrote: > +void text_free(void *region) > +{ > + /* > + * This memory may be RO, and freeing RO memory in an interrupt is not > + * supported by vmalloc. > + */ > + lockdep_assert_irqs_enabled(); > + > + vfree(region); Had to dig around a bit to find the source of this restriction. Might make sense to clarify this comment to: /* * This memory may be read-only, and freeing VM_FLUSH_RESET_PERMS memory * in an interrupt is not supported by vmalloc. */ Thanks, Ingo