From: Kevin Dawson <kevind@esi.com.au>
To: wharms@bfs.de
Cc: linux-hams@vger.kernel.org, netdev <netdev@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] ax25: unsigned cannot be less than 0 in ax25_ctl_ioctl()
Date: Wed, 14 Oct 2009 08:50:15 +1100 [thread overview]
Message-ID: <4AD4F617.4090300@cerebellum.kd> (raw)
In-Reply-To: <4AD44CF6.1070801@bfs.de>
walter harms wrote:
>
> Kevin Dawson schrieb:
>>
>> if (ax25_ctl.arg > ULONG_MAX / HZ && ...
>
> i like this because it prevents a wrap around for stupid ax25_ctl.arg values but will not help when
> ax25_ctl.arg * HZ is used later. NTL i think HZ does not need to be constant these days but i am not an
> expert on that area.
I don't have a kernel source tree at the moment, so I haven't seen where
it's used, but the same size-limiting principle using divisions would
apply whether you have constants, variables or function calls.
If ax25_ctl.arg * HZ is used later, one should arrange that the thread
won't get that far if it has already been deemed an excessive value.
Kevin
next prev parent reply other threads:[~2009-10-13 21:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-10 21:22 [PATCH] ax25: unsigned cannot be less than 0 in ax25_ctl_ioctl() Roel Kluin
2009-10-12 15:37 ` walter harms
2009-10-12 19:02 ` Roel Kluin
2009-10-12 21:58 ` Kevin Dawson
2009-10-13 9:48 ` walter harms
2009-10-13 21:50 ` Kevin Dawson [this message]
2009-10-14 15:26 ` Roel Kluin
2009-10-30 6:06 ` David Miller
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=4AD4F617.4090300@cerebellum.kd \
--to=kevind@esi.com.au \
--cc=akpm@linux-foundation.org \
--cc=linux-hams@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=wharms@bfs.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.