From: Thomas Graf <tgraf@suug.ch>
To: jamal <hadi@cyberus.ca>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [G[PATCH 1/2][ENETLINK] max cmd boundary chec
Date: Fri, 1 Dec 2006 16:16:57 +0100 [thread overview]
Message-ID: <20061201151657.GH8693@postel.suug.ch> (raw)
In-Reply-To: <1164984758.3562.57.camel@localhost>
* jamal <hadi@cyberus.ca> 2006-12-01 09:52
> You cannot have more than 256 commands because 0x138 and 0x38 are
> treated as the same command. So does 0x238, 0x1138...
> It is useless/unneeded if the register ops will always see the chopped
> value. Is this so?
The interface enforces a proper value by the type it accepts which
is certainly more desireable than a runtime error. If you happen
to ignore compiler warnings, then maybe there is the problem. Despite
of all this, the patch you propose doesn't work anyway.
If you really want a runtime error you have to change the cmd field
in genl_ops to be of larger size and then just check > MAX_ARGS in
register_ops() rather than making get_cmd() more expensive which
is called for every message received. I don't see any reason why
this should be better than a compile warning.
next prev parent reply other threads:[~2006-12-01 15:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-01 11:30 [G[PATCH 1/2][ENETLINK] max cmd boundary chec jamal
2006-12-01 12:49 ` Thomas Graf
2006-12-01 14:30 ` jamal
2006-12-01 14:40 ` Thomas Graf
2006-12-01 14:52 ` jamal
2006-12-01 15:16 ` Thomas Graf [this message]
2006-12-01 15:54 ` jamal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061201151657.GH8693@postel.suug.ch \
--to=tgraf@suug.ch \
--cc=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).