if_tap unaligned access problem

Maksim Yevmenkin maksim.yevmenkin at savvis.net
Wed May 4 12:01:55 PDT 2005


Hello,

>>>>>>>>> i think we have few options here:
>>>>>>>>>
>>>>>>>>> 1) revert back original tapwrite function that was changed in 
>>>>>>>>> v. 1.48 and set offset to 2 bytes in top mbuf
>>>>>>>>>
>>>>>>>>> 2) change current version of tapwrite so it would m_prepend and 
>>>>>>>>> m_pullup mbuf after m_uiotombuf
>>>>>>>>>
>>>>>>>>> 3) change m_uiotombuf to accept one more parameter - mbuf 
>>>>>>>>> offset at which data should be copied. there are not that many 
>>>>>>>>> users of m_uiotombuf
>>>>>
>>>>>
>>>>> please find and review the attached patch (untested) that 
>>>>> implements option (3) above.
>>>
>>> any objections to the attached (revised) patch? can i commit it?
>>
>> I've tested the code on fbsd-current alpha and it fixes
>> the crash. I was kinda waiting for somebody to test it on
>> sparc, but that's taking a few days longer than expected.
>> I may run a test on one of my own sparcs to verify
>> the results.
>>
>> That said, the issue seems pretty clear-cut, as is the solution.
> 
> I've gotten confirmation that the patch also fixes the crash
> on RELENG_5/sparc64. Please commit.

thanks. because no one had objections (or rather no one replied :) i 
went ahead and committed this. so, you all know whom to blame :) as jmg 
pointed out "align" cannot exceed MHLEN bytes. it it trivial to change 
should anyone ever require bigger "align".

thanks,
max


> 



More information about the freebsd-net mailing list