This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Patch [3/3] Userspace probes single stepping out-of-line


>>-----Original Message-----
>>From: Prasanna S Panchamukhi [mailto:prasanna@in.ibm.com]
>>Sent: 2006年1月30日 16:45
>>To: Zhang, Yanmin
>>Cc: systemtap@sources.redhat.com; Keshavamurthy, Anil S; Mao, Bibo
>>Subject: Re: Patch [3/3] Userspace probes single stepping out-of-line
>>
>>> >>+		if (((stack_addr - sizeof(long long)) - page_addr) < size)
>>> If stack_addr==page_addr, above is always false because they are unsigned long. Pls. change it to:
>>> 	if ((stack_addr - sizeof(long long)) < (page_addr + size))
>>
>>ok.
>>
>>> >>+			return -ENOMEM;
>>> >>+
>>> >>+		if (__copy_to_user_inatomic((unsigned long *)(page_addr + size),
>>> Should (page_addr + size) is just page_addr?
>>
>>yes, it should be page_addr.
>>
>>> >>+	} else if (vma->vm_flags & VM_GROWSUP) {
>>> >>+		page_addr = (stack_addr & PAGE_MASK) + PAGE_SIZE;
>>> It's weird to get the page align by this approach. Not accurate.
>>
>>Could you please suggest appropriate approach for this?
[YM] page_addr = (stack_addr + PAGE_SIZE -1) & PAGE_MASK;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]