[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 7/9] extend data types to hold a 64-bit address
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 7/9] extend data types to hold a 64-bit address |
Date: |
Sun, 12 Feb 2023 19:07:57 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Applied, thanks!
Luca Dariz, le dim. 12 févr. 2023 18:28:16 +0100, a ecrit:
> * i386/i386/trap.c: change from int to a proper type to hold a
> register value
> * x86_64/locore.S: use 64-bit register to avoid address truncation
> ---
> i386/i386/trap.c | 12 ++++++------
> x86_64/locore.S | 4 ++--
> 2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/i386/i386/trap.c b/i386/i386/trap.c
> index 1e04ae7d..9a35fb42 100644
> --- a/i386/i386/trap.c
> +++ b/i386/i386/trap.c
> @@ -154,9 +154,9 @@ char *trap_name(unsigned int trapnum)
> */
> void kernel_trap(struct i386_saved_state *regs)
> {
> - int code;
> - int subcode;
> - int type;
> + unsigned long code;
> + unsigned long subcode;
> + unsigned long type;
> vm_map_t map;
> kern_return_t result;
> thread_t thread;
> @@ -357,9 +357,9 @@ dump_ss(regs);
> int user_trap(struct i386_saved_state *regs)
> {
> int exc = 0; /* Suppress gcc warning */
> - int code;
> - int subcode;
> - int type;
> + unsigned long code;
> + unsigned long subcode;
> + unsigned long type;
> thread_t thread = current_thread();
>
> #ifdef __x86_64__
> diff --git a/x86_64/locore.S b/x86_64/locore.S
> index c54b5cd8..a2663aff 100644
> --- a/x86_64/locore.S
> +++ b/x86_64/locore.S
> @@ -590,7 +590,7 @@ trap_from_kernel:
> ENTRY(thread_exception_return)
> ENTRY(thread_bootstrap_return)
> movq %rsp,%rcx /* get kernel stack */
> - or $(KERNEL_STACK_SIZE-1),%ecx
> + or $(KERNEL_STACK_SIZE-1),%rcx
> movq -7-IKS_SIZE(%rcx),%rsp /* switch back to PCB stack */
> jmp _return_from_trap
>
> @@ -603,7 +603,7 @@ ENTRY(thread_bootstrap_return)
> ENTRY(thread_syscall_return)
> movq S_ARG0,%rax /* get return value */
> movq %rsp,%rcx /* get kernel stack */
> - or $(KERNEL_STACK_SIZE-1),%ecx
> + or $(KERNEL_STACK_SIZE-1),%rcx
> movq -7-IKS_SIZE(%rcx),%rsp /* switch back to PCB stack */
> movq %rax,R_EAX(%rsp) /* save return value */
> jmp _return_from_trap
> --
> 2.30.2
>
>
--
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.
- Re: [PATCH 5/9] use L4 page table directly on x86_64 instead of short-circuiting to pdpbase, (continued)
- [PATCH 1/9] prepare pmap helpers for full 64 bit memory map, Luca Dariz, 2023/02/12
- [PATCH 2/9] fix x86_64 asm for higher kernel addresses, Luca Dariz, 2023/02/12
- [PATCH 3/9] factor out xen-specific bootstrap, Luca Dariz, 2023/02/12
- [PATCH 4/9] factor out PAE-specific bootstrap, Luca Dariz, 2023/02/12
- [PATCH 7/9] extend data types to hold a 64-bit address, Luca Dariz, 2023/02/12
- Re: [PATCH 7/9] extend data types to hold a 64-bit address,
Samuel Thibault <=
- [PATCH 9/9] move kernel virtual address space to upper addresses, Luca Dariz, 2023/02/12
- [PATCH 8/9] separate initialization of kernel and user PTP tables, Luca Dariz, 2023/02/12
- Re: [PATCH 0/9 gnumach] move kernel vm map to high addresses on x86_64, Luca, 2023/02/12