Re: [PATCH 18/25] dynamic_debug: Introduce global fake module param module.ddebug

From: Jim Cromie
Date: Thu Dec 01 2011 - 03:15:53 EST


>
> I think you're missing a neat trick here: we should be able to handle
> ddebug in the handle_unknown parameter to parse_args().
>
> Or am I missing something?
>

Jason suggested that too, offlist.
I pretty much agreed, but wanted to get the 1st 17 sent.

What gave me pause was this:
pr_debug("Unknown argument: calling %p\n", handle_unknown);

it made me think about a common handler to deal with it 1st,
before the /* Find parameter */ loop, so that modules couldnt hijack
the dyndbg param, defeating the common handler.
OTOH, the BUILD_BUG_DECL prevents that hijack.

Maybe the best answer is silence the print when param is properly handled.

if (handle_unknown) {
int rc = handle_unknown(param, val);
if (rc)
pr_debug("Unknown argument: calling %p\n",
handle_unknown);
return rc;
}

I'll do this shortly, see how it works out..
thanks

> Thanks,
> Rusty.
--
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/