From: John Hubbard <jhubbard@nvidia.com>
To: Ryan Roberts <ryan.roberts@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Catalin Marinas <catalin.marinas@arm.com>,
"Mark Rutland" <mark.rutland@arm.com>
Cc: <linux-arm-kernel@lists.infradead.org>, <linux-mm@kvack.org>
Subject: Re: [PATCH 1/2] arm64/mm: Export contpte symbols only to GPL users
Date: Mon, 26 Feb 2024 18:49:54 -0800 [thread overview]
Message-ID: <141a5e32-2dd1-4c82-ae34-4a5470953758@nvidia.com> (raw)
In-Reply-To: <20240226120321.1055731-2-ryan.roberts@arm.com>
On 2/26/24 04:03, Ryan Roberts wrote:
> The contpte symbols must be exported since some of the public inline
> ptep_* APIs are called from modules and these inlines now call the
> contpte functions. Originally they were exported as EXPORT_SYMBOL() for
> fear of breaking out-of-tree modules. But we subsequently concluded that
> EXPORT_SYMBOL_GPL() should be safe since these functions are deeply core
> mm routines, and any module operating at this level is not going to be
> able to survive on EXPORT_SYMBOL alone.
>
> Link: https://lore.kernel.org/linux-mm/f9fc2b31-11cb-4969-8961-9c89fea41b74@nvidia.com/
> Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
> ---
> arch/arm64/mm/contpte.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
Yes, looks good.
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
thanks,
--
John Hubbard
NVIDIA
> diff --git a/arch/arm64/mm/contpte.c b/arch/arm64/mm/contpte.c
> index 16788f07716d..be0a226c4ff9 100644
> --- a/arch/arm64/mm/contpte.c
> +++ b/arch/arm64/mm/contpte.c
> @@ -135,7 +135,7 @@ void __contpte_try_fold(struct mm_struct *mm, unsigned long addr,
> pte = pte_mkcont(pte);
> contpte_convert(mm, addr, orig_ptep, pte);
> }
> -EXPORT_SYMBOL(__contpte_try_fold);
> +EXPORT_SYMBOL_GPL(__contpte_try_fold);
>
> void __contpte_try_unfold(struct mm_struct *mm, unsigned long addr,
> pte_t *ptep, pte_t pte)
> @@ -150,7 +150,7 @@ void __contpte_try_unfold(struct mm_struct *mm, unsigned long addr,
> pte = pte_mknoncont(pte);
> contpte_convert(mm, addr, ptep, pte);
> }
> -EXPORT_SYMBOL(__contpte_try_unfold);
> +EXPORT_SYMBOL_GPL(__contpte_try_unfold);
>
> pte_t contpte_ptep_get(pte_t *ptep, pte_t orig_pte)
> {
> @@ -178,7 +178,7 @@ pte_t contpte_ptep_get(pte_t *ptep, pte_t orig_pte)
>
> return orig_pte;
> }
> -EXPORT_SYMBOL(contpte_ptep_get);
> +EXPORT_SYMBOL_GPL(contpte_ptep_get);
>
> pte_t contpte_ptep_get_lockless(pte_t *orig_ptep)
> {
> @@ -231,7 +231,7 @@ pte_t contpte_ptep_get_lockless(pte_t *orig_ptep)
>
> return orig_pte;
> }
> -EXPORT_SYMBOL(contpte_ptep_get_lockless);
> +EXPORT_SYMBOL_GPL(contpte_ptep_get_lockless);
>
> void contpte_set_ptes(struct mm_struct *mm, unsigned long addr,
> pte_t *ptep, pte_t pte, unsigned int nr)
> @@ -274,7 +274,7 @@ void contpte_set_ptes(struct mm_struct *mm, unsigned long addr,
>
> } while (addr != end);
> }
> -EXPORT_SYMBOL(contpte_set_ptes);
> +EXPORT_SYMBOL_GPL(contpte_set_ptes);
>
> void contpte_clear_full_ptes(struct mm_struct *mm, unsigned long addr,
> pte_t *ptep, unsigned int nr, int full)
> @@ -282,7 +282,7 @@ void contpte_clear_full_ptes(struct mm_struct *mm, unsigned long addr,
> contpte_try_unfold_partial(mm, addr, ptep, nr);
> __clear_full_ptes(mm, addr, ptep, nr, full);
> }
> -EXPORT_SYMBOL(contpte_clear_full_ptes);
> +EXPORT_SYMBOL_GPL(contpte_clear_full_ptes);
>
> pte_t contpte_get_and_clear_full_ptes(struct mm_struct *mm,
> unsigned long addr, pte_t *ptep,
> @@ -291,7 +291,7 @@ pte_t contpte_get_and_clear_full_ptes(struct mm_struct *mm,
> contpte_try_unfold_partial(mm, addr, ptep, nr);
> return __get_and_clear_full_ptes(mm, addr, ptep, nr, full);
> }
> -EXPORT_SYMBOL(contpte_get_and_clear_full_ptes);
> +EXPORT_SYMBOL_GPL(contpte_get_and_clear_full_ptes);
>
> int contpte_ptep_test_and_clear_young(struct vm_area_struct *vma,
> unsigned long addr, pte_t *ptep)
> @@ -316,7 +316,7 @@ int contpte_ptep_test_and_clear_young(struct vm_area_struct *vma,
>
> return young;
> }
> -EXPORT_SYMBOL(contpte_ptep_test_and_clear_young);
> +EXPORT_SYMBOL_GPL(contpte_ptep_test_and_clear_young);
>
> int contpte_ptep_clear_flush_young(struct vm_area_struct *vma,
> unsigned long addr, pte_t *ptep)
> @@ -337,7 +337,7 @@ int contpte_ptep_clear_flush_young(struct vm_area_struct *vma,
>
> return young;
> }
> -EXPORT_SYMBOL(contpte_ptep_clear_flush_young);
> +EXPORT_SYMBOL_GPL(contpte_ptep_clear_flush_young);
>
> void contpte_wrprotect_ptes(struct mm_struct *mm, unsigned long addr,
> pte_t *ptep, unsigned int nr)
> @@ -355,7 +355,7 @@ void contpte_wrprotect_ptes(struct mm_struct *mm, unsigned long addr,
> contpte_try_unfold_partial(mm, addr, ptep, nr);
> __wrprotect_ptes(mm, addr, ptep, nr);
> }
> -EXPORT_SYMBOL(contpte_wrprotect_ptes);
> +EXPORT_SYMBOL_GPL(contpte_wrprotect_ptes);
>
> int contpte_ptep_set_access_flags(struct vm_area_struct *vma,
> unsigned long addr, pte_t *ptep,
> @@ -401,4 +401,4 @@ int contpte_ptep_set_access_flags(struct vm_area_struct *vma,
>
> return 1;
> }
> -EXPORT_SYMBOL(contpte_ptep_set_access_flags);
> +EXPORT_SYMBOL_GPL(contpte_ptep_set_access_flags);
next prev parent reply other threads:[~2024-02-27 2:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 12:03 [PATCH 0/2] Address some contpte nits Ryan Roberts
2024-02-26 12:03 ` [PATCH 1/2] arm64/mm: Export contpte symbols only to GPL users Ryan Roberts
2024-02-26 12:25 ` David Hildenbrand
2024-02-26 12:40 ` Ryan Roberts
2024-02-27 2:49 ` John Hubbard [this message]
2024-03-04 17:38 ` Catalin Marinas
2024-02-26 12:03 ` [PATCH 2/2] arm64/mm: Improve comment in contpte_ptep_get_lockless() Ryan Roberts
2024-02-26 12:30 ` David Hildenbrand
2024-02-26 12:37 ` Ryan Roberts
2024-02-26 12:40 ` David Hildenbrand
2024-02-27 23:45 ` John Hubbard
2024-03-01 18:47 ` Catalin Marinas
2024-03-04 12:54 ` Ryan Roberts
2024-03-04 17:37 ` Catalin Marinas
2024-03-04 18:40 ` Ryan Roberts
2024-03-04 22:04 ` David Hildenbrand
2024-03-05 9:13 ` Ryan Roberts
2024-03-05 9:14 ` Ryan Roberts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=141a5e32-2dd1-4c82-ae34-4a5470953758@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=mark.rutland@arm.com \
--cc=ryan.roberts@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox