[PATCH] Add support for Altera's Nios-II softcore architecture

James Hogan james.hogan at imgtec.com
Wed Jan 29 13:03:07 UTC 2014


On 28/01/14 00:42, Mike Frysinger wrote:
> On Monday, January 27, 2014 20:58:11 Ezequiel García wrote:
>> On 27 January 2014 17:54, Mike Frysinger wrote:
>>> On Sunday, January 26, 2014 21:59:07 Ezequiel Garcia wrote:
>>>> --- a/system.c
>>>> +++ b/system.c
>>>>
>>>> +int sys_getpagesize(struct tcb *tcp)
>>>> +{
>>>> +     return 0;
>>>> +}
>>>
>>> that can't possibly be correct ?
>>
>> Hm... why? The syscall receives no args and returns the page size through
>> the get_error() path which retrieves the syscall result.
> 
> doesn't declaring it using printargs in the syscall list work ?
> 
>> After talking to Arnd Bergmann, we might rework the whole syscall thing
>> for this arch to implement the generic syscall ABI.
>>
>> Therefore, I'm not really sure what to do with this patch, as it works
>> fine with current nios2 available kernel and toolchain.
> 
> i'd be fine with merging it since it works as-is, but i'm not an strace 
> maintainer, so i don't get to say :)
> 
>> Is it possible to take this and then change the implementation once
>> the generic syscall ABI is implemented?
> 
> i would think that the existing ptrace ABI would remain unchanged, just the 
> syscall #'s would get rewritten (as well as some get added/removed).  so most 
> of your patch would still work ... just update the syscall list file.
> -mike

Arnd also recommends new kernel ports to use regsets for ptrace
(PTRACE_{GET,SET}REGSET rather than PTRACE_{PEEK,POKE}USER) so that
arch_ptrace() is a simple wrapper around ptrace_request. See here for
example:
http://marc.info/?l=linux-arch&m=135272829410342&w=2

So the offsets you've added to struct_user_offsets would need removing
too, and get_regs would need to use get_regset as is done for METAG etc.
Should simplify the code if anything though.

Cheers
James

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20140129/1e80389c/attachment.bin>


More information about the Strace-devel mailing list