[Gnuk-users] Patch

Bastien ROUCARIES roucaries.bastien at gmail.com
Tue Nov 8 09:24:55 UTC 2016


On Tue, Nov 8, 2016 at 12:59 AM, NIIBE Yutaka <gniibe at fsij.org> wrote:
> On 11/08/2016 05:45 AM, Bastien ROUCARIES wrote:
>> could you apply this patch ?
>
> Thank you for suggestion.  But, for the particular patch, sorry, no
> thanks.  It's not needed and it's not correct.
>
> Please understand that I don't share your points.  For me, it's:
>
> * Thread ID as uint32_t is valid for 32-bit architecture.

Yes but not for posix port that will need thread_id to be a pointer to
some structure. Thus need to be a uintptr_t for posix port.

If you are nervous about size I can add a BUILD_BUG_ON


>
> * Stack address as uint32_t is valid for 32-bit architecture.  If
>   change to some pointer were really needed, it should be void *

Ok for will set to void *

>> I plan also to implement a POSIX layer using pthread.
>
> That would be interesting for some experiments of code of Gnuk on host
> PC.  It could also help some validation for crypto computation.
>
> Actually, by contributors, parts of Gnuk is intensively tested on host
> PC with ARM architecture which supports Thumb instruction.
>
>> I think chopstx should be split between port specific and not port
>> specific port.
>
> In general, yes.  It's good for a porter if the code is separated into
> machine specific part and independent part.  On the other hand, for an
> auditor, if there are many different but similar files, it's a cause
> of headache.
>
> Currently, it's handy and simple.
>
> Please never increasing difficulty to read.  Keep it simple, don't
> increase things.  Please do not introduce something like "layer"
> which may make the code complex and make audit difficult.

No layer function with asm will be set to port with generic
implementation. A little bit a linux kernel.

Abstraction is bad for ucontroler

>
> _______________________________________________
> gnuk-users mailing list
> gnuk-users at lists.alioth.debian.org
> https://lists.alioth.debian.org/mailman/listinfo/gnuk-users



More information about the gnuk-users mailing list