Current->mm in Rust

I'm working on linux kernel and current is a macro that returns the pointer to the current process descriptor.
Specifically, current->mm is the pointer to the memory descriptors of the current process.
This is the code as follows:

    struct vm_area_struct *vma = find_vma(current->mm, start);
    if (vma != NULL)
    {
        do something();
        return 0;
    }
    else
    {
        pr_err("error");
        return 1;
    }

How can i express this in Rust? i found crates as Struct kernel::vm:mm:Area but i didn't find something that regards the current process.

If you're working with the in-tree kernel bindings, I think you want Task::current(). Off-hand, I don't see bindings to get its ->mm though.

There are also more specific venues to ask kernel questions listed here:

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.