RE: [PATCH 4/9] pstore: Allow the user to explicitly choose abackend

From: Luck, Tony
Date: Wed Jul 20 2011 - 10:29:25 EST


> > + if (backend && strcmp(backend, psi->name)) {
>
> Is there a limit of how big the backend name can be? If so would it
> make sense to use to strncmp?

I'd expect that the name will generally be short. It does get
embedded in the names of files that appear in the pstore file
system - so there is a 255 pathname component limit, which means
that backends should limit themselves to 200 or so characters.

So I suppose we could check to see if the backend is trying
to use a name so long that it would cause problems - but I'm
not sure how much value that would really add. I don't think
that loading pstore modules with dumb names is an interesting
attack vector.

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