Re: [patch] checksum P6 asm buffer overflow fix + 686 improvements

Andrea Arcangeli (andrea@suse.de)
Wed, 26 May 1999 22:29:33 +0200 (CEST)


On Wed, 26 May 1999, Andrea Arcangeli wrote:

>On Wed, 26 May 1999, Pavel Machek wrote:
>
>>You could do even more clever trick, something like
>>
>> if (!current->used_math) {
>> unlazy_fpu(current);
>> mmx_checksum();
>> } else normal_checksum();
>>
>>is pretty easy to do, yet it should work _very_ well.
>
>Hmm, it looks ok to me.

Ah, I overlooked the implementation. What we care is to only run mmx if
there is no FPU data to clobber (but we can run mmx even if the current
task used math in some previous timeslice). So the right implementation
should be this according to me:

if (!(current->flags & PF_USEDFPU))
checksum_mmx();
else
checksum_nommx();

Andrea Arcangeli

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/