tech-kern archive

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


On 24.09.2011 22:03, Christos Zoulas wrote:
NAME_MAX = 255

dirent uses MAXPATHLEN, namei uses NAME_MAX and does not allow it to exceed
that, so none of the dirent entries actually use>  255. We want to make them

I tried to do this by versioning both kernel and userland. The
kernel portion is fine, but the userland portion is really messy.
To do the userland portion right, we need to version again, all
the *dir*() functions including the internal ones like _scandir().

My opinion is that it is not worth the trouble. The only programs that can
fail are ones that do things like:
      char name[NAME_MAX];
      strcpy(name, d->d_name);

sizeof(d->d_name) does not change. It is just that d_namelen can be >
255 (NAME_MAX). Only programs that use NAME_MAX to store directory
entries can fail.

My vote is to bump without versioning, what's yours?

Hmm, what do you want to do there? Increase NAME_MAX or decrease MAXNAMLEN?

I would do the latter; ffs, ext2 and lfs all seem to use 255 for MAXNAMLEN. So, I cast my vote for "bump without versioning".

Jean-Yves Migeon

Home | Main Index | Thread Index | Old Index