Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2632122ybh; Fri, 24 Jul 2020 19:06:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybx88qNaEKtXLVFP2+1r+EnBHWnNA6vonrcaMjvaGQpzW6WCZorOLCiXPdz2ksgj48BKaz X-Received: by 2002:aa7:c251:: with SMTP id y17mr2635847edo.13.1595642800388; Fri, 24 Jul 2020 19:06:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595642800; cv=none; d=google.com; s=arc-20160816; b=TF/Yw+KOSDcfPubUddK9d5ZSqtdGibjC1QnrnDo7+cIQAvToEz447j+0Sie544RLbN /GJM2nORxjB9Y24D8vlA6B06tehlmzB7aQ4qmz4EcA67ppHUx8CgPr32CVJnjSVzn6pP xVBxqsn5YaJ1NmXWuSe+3tzC6OyHgnI+XrdMHoLYhYNtz0ccmS5z3CyR4L6vtdbfwT77 u6liXpjbB60jB0fxbUkdnpHGj0GgN0ZGUsg5CRGVeLSCXjPUP3z629u8hTvRg8syozQ3 4AGapf6vzCCuNnh2rpY0o/n88I+a6rzya62JBIo/7qo9hFe9qi2ovGhImtw3e7sNwhXR E3rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=bRyBYBOkQXGCxZo6Wns2HttojMODWC5HP9OkNEy+iCY=; b=X8CLU41Qrp8UvPK+u4xpbAGhSZNsF3kICoA/xL5I+GkB6KpyzPxltP/nwesuCnE08f gp51LG6uPeCdzwQjj57HMZDLc+3hsK2x8/F2g+Ip3UYvezxscawTsmlDVtgSAnpFShJW /GDSmgKpdq0ujkesxYpca/++RAkxfMlXmkjKyTlY8eajPrUDWdEE/nXR9VD2wgeiY98z 6YniOrZujDKwGamKy1pLg7jLrojGhiiAoQIWGY5v9UGjeLIyfcERx96049sVOXl0WtoM IBdhhGD1yajymZLGobktTuLI4NJ49FRjq+oQqeK/N0zyFEqxUq0DdruNib1uXO6XFEZY cRlA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g16si1703643ejf.228.2020.07.24.19.06.17; Fri, 24 Jul 2020 19:06:40 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726613AbgGYCDn (ORCPT + 99 others); Fri, 24 Jul 2020 22:03:43 -0400 Received: from mga02.intel.com ([134.134.136.20]:10563 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726493AbgGYCDn (ORCPT ); Fri, 24 Jul 2020 22:03:43 -0400 IronPort-SDR: VzSoTRReWexKrK5DSxpvJJmxsAteO4rdQiyw1c2p1pIKs6YSEbXUDGxIXn7LTkv4e1poN9k+NZ Cb5LZHBST79Q== X-IronPort-AV: E=McAfee;i="6000,8403,9692"; a="138860358" X-IronPort-AV: E=Sophos;i="5.75,392,1589266800"; d="scan'208";a="138860358" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2020 19:03:42 -0700 IronPort-SDR: Mus7QtFxGc5I+01QQ6/9guu60jC/CwrKdo9XN2xgRYSOGv+i4qwsf+k8+c/xa5dhIrwPpu+QeU a+nojoj5j7Hg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,392,1589266800"; d="scan'208";a="311601525" Received: from jcrametz-mobl.ger.corp.intel.com (HELO localhost) ([10.252.58.73]) by fmsmga004.fm.intel.com with ESMTP; 24 Jul 2020 19:03:34 -0700 Date: Sat, 25 Jul 2020 05:03:32 +0300 From: Jarkko Sakkinen To: Ingo Molnar 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: <20200725020332.GA17052@linux.intel.com> References: <20200724050553.1724168-1-jarkko.sakkinen@linux.intel.com> <20200724050553.1724168-4-jarkko.sakkinen@linux.intel.com> <20200724092258.GC517988@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200724092258.GC517988@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 24, 2020 at 11:22:58AM +0200, Ingo Molnar wrote: > > * 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. > */ This definitely clarifies and is a better explanation. I updated the commit accordingly. Thank you. > > Thanks, > > Ingo /Jarkko