mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 09:16:33 +00:00
parisc architecture build-, trace-, backtrace- and page table fixes
Fix a build error in stracktrace.c, fix resolving of addresses to function names in backtraces, fix single-stepping in assembly code and flush userspace pte's when using set_pte_at(). -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCYZAyIAAKCRD3ErUQojoP X8zUAQCV4fijXlUEOnZorH42QsSvs1SowHXu2YdHU8CmauWVawEAt14Zj3fmMBcS +uSacieZROU9maQtGgJAYHZVJwgPyQY= =OQRw -----END PGP SIGNATURE----- Merge tag 'for-5.16/parisc-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull more parisc fixes from Helge Deller: "Fix a build error in stracktrace.c, fix resolving of addresses to function names in backtraces, fix single-stepping in assembly code and flush userspace pte's when using set_pte_at()" * tag 'for-5.16/parisc-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc/entry: fix trace test in syscall exit path parisc: Flush kernel data mapping in set_pte_at() when installing pte for user page parisc: Fix implicit declaration of function '__kernel_text_address' parisc: Fix backtrace to always include init funtion names
This commit is contained in:
commit
c3b68c27f5
@ -76,6 +76,8 @@ static inline void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
|
||||
purge_tlb_end(flags);
|
||||
}
|
||||
|
||||
extern void __update_cache(pte_t pte);
|
||||
|
||||
/* Certain architectures need to do special things when PTEs
|
||||
* within a page table are directly modified. Thus, the following
|
||||
* hook is made available.
|
||||
@ -83,11 +85,14 @@ static inline void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
|
||||
#define set_pte(pteptr, pteval) \
|
||||
do { \
|
||||
*(pteptr) = (pteval); \
|
||||
barrier(); \
|
||||
mb(); \
|
||||
} while(0)
|
||||
|
||||
#define set_pte_at(mm, addr, pteptr, pteval) \
|
||||
do { \
|
||||
if (pte_present(pteval) && \
|
||||
pte_user(pteval)) \
|
||||
__update_cache(pteval); \
|
||||
*(pteptr) = (pteval); \
|
||||
purge_tlb_entries(mm, addr); \
|
||||
} while (0)
|
||||
@ -303,6 +308,7 @@ extern unsigned long *empty_zero_page;
|
||||
|
||||
#define pte_none(x) (pte_val(x) == 0)
|
||||
#define pte_present(x) (pte_val(x) & _PAGE_PRESENT)
|
||||
#define pte_user(x) (pte_val(x) & _PAGE_USER)
|
||||
#define pte_clear(mm, addr, xp) set_pte_at(mm, addr, xp, __pte(0))
|
||||
|
||||
#define pmd_flag(x) (pmd_val(x) & PxD_FLAG_MASK)
|
||||
@ -410,7 +416,7 @@ extern void paging_init (void);
|
||||
|
||||
#define PG_dcache_dirty PG_arch_1
|
||||
|
||||
extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t *);
|
||||
#define update_mmu_cache(vms,addr,ptep) __update_cache(*ptep)
|
||||
|
||||
/* Encode and de-code a swap entry */
|
||||
|
||||
|
@ -83,9 +83,9 @@ EXPORT_SYMBOL(flush_cache_all_local);
|
||||
#define pfn_va(pfn) __va(PFN_PHYS(pfn))
|
||||
|
||||
void
|
||||
update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *ptep)
|
||||
__update_cache(pte_t pte)
|
||||
{
|
||||
unsigned long pfn = pte_pfn(*ptep);
|
||||
unsigned long pfn = pte_pfn(pte);
|
||||
struct page *page;
|
||||
|
||||
/* We don't have pte special. As a result, we can be called with
|
||||
|
@ -1805,7 +1805,7 @@ syscall_restore:
|
||||
|
||||
/* Are we being ptraced? */
|
||||
LDREG TASK_TI_FLAGS(%r1),%r19
|
||||
ldi _TIF_SYSCALL_TRACE_MASK,%r2
|
||||
ldi _TIF_SINGLESTEP|_TIF_BLOCKSTEP,%r2
|
||||
and,COND(=) %r19,%r2,%r0
|
||||
b,n syscall_restore_rfi
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
*
|
||||
* TODO: Userspace stacktrace (CONFIG_USER_STACKTRACE_SUPPORT)
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/stacktrace.h>
|
||||
|
||||
#include <asm/unwind.h>
|
||||
|
@ -57,6 +57,8 @@ SECTIONS
|
||||
{
|
||||
. = KERNEL_BINARY_TEXT_START;
|
||||
|
||||
_stext = .; /* start of kernel text, includes init code & data */
|
||||
|
||||
__init_begin = .;
|
||||
HEAD_TEXT_SECTION
|
||||
MLONGCALL_DISCARD(INIT_TEXT_SECTION(8))
|
||||
@ -80,7 +82,6 @@ SECTIONS
|
||||
/* freed after init ends here */
|
||||
|
||||
_text = .; /* Text and read-only data */
|
||||
_stext = .;
|
||||
MLONGCALL_KEEP(INIT_TEXT_SECTION(8))
|
||||
.text ALIGN(PAGE_SIZE) : {
|
||||
TEXT_TEXT
|
||||
|
Loading…
Reference in New Issue
Block a user