Skip to content

Commit 912609e

Browse files
Ryan Robertsakpm00
authored andcommitted
arm64/mm: export contpte symbols only to GPL users
Patch series "Address some contpte nits". These 2 patches address some nits raised by Catalin late in the review cycle for my contpte series [1]. [1] https://lore.kernel.org/linux-mm/[email protected]/ This patch (of 2): 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://lkml.kernel.org/r/[email protected] Link: https://lore.kernel.org/linux-mm/[email protected]/ Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ryan Roberts <[email protected]> Acked-by: David Hildenbrand <[email protected]> Acked-by: Catalin Marinas <[email protected]> Cc: John Hubbard <[email protected]> Cc: Mark Rutland <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent ff0b590 commit 912609e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

arch/arm64/mm/contpte.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void __contpte_try_fold(struct mm_struct *mm, unsigned long addr,
135135
pte = pte_mkcont(pte);
136136
contpte_convert(mm, addr, orig_ptep, pte);
137137
}
138-
EXPORT_SYMBOL(__contpte_try_fold);
138+
EXPORT_SYMBOL_GPL(__contpte_try_fold);
139139

140140
void __contpte_try_unfold(struct mm_struct *mm, unsigned long addr,
141141
pte_t *ptep, pte_t pte)
@@ -150,7 +150,7 @@ void __contpte_try_unfold(struct mm_struct *mm, unsigned long addr,
150150
pte = pte_mknoncont(pte);
151151
contpte_convert(mm, addr, ptep, pte);
152152
}
153-
EXPORT_SYMBOL(__contpte_try_unfold);
153+
EXPORT_SYMBOL_GPL(__contpte_try_unfold);
154154

155155
pte_t contpte_ptep_get(pte_t *ptep, pte_t orig_pte)
156156
{
@@ -178,7 +178,7 @@ pte_t contpte_ptep_get(pte_t *ptep, pte_t orig_pte)
178178

179179
return orig_pte;
180180
}
181-
EXPORT_SYMBOL(contpte_ptep_get);
181+
EXPORT_SYMBOL_GPL(contpte_ptep_get);
182182

183183
pte_t contpte_ptep_get_lockless(pte_t *orig_ptep)
184184
{
@@ -231,7 +231,7 @@ pte_t contpte_ptep_get_lockless(pte_t *orig_ptep)
231231

232232
return orig_pte;
233233
}
234-
EXPORT_SYMBOL(contpte_ptep_get_lockless);
234+
EXPORT_SYMBOL_GPL(contpte_ptep_get_lockless);
235235

236236
void contpte_set_ptes(struct mm_struct *mm, unsigned long addr,
237237
pte_t *ptep, pte_t pte, unsigned int nr)
@@ -274,15 +274,15 @@ void contpte_set_ptes(struct mm_struct *mm, unsigned long addr,
274274

275275
} while (addr != end);
276276
}
277-
EXPORT_SYMBOL(contpte_set_ptes);
277+
EXPORT_SYMBOL_GPL(contpte_set_ptes);
278278

279279
void contpte_clear_full_ptes(struct mm_struct *mm, unsigned long addr,
280280
pte_t *ptep, unsigned int nr, int full)
281281
{
282282
contpte_try_unfold_partial(mm, addr, ptep, nr);
283283
__clear_full_ptes(mm, addr, ptep, nr, full);
284284
}
285-
EXPORT_SYMBOL(contpte_clear_full_ptes);
285+
EXPORT_SYMBOL_GPL(contpte_clear_full_ptes);
286286

287287
pte_t contpte_get_and_clear_full_ptes(struct mm_struct *mm,
288288
unsigned long addr, pte_t *ptep,
@@ -291,7 +291,7 @@ pte_t contpte_get_and_clear_full_ptes(struct mm_struct *mm,
291291
contpte_try_unfold_partial(mm, addr, ptep, nr);
292292
return __get_and_clear_full_ptes(mm, addr, ptep, nr, full);
293293
}
294-
EXPORT_SYMBOL(contpte_get_and_clear_full_ptes);
294+
EXPORT_SYMBOL_GPL(contpte_get_and_clear_full_ptes);
295295

296296
int contpte_ptep_test_and_clear_young(struct vm_area_struct *vma,
297297
unsigned long addr, pte_t *ptep)
@@ -316,7 +316,7 @@ int contpte_ptep_test_and_clear_young(struct vm_area_struct *vma,
316316

317317
return young;
318318
}
319-
EXPORT_SYMBOL(contpte_ptep_test_and_clear_young);
319+
EXPORT_SYMBOL_GPL(contpte_ptep_test_and_clear_young);
320320

321321
int contpte_ptep_clear_flush_young(struct vm_area_struct *vma,
322322
unsigned long addr, pte_t *ptep)
@@ -337,7 +337,7 @@ int contpte_ptep_clear_flush_young(struct vm_area_struct *vma,
337337

338338
return young;
339339
}
340-
EXPORT_SYMBOL(contpte_ptep_clear_flush_young);
340+
EXPORT_SYMBOL_GPL(contpte_ptep_clear_flush_young);
341341

342342
void contpte_wrprotect_ptes(struct mm_struct *mm, unsigned long addr,
343343
pte_t *ptep, unsigned int nr)
@@ -355,7 +355,7 @@ void contpte_wrprotect_ptes(struct mm_struct *mm, unsigned long addr,
355355
contpte_try_unfold_partial(mm, addr, ptep, nr);
356356
__wrprotect_ptes(mm, addr, ptep, nr);
357357
}
358-
EXPORT_SYMBOL(contpte_wrprotect_ptes);
358+
EXPORT_SYMBOL_GPL(contpte_wrprotect_ptes);
359359

360360
int contpte_ptep_set_access_flags(struct vm_area_struct *vma,
361361
unsigned long addr, pte_t *ptep,
@@ -401,4 +401,4 @@ int contpte_ptep_set_access_flags(struct vm_area_struct *vma,
401401

402402
return 1;
403403
}
404-
EXPORT_SYMBOL(contpte_ptep_set_access_flags);
404+
EXPORT_SYMBOL_GPL(contpte_ptep_set_access_flags);

0 commit comments

Comments
 (0)