Re: [PATCH] changing process privileges via procfs

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

 



Hi...

On Wed, May 7, 2008 at 2:23 AM, Enrico Weigelt <weigelt@xxxxxxxx> wrote:
>
>  Hi folks,
>
>  here's a patch which allows changing process' privileges via
>  procfs.
>
>  Suggestions and testing appreciated.

The idea is interesting for me :) Anyway, I think proc_pid_##FIELD
could be made as static inline, and instead of putting "switch" into
it, maybe you can split it as proc_pid_##FIELD_{read,write}. Thus the
function is smaller and the code path can be made faster (no branch,
no call)

BTW, isn't "page" in proc_tasklv_read() should be written as" struct
page *page" instead?

Also, get_proc_task should be put after __get_free_pages, thus if
somehow the functions must sleep, it does so without holding
task_struct's lock. Don't you guys agree?

That's all so far, I hope my suggestion is useful...

regards,

Mulyadi.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux