Perf map file ownership check

From: Gaurav Jain
Date: Wed Jan 15 2014 - 11:42:04 EST


981c125 introduced a permission check on perf map files such that perf only loads the map file if it has ownership. Pekka mentioned that this prevents the perf tool from injecting arbitrary symbols from potentially malicious source.

In our workload, the code generating the map file is running as a non-root user. However, the perf tool is run as root. As a result, the ownership check fails and the map file is not loaded.

This raises 2 questions:
1. Is the ownership check necessary? What are the security implications of using symbols from an arbitrary source? I thought these are simply displayed by the perf tool.
2. Is there a way to avoid the check? Possibly with a -f flag.

Thanks,

Gaurav--
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/