Re: [PATCH 16/24] link_path_walk: kill the recursion

2015-04-20 Thread Al Viro
On Mon, Apr 20, 2015 at 02:39:43PM -0700, Linus Torvalds wrote: > On Mon, Apr 20, 2015 at 2:32 PM, Al Viro wrote: > > > > What kilobyte? It's 9*4 pointers, IOW, 288 bytes total (assuming 64bit > > box). > > You also said that you were going to up the recursion limit to 40.. So > 40*3*8 bytes..

Re: [PATCH 16/24] link_path_walk: kill the recursion

2015-04-20 Thread Al Viro
On Mon, Apr 20, 2015 at 02:42:56PM -0700, Linus Torvalds wrote: > On Mon, Apr 20, 2015 at 2:41 PM, Linus Torvalds > wrote: > > > > And no, we will *never* lift the recursion limit. Not for 1kB, not for > > 1MB. Never. > > Just to clarify: that's for the "remove restrictions completely". > Upping

Re: [PATCH 16/24] link_path_walk: kill the recursion

2015-04-20 Thread Al Viro
On Mon, Apr 20, 2015 at 02:41:31PM -0700, Linus Torvalds wrote: > On Mon, Apr 20, 2015 at 2:32 PM, Al Viro wrote: > > > > A kilobyte would suffice for 32 levels. _IF_ we go for "lift the > > restrictions > > on nesting completely", sure, we want to switch to (on-demand) dynamic > > allocation. >

Re: [PATCH 16/24] link_path_walk: kill the recursion

2015-04-20 Thread Linus Torvalds
On Mon, Apr 20, 2015 at 2:41 PM, Linus Torvalds wrote: > > And no, we will *never* lift the recursion limit. Not for 1kB, not for > 1MB. Never. Just to clarify: that's for the "remove restrictions completely". Upping it to 32 or 40 would be fine. But not with allocations on the stack.

Re: [PATCH 16/24] link_path_walk: kill the recursion

2015-04-20 Thread Linus Torvalds
On Mon, Apr 20, 2015 at 2:32 PM, Al Viro wrote: > > A kilobyte would suffice for 32 levels. _IF_ we go for "lift the restrictions > on nesting completely", sure, we want to switch to (on-demand) dynamic > allocation. And no, we will *never* lift the recursion limit. Not for 1kB, not for 1MB. Nev

Re: [PATCH 16/24] link_path_walk: kill the recursion

2015-04-20 Thread Linus Torvalds
On Mon, Apr 20, 2015 at 2:32 PM, Al Viro wrote: > > What kilobyte? It's 9*4 pointers, IOW, 288 bytes total (assuming 64bit box). You also said that you were going to up the recursion limit to 40.. So 40*3*8 bytes.. Linus -- To unsubscribe from this list: send the line "unsubs

Re: [PATCH 16/24] link_path_walk: kill the recursion

2015-04-20 Thread Al Viro
On Mon, Apr 20, 2015 at 02:04:53PM -0700, Linus Torvalds wrote: > That said, you then introduce a stack-allocated "struct saved stack[]" > in path_mountpoint[] instead, *and* nameidata is saved on stack, so > this all ends up being very stack-intensive anyway. > > I might have missed some patch h

Re: [PATCH 16/24] link_path_walk: kill the recursion

2015-04-20 Thread Linus Torvalds
On Mon, Apr 20, 2015 at 11:13 AM, Al Viro wrote: > */ > static int link_path_walk(const char *name, struct nameidata *nd) > { > + struct saved { > + struct path link; > + void *cookie; > + const char *name; > + } stack[MAX_NESTED_LINKS], *l