From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f69.google.com (mail-it0-f69.google.com [209.85.214.69]) by kanga.kvack.org (Postfix) with ESMTP id 3CE3A6B000C for ; Tue, 6 Mar 2018 13:33:41 -0500 (EST) Received: by mail-it0-f69.google.com with SMTP id y1so7363iti.7 for ; Tue, 06 Mar 2018 10:33:41 -0800 (PST) Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id f65sor6573953ith.143.2018.03.06.10.33.40 for (Google Transport Security); Tue, 06 Mar 2018 10:33:40 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20180305143923.oefjqjiulaedax3y@lakrids.cambridge.arm.com> References: <20180305143923.oefjqjiulaedax3y@lakrids.cambridge.arm.com> From: Andrey Konovalov Date: Tue, 6 Mar 2018 19:33:38 +0100 Message-ID: Subject: Re: [RFC PATCH 08/14] khwasan: perform untagged pointers comparison in krealloc Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Mark Rutland Cc: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Jonathan Corbet , Catalin Marinas , Will Deacon , Theodore Ts'o , Jan Kara , Christopher Li , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Masahiro Yamada , Michal Marek , Ard Biesheuvel , Yury Norov , Nick Desaulniers , Marc Zyngier , Bob Picco , Suzuki K Poulose , Kristina Martsenko , Punit Agrawal , Dave Martin , James Morse , Julien Thierry , Michael Weiser , Steve Capper , Ingo Molnar , Thomas Gleixner , Sandipan Das , Paul Lawrence , David Woodhouse , Kees Cook , Geert Uytterhoeven , Josh Poimboeuf , Arnd Bergmann , kasan-dev , linux-doc@vger.kernel.org, LKML , Linux ARM , linux-ext4@vger.kernel.org, linux-sparse@vger.kernel.org, Linux Memory Management List , Linux Kbuild mailing list , Kostya Serebryany , Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Kees Cook , Jann Horn , Mark Brand On Mon, Mar 5, 2018 at 3:39 PM, Mark Rutland wrote: > On Fri, Mar 02, 2018 at 08:44:27PM +0100, Andrey Konovalov wrote: >> ret = __do_krealloc(p, new_size, flags); >> - if (ret && p != ret) >> + if (ret && khwasan_reset_tag((void *)p) != khwasan_reset_tag(ret)) > > Why doesn't khwasan_reset_tag() take a const void *, like > khwasan_set_tag() does? That way, this cast wouldn't be necessary. Will do, thanks! -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org