From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9740CC6FA90 for ; Thu, 22 Sep 2022 09:24:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229449AbiIVJYA (ORCPT ); Thu, 22 Sep 2022 05:24:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbiIVJX6 (ORCPT ); Thu, 22 Sep 2022 05:23:58 -0400 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 248554623D; Thu, 22 Sep 2022 02:23:58 -0700 (PDT) Received: by mail-io1-xd30.google.com with SMTP id v128so7156059ioe.12; Thu, 22 Sep 2022 02:23:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=eq1ulTtXYhBmIV3Hec+MzaFRLDXw1vSRF6+bOMmPhJ4=; b=bE2W6qfxPeZ5hG8th9HBte8uWTQjYuCcr36yI1hhiheOM64/zofTi1amyoUC/YRb+J NgesQGAjTL00GMSehk4Np33KVgoKvpm/Mh3RSzMdF+EkL5Y4k9K6GB3q17DXyKsUm/6E tSUleWEaIUryrEiqLEE56d9SYCS/YFMrs6gU37f7Pqu7tr26K2zmBNy6tAGoGVxQ5f+n DlMD1/oSQBrQp/QHyG7CgFktY+50H+Wm33tTFaH8FxMf0iDQdWTe9OU6Ok7FDH/xYrVm +Y17qm2jbLBl43Ckz4h9g/NlAB7oNcZMDPJUHArvKPR8Jrr0Y7Jjk4kBCdA2lo60DN3B Aphg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=eq1ulTtXYhBmIV3Hec+MzaFRLDXw1vSRF6+bOMmPhJ4=; b=XAbmbADnMx1d4MDhg9mZ+JCOlI8v/mXVbJmgFFJ4Aha0fj2C83T1uAOyMi0keOy7K4 KC+ensOGk3/jP4BgR2XdHhNAn93UyKOSIEgMf83cKIZKiE2MNlRG5qPZFsUArLGslWsJ jF9y/EydOKtZLPkyUu3S3t8e9NfvRnbFuKeMjUE9K0SmjdtHhvMtaEmQ64qmYRHfSENC JxESA9v7yr4OtqcwnuPULcp59C6JPo/IoCzGIQerj5Ou60Hvqr8Z9xeZwe9xHPYhI2W6 DUHUuEJ5Y8NOmpVQYVd0W7p2/s2dveW4DIEGZEKoIC0PSA05aTSG6RSya1vn2/kU+69Z L75A== X-Gm-Message-State: ACrzQf356hDtiQ4/84mEVGMqKbAvLC7HqVZ0tzelr+KA+/rC59b3RnhR cty9X7VDst/qGKH/RjuahRI6dGocnqKY98FaYxs= X-Google-Smtp-Source: AMsMyM4VmAwcaT5Lc+Ww++2Y7GpjHXOf8JO1cC9hLR1vHps4lN+vAXggqFNSedolxw1DncuzKFlDGIHvcmXTBzRY/kM= X-Received: by 2002:a05:6638:dcc:b0:35a:7ba6:ad51 with SMTP id m12-20020a0566380dcc00b0035a7ba6ad51mr1404409jaj.256.1663838637536; Thu, 22 Sep 2022 02:23:57 -0700 (PDT) MIME-Version: 1.0 References: <20220922031013.2150682-1-keescook@chromium.org> <20220922031013.2150682-12-keescook@chromium.org> In-Reply-To: <20220922031013.2150682-12-keescook@chromium.org> From: Miguel Ojeda Date: Thu, 22 Sep 2022 11:23:46 +0200 Message-ID: Subject: Re: [PATCH 11/12] slab: Remove __malloc attribute from realloc functions To: Kees Cook Cc: Vlastimil Babka , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Nick Desaulniers , Hao Luo , Marco Elver , linux-mm@kvack.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Greg Kroah-Hartman , Alex Elder , Josef Bacik , David Sterba , Sumit Semwal , =?UTF-8?Q?Christian_K=C3=B6nig?= , Jesse Brandeburg , Daniel Micay , Yonghong Song , Miguel Ojeda , Jacob Shin , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-fsdevel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, dev@openvswitch.org, x86@kernel.org, linux-wireless@vger.kernel.org, llvm@lists.linux.dev, linux-hardening@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-hardening@vger.kernel.org On Thu, Sep 22, 2022 at 5:10 AM Kees Cook wrote: > > -#ifdef __alloc_size__ > -# define __alloc_size(x, ...) __alloc_size__(x, ## __VA_ARGS__) __malloc > -#else > -# define __alloc_size(x, ...) __malloc > -#endif > +#define __alloc_size(x, ...) __alloc_size__(x, ## __VA_ARGS__) __malloc > +#define __realloc_size(x, ...) __alloc_size__(x, ## __VA_ARGS__) These look unconditional now, so we could move it to `compiler_attributes.h` in a later patch (or an independent series). Cheers, Miguel