From: Ananda Badmaev <a.badmaev@clicknet.pro>
To: Kees Cook <keescook@chromium.org>
Cc: Jonathan Corbet <corbet@lwn.net>,
linux-kernel@vger.kernel.org, Minchan Kim <minchan@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
linux-mm@kvack.org, linux-doc@vger.kernel.org,
Vitaly Wool <vitaly.wool@konsulko.com>,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
linux-next@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: Coverity: zblock_alloc(): Memory - illegal accesses
Date: Fri, 18 Nov 2022 22:44:17 +0300 [thread overview]
Message-ID: <536ede34-e360-78a5-ef6f-df032fa30154@clicknet.pro> (raw)
In-Reply-To: <202211180841.39558B5E5@keescook>
18.11.2022 19:43, Kees Cook пишет:
> Ah-ha, understood. Well, if you do want to catch it if there is ever a
> typo in the block_desc values (which are not obviously >4096 without
> sitting down and calculating them), perhaps add:
>
> if (WARN_ON(block_type >= ARRAY_SIZE(block_desc))
> return -ENOSPC;
>
>
Probably it would be better to add a single check on the largest
slot_size >= PAGE_SIZE at pool creation time.
prev parent reply other threads:[~2022-11-18 19:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-17 22:20 Coverity: zblock_alloc(): Memory - illegal accesses coverity-bot
2022-11-18 13:05 ` Ananda Badmaev
2022-11-18 16:43 ` Kees Cook
2022-11-18 19:44 ` Ananda Badmaev [this message]
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=536ede34-e360-78a5-ef6f-df032fa30154@clicknet.pro \
--to=a.badmaev@clicknet.pro \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=gustavo@embeddedor.com \
--cc=keescook@chromium.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-next@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=senozhatsky@chromium.org \
--cc=vitaly.wool@konsulko.com \
/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.