[PATCHv3 2/2] arm64: Add CONFIG_DEBUG_SET_MODULE_RONX support
Will Deacon
will.deacon at arm.com
Fri Aug 22 08:45:38 PDT 2014
Hi Laura,
On Tue, Aug 19, 2014 at 06:21:27PM +0100, Laura Abbott wrote:
> On 8/19/2014 5:11 AM, Will Deacon wrote:
> > On Wed, Aug 13, 2014 at 12:37:47AM +0100, Laura Abbott wrote:
> >> +static int __change_memory(pte_t *ptep, pgtable_t token, unsigned long addr,
> >> + pgprot_t prot, bool set)
> >> +{
> >> + pte_t pte;
> >> +
> >> + if (set)
> >> + pte = set_pte_bit(*ptep, prot);
> >> + else
> >> + pte = clear_pte_bit(*ptep, prot);
> >> + set_pte(ptep, pte);
> >> + return 0;
> >> +}
> >
> > Why do we need to propagate the token this far?
> >
>
> Not quite sure I understand the comment here.
Sorry, I was reviewing patches on a plane and ended up being a bit too
terse. I basically don't understand why we have to pass the `token'
parameter to __change_memory as it appears to be unused.
> > What about UXN? (I don't have the ARM ARM to hand, but we may want to set
> > both)
> >
>
> Both PAGE_KERNEL and PAGE_KERNEL_EXEC already set PTE_UXN. It seems
> redundant to add it again given this is currently restricted to module
> addresses. It's cheap to add it though for paranoia's sake.
I missed that, so I think it's fine to leave this part as-is.
Will
More information about the linux-arm-kernel
mailing list