On 6/10/22 07:35, Kirill A. Shutemov wrote:
+ /* Update CR3 to get LAM active */ + switch_mm(current->mm, current->mm, current);
Can you at least justify this oddity? When changing an LDT, we use a dedicated mechanism. Is there a significant benefit to abusing switch_mm for this?
Also, why can't we enable LAM on a multithreaded process? We can change an LDT, and the code isn't even particularly complicated.