[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKdjhyA68LEs07UQA9my66ue4V=o_2EEHxsWC_ZKxdnc+uZqKA@mail.gmail.com>
Date: Thu, 20 Jul 2023 14:25:03 +0800
From: linke li <lilinke99@...il.com>
To: Mike Kravetz <mike.kravetz@...cle.com>
Cc: Dan Carpenter <dan.carpenter@...aro.org>,
Linke Li <lilinke99@...mail.com>,
David Hildenbrand <david@...hat.com>, linux-mm@...ck.org,
llvm@...ts.linux.dev, linux-kernel@...r.kernel.org,
trix@...hat.com, ndesaulniers@...gle.com, nathan@...nel.org,
muchun.song@...ux.dev
Subject: Re: [PATCH] hugetlbfs: Fix integer overflow check in hugetlbfs_file_mmap()
> > 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
Powered by blists - more mailing lists