linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: linke li <lilinke99@gmail.com>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
	Linke Li <lilinke99@foxmail.com>,
	 David Hildenbrand <david@redhat.com>,
	linux-mm@kvack.org, llvm@lists.linux.dev,
	 linux-kernel@vger.kernel.org, trix@redhat.com,
	ndesaulniers@google.com,  nathan@kernel.org,
	muchun.song@linux.dev
Subject: Re: [PATCH] hugetlbfs: Fix integer overflow check in hugetlbfs_file_mmap()
Date: Thu, 20 Jul 2023 14:25:03 +0800	[thread overview]
Message-ID: <CAKdjhyA68LEs07UQA9my66ue4V=o_2EEHxsWC_ZKxdnc+uZqKA@mail.gmail.com> (raw)
In-Reply-To: <20230719232248.GC3240@monkey>

> > What about using the check_add_overflow() macro?
>
> I like the macro.  It seems to have plenty of users.
>
> Linke Li, what do you think?  If you like, please send another path
> using the macro as suggested by Dan.

Thanks for Dan's advice. I have tested this macro in gcc-9 and clang-14, it
can work well in both compilers and regardless of whether "-fno-strict-overflow"
 is added or not.

I will send a new patch.

Best Regards


  reply	other threads:[~2023-07-20  6:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10  8:32 Linke Li
2023-07-10 16:12 ` Markus Elfring
2023-07-11 11:49 ` David Hildenbrand
2023-07-12 23:58   ` Mike Kravetz
2023-07-13  7:57     ` linke li
2023-07-13 15:10       ` Dan Carpenter
2023-07-19 23:22         ` Mike Kravetz
2023-07-20  6:25           ` linke li [this message]
2023-07-13  7:55   ` linke li
2023-07-14 12:52     ` Matthew Wilcox
2023-07-17  7:33       ` linke li
2023-07-10  9:02 Alexey Dobriyan

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='CAKdjhyA68LEs07UQA9my66ue4V=o_2EEHxsWC_ZKxdnc+uZqKA@mail.gmail.com' \
    --to=lilinke99@gmail.com \
    --cc=dan.carpenter@linaro.org \
    --cc=david@redhat.com \
    --cc=lilinke99@foxmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=llvm@lists.linux.dev \
    --cc=mike.kravetz@oracle.com \
    --cc=muchun.song@linux.dev \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=trix@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox