Re: [PATCH, RESEND] procfs: silence lockdep warning about read vs. exec seq_file
From: Eric W. Biederman
Date: Mon Aug 04 2014 - 23:46:15 EST
"Kirill A. Shutemov" <kirill@xxxxxxxxxxxxx> writes:
> From: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>
>
> Testcase:
>
> cat /proc/self/maps >/dev/null
> chmod +x /proc/self/net/packet
> exec /proc/self/net/packet
>
> It triggers lockdep warning:
> I don't know why we allow "chmod +x" on some proc files, notably net-related.
> Is it a bug?
It looks like we simply did not remove the ability to make those files
executable when we realized executable proc files could be a problem.
I expect that part of proc could use an audit where someone figures out
what makes sense. It does appear that chmod XXX /proc/generic_file
is explicitly supported. So we would have to be delicate with any
changes in that area to avoid creating userspace regressions.
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/