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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 70259C54EE9 for ; Thu, 22 Sep 2022 15:56:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id F3D776112B; Thu, 22 Sep 2022 15:56:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org F3D776112B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1663862202; bh=XcmXX4equVEY6sJah9SPYPMzv2AVoG3K6QuMFciJWao=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=r3uO646IGvKiyrUxgmZ7UOVOwfxuD0Gw7useeQ/eNkE+Knst2+Qs3eJ6ow5FwLg/2 nxaO1H9APyB8au+Jtwi307UA6mjWu/8a4s2zoxFewbBGDjcc7aLrMKo3WWE54aG8YC fl92HWPMIdJfvwEyacBSO+iu+GITt62k88iF9bPSl0nTDuhnU3/PcY8x3yteVtF5Vj pI0/pmM4NTzLQSTw9VmovD6VnTTZ6yNShGYn+4Bu3ldhZAEA+OiXqPYLns5s06zhtN el8PuWDnnjymJktC+//irQouRTkG7SraJ1VRY+PUkhJUCmLfQ61UisQN3UgrG5HzrW Fs2VX7JcubJgw== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sf-bua11VTcG; Thu, 22 Sep 2022 15:56:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 0784F6112D; Thu, 22 Sep 2022 15:56:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 0784F6112D Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 1B7751BF359 for ; Thu, 22 Sep 2022 15:56:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id E9F6483F01 for ; Thu, 22 Sep 2022 15:56:38 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org E9F6483F01 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id izTWZMRBnG8A for ; Thu, 22 Sep 2022 15:56:38 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 4858483F10 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by smtp1.osuosl.org (Postfix) with ESMTPS id 4858483F10 for ; Thu, 22 Sep 2022 15:56:38 +0000 (UTC) Received: by mail-pj1-x102e.google.com with SMTP id fv3so10278598pjb.0 for ; Thu, 22 Sep 2022 08:56:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=TZpRIJCCMZKyVUgNnwboEjnHYpEIRQBSXZlSwc7OZ+0=; b=OBomD3X1N1Z9fCewNH+UNtA7iRvjJrYYddgfl25NzpPed0gk6VZO7lEmtTn0Z7DX34 bHkAPxpZmXNOyBTSLLONg9pdRg8r8Bs9i/pw5eW3DkYY9qR/63rW+7zGjTi6SlWg+08l 2iz+kIAXY7/UqYvhUMsO8MDGEnfWHeqizvyBECh/RSU6QOhVoYCxxcBwHfKAbLMdtqRA 9nCUYLzH4zonI7OeLkpkTo7Yjfax5lGZ2wdNrBOhf+iim0u8aaI9ppbiBhLBqJuvyi/Z Vl4d9/jXu6fisU0cIja/i2TJNchawI8gxveusazFGt4bCHf+cWmjzerrayAJn5e/wIwC pkiA== X-Gm-Message-State: ACrzQf2VxW32SpaUVfGksEHxPFIBWP8+DK1N9qXl+qTlYTMemG5ynESQ kJr6Ah6vLv4iHu5BDvugnj9F7Q== X-Google-Smtp-Source: AMsMyM6wj70ZRZNEGtsTQjOpU6Y4OkbiX+0Wag8Z4tUWxe6CdbDk3WijTof+igifPO84VXufZHizeQ== X-Received: by 2002:a17:90b:4d8e:b0:200:73b4:4da2 with SMTP id oj14-20020a17090b4d8e00b0020073b44da2mr16393990pjb.197.1663862197527; Thu, 22 Sep 2022 08:56:37 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id b5-20020a170902d50500b00176ca533ea0sm4327600plg.90.2022.09.22.08.56.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 08:56:36 -0700 (PDT) Date: Thu, 22 Sep 2022 08:56:35 -0700 From: Kees Cook To: Miguel Ojeda Message-ID: <202209220855.B8DA16E@keescook> References: <20220922031013.2150682-1-keescook@chromium.org> <20220922031013.2150682-12-keescook@chromium.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=TZpRIJCCMZKyVUgNnwboEjnHYpEIRQBSXZlSwc7OZ+0=; b=lKwDDBjvYm/0Jleq+GCxBaTtwnHH7tK+nJ5dJ9Mroo7Wx2WiOGB/Kmka/kC9bYFq8z aE3zrV852KZPixgDhOan1L1Vq5Tj1ydcVjIMjp+7gLHmlIsooLMnRpZ01jzKR4yf16m5 6AQEJMsyFTKj/8+82bO+4x4lXyaSTMa1R26kY= X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=lKwDDBjv Subject: Re: [Intel-wired-lan] [PATCH 11/12] slab: Remove __malloc attribute from realloc functions X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Feng Tang , linux-wireless@vger.kernel.org, llvm@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-mm@kvack.org, Eric Dumazet , linux-hardening@vger.kernel.org, Sumit Semwal , dev@openvswitch.org, x86@kernel.org, intel-wired-lan@lists.osuosl.org, David Rientjes , Miguel Ojeda , Yonghong Song , Paolo Abeni , linux-media@vger.kernel.org, Marco Elver , Josef Bacik , linaro-mm-sig@lists.linaro.org, Jakub Kicinski , David Sterba , Andrew Morton , Vlastimil Babka , Hao Luo , Alex Elder , Greg Kroah-Hartman , Nick Desaulniers , linux-kernel@vger.kernel.org, "David S. Miller" , Pekka Enberg , Daniel Micay , netdev@vger.kernel.org, linux-fsdevel@vger.kernel.org, Joonsoo Kim , Christian =?iso-8859-1?Q?K=F6nig?= , linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Thu, Sep 22, 2022 at 11:23:46AM +0200, Miguel Ojeda wrote: > 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). I wasn't sure if this "composite macro" was sane there, especially since it would be using __malloc before it was defined, etc. Would you prefer I move it? -- Kees Cook _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan