Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mregparm=0?



In article <486A3D61.60807%ural.org@localhost>,
Alexander Vysokovskih  <av%ural.org@localhost> wrote:
>Joerg Sonnenberger wrote:
>> AMD64 calling convention mandates use of registerse for the first six
>> (?) integer like parameters.
>>
>> Joerg
>Hmm... why gcc can't avoid  it? well it's a convention, not the law.

It could but it would make all libraries invalid since the ABI changes.
From a security perspective register parameters are a great things. Since
most functions take fewer than six arguments, the current calling convention
makes stack based attacks for calling functions with other than their
intended arguments very difficult (at least with todays tools).

christos



Home | Main Index | Thread Index | Old Index