Re: Modutils can't handle long kernel names

From: Robert Love (rml@tech9.net)
Date: Fri Nov 09 2001 - 00:40:12 EST


On Fri, 2001-11-09 at 00:23, Mike Fedyk wrote:
> I've gotten into the habbit of adding the names of the patches I add to my
> kernel to the extraversion string in the top level Makefile in my kernels.

Everything in-kernel is going to be OK because we set the version string
like so:

        char version[] = UTS_RELEASE;

where UTS_RELEASE is set from the variables in your Makefile. Thus, the
string is set to the exact size of your version on compile. If you find
anywhere _inside the kernel_ that breaks with long strings, it is
probably a bug.

Userspace is a different story. In general, most programs probably do
not have dynamic off-the-heap storage for the version string size.
Added such a feature may be advantageous in some cases, but in many it
is overkill and not worth the dynamic memory management.

I would consider the case where a large string crashes a user space
program a bug. While the program may choose to set some limit, it
should certainly check its buffers. I would also consider an abnormally
small legal string size a bug, but I honestly don't see your version
size fitting that description. :)

Anyhow, if you want to change it in a given app, its a simple size that
needs to be changed and then recompile.

        Robert Love

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 15 2001 - 21:00:21 EST