From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f181.google.com (mail-il1-f181.google.com [209.85.166.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 817647C for ; Thu, 22 Sep 2022 17:41:19 +0000 (UTC) Received: by mail-il1-f181.google.com with SMTP id h14so1481182ila.12 for ; Thu, 22 Sep 2022 10:41:19 -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=AsxpWsr5dzcIncNfx/+Sw1HyEwfMiBKVAKBEW7wNeQA=; b=HG1BCa9aD7EruuXSP8vfBpl2xSAcB9NgvDE4n3t4WegezK8iPhrhfTbs3Xxfdxp/aP 0j4XfOQ90rYJJLxvR5Fxutq+CKSR+3NwG5g3gHNWC0rGeSJkCPwM1qeiyt5MoX9kie1E Ogc+09wvN660uSYqTrtW/DY7BHEKikOuBqjuMNkdFuICid58Qmi9sfyROy/V1LgkIpE7 e2Nv1gEo4Vp0GQpWl3bRqM1059jceqcIcZbW6os/ZnPJ8J1PnWKNgSi8e2+WYP/WJpYk +8abyMsCFGIX1fgDuD8Pv5kCGUDjVFxUFNtnD5auEWqa0LNmLWv9bnrrUipYT443cCtB +LNg== 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=AsxpWsr5dzcIncNfx/+Sw1HyEwfMiBKVAKBEW7wNeQA=; b=TlgS69TgPkMajflY7P4PCr12a7vJJfBDjObqnvA6vW43vBIo53a3fSHF3rkucP/1bN 3FVnySiq4BRO1VRZ6jLyeR5yYIaAiE13XD1rKMnlqzceZHzDVEHXwxs4bIrQZ/Nbc6ac MqR8yeFC2pIexUXu9NnoQtXzmHiQPoANmZscxmjhgONTC7sT2/3Xw7cSBA1yLcCV2TCI w6quowiV5o+u9Bx8lyJT23cUog8+utYFPf+Vq42lpPvrQ1HD7cn52krajcfFjFPt1++R Kkb5XOZSWXT7LkCMrbejpkfu5X3oex0e9oK8bF6lhKu6+/aHnMPOjNjzy3rjYZHQd/Ls bi5w== X-Gm-Message-State: ACrzQf0vsjh1eIXifJxYhyMcwXD/TwCZ3vzniBkFpmoOqSjZm5wGiOvp yZDmYLUTVue1P8OsSW03Hgj815NS5aY+bDGkldc= X-Google-Smtp-Source: AMsMyM5Iawxjt3SoOGTNllk8NVk3tyvcsl1U/lS7sz1j/GB7JoPgBuMEGvT0T6zJ1tbupUccXP7nLvzrv1dgRwQijjQ= X-Received: by 2002:a05:6e02:152a:b0:2f6:58ae:ff0c with SMTP id i10-20020a056e02152a00b002f658aeff0cmr2429401ilu.237.1663868478589; Thu, 22 Sep 2022 10:41:18 -0700 (PDT) Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20220922031013.2150682-1-keescook@chromium.org> <20220922031013.2150682-12-keescook@chromium.org> <202209220855.B8DA16E@keescook> In-Reply-To: <202209220855.B8DA16E@keescook> From: Miguel Ojeda Date: Thu, 22 Sep 2022 19:41:07 +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 , Feng Tang , 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" On Thu, Sep 22, 2022 at 5:56 PM Kees Cook wrote: > > 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? Hmm... On one hand, they end up being attributes, so it could make sense to have them there (after all, the big advantage of that header is that there is no `#ifdef` nest like in others, and that it is only for attributes). On the other hand, you are right that the file so far is intended to be as simple as possible (`__always_inline` having an extra `inline` and `fallthrough` would be closest outliers), so if we do it, I would prefer to do so in an independent series that carries its own rationale. So I would leave the patch as it is here. Cheers, Miguel 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 AE750C6FA91 for ; Thu, 22 Sep 2022 17:41:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2D52610E26F; Thu, 22 Sep 2022 17:41:23 +0000 (UTC) Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4B93B10E074 for ; Thu, 22 Sep 2022 17:41:19 +0000 (UTC) Received: by mail-il1-x12c.google.com with SMTP id y15so5276674ilq.4 for ; Thu, 22 Sep 2022 10:41:19 -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=AsxpWsr5dzcIncNfx/+Sw1HyEwfMiBKVAKBEW7wNeQA=; b=HG1BCa9aD7EruuXSP8vfBpl2xSAcB9NgvDE4n3t4WegezK8iPhrhfTbs3Xxfdxp/aP 0j4XfOQ90rYJJLxvR5Fxutq+CKSR+3NwG5g3gHNWC0rGeSJkCPwM1qeiyt5MoX9kie1E Ogc+09wvN660uSYqTrtW/DY7BHEKikOuBqjuMNkdFuICid58Qmi9sfyROy/V1LgkIpE7 e2Nv1gEo4Vp0GQpWl3bRqM1059jceqcIcZbW6os/ZnPJ8J1PnWKNgSi8e2+WYP/WJpYk +8abyMsCFGIX1fgDuD8Pv5kCGUDjVFxUFNtnD5auEWqa0LNmLWv9bnrrUipYT443cCtB +LNg== 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=AsxpWsr5dzcIncNfx/+Sw1HyEwfMiBKVAKBEW7wNeQA=; b=Gpc3yoR56yyD+g8bmSC0XwPTSxwRsWjHr4ytH48Uf6dbgRMuOvMKTKH00Z0JgJ4B4d dJFmRyN8vt3hoRHCtTKaED21QXLkJ8ewHqfgbSuG365GHrvSar7nwHJYoXBaciPKXy1K /hJEdv9uaVSThL1QlBa0qTLXrMmlYV6TEdYyRVx6/nya3aPbR13nHBzFCrQ5Zh/Pgt+m sD6Uunxu1lVaNDE85hqlcRs3a8I/Sn3bcGTawQHsWFVXr6IoU8embjBExXoKavq3pgEp IykCQ6An+wVxHmZYT9gSGw9kvaJcQF7Y7CFTYiyAd8u1ME7jOzxVBhjia1UhfKN3ee5j 6S7g== X-Gm-Message-State: ACrzQf2SuKfht2q9YiZB8L77yl2sH5Y+gbrRQqaoJyPXrn8BF/a2y795 tEiIw4kxsfks26ZnW5GDMr9ROBwkE8I+A69J3Nk= X-Google-Smtp-Source: AMsMyM5Iawxjt3SoOGTNllk8NVk3tyvcsl1U/lS7sz1j/GB7JoPgBuMEGvT0T6zJ1tbupUccXP7nLvzrv1dgRwQijjQ= X-Received: by 2002:a05:6e02:152a:b0:2f6:58ae:ff0c with SMTP id i10-20020a056e02152a00b002f658aeff0cmr2429401ilu.237.1663868478589; Thu, 22 Sep 2022 10:41:18 -0700 (PDT) MIME-Version: 1.0 References: <20220922031013.2150682-1-keescook@chromium.org> <20220922031013.2150682-12-keescook@chromium.org> <202209220855.B8DA16E@keescook> In-Reply-To: <202209220855.B8DA16E@keescook> From: Miguel Ojeda Date: Thu, 22 Sep 2022 19:41:07 +0200 Message-ID: Subject: Re: [PATCH 11/12] slab: Remove __malloc attribute from realloc functions To: Kees Cook Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - 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, Jesse Brandeburg , 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 , =?UTF-8?Q?Christian_K=C3=B6nig?= , linux-btrfs@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, Sep 22, 2022 at 5:56 PM Kees Cook wrote: > > 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? Hmm... On one hand, they end up being attributes, so it could make sense to have them there (after all, the big advantage of that header is that there is no `#ifdef` nest like in others, and that it is only for attributes). On the other hand, you are right that the file so far is intended to be as simple as possible (`__always_inline` having an extra `inline` and `fallthrough` would be closest outliers), so if we do it, I would prefer to do so in an independent series that carries its own rationale. So I would leave the patch as it is here. Cheers, Miguel 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 A07E6C6FA82 for ; Thu, 22 Sep 2022 17:41:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 3535D606AA; Thu, 22 Sep 2022 17:41:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3535D606AA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1663868483; bh=NviBweVOduLDifpcXcXwTAPqZgAZVXrXA2zdZRayuCg=; h=References:In-Reply-To:From:Date:To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=4L9L5/4GLBnx8oc8XFTUbuUSLf5+rW39Ek8qRGdxHqNcoVf5vQUtAzKyeqVIhbCC+ LcWwsdThMCaGprRV9NJN+GP4jBjdeaqVNYmgVX4NxKzAMLXzamC8lHAB6ssOBGvFud Uimi54U3C7nkBgyM8g6eRiKR6jeVOH5CKI8sgCFOcCpyOWZwfthKtEXw6AFsIj4o5u MU/wgvtzBqTIFQwVRdE0i3NQ6uDIq9laRncQ6sXnDWVrFXcZgbV7oYP2+MDe6bxsPd rGhjQI6MFSM7V5PS0tSF84A+TJZpRJdbi3ci2v8HnLMaGz9pcrZwSSGBcAtV7kP+3e X6OmQVd1ndJ4w== 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 E7a9oDXIIzmO; Thu, 22 Sep 2022 17:41:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 22168606B0; Thu, 22 Sep 2022 17:41:22 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 22168606B0 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 6D2321BF955 for ; Thu, 22 Sep 2022 17:41:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 5217A40457 for ; Thu, 22 Sep 2022 17:41:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 5217A40457 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vI_EUxTSURQd for ; Thu, 22 Sep 2022 17:41:19 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 7186B403A7 Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by smtp4.osuosl.org (Postfix) with ESMTPS id 7186B403A7 for ; Thu, 22 Sep 2022 17:41:19 +0000 (UTC) Received: by mail-il1-x12a.google.com with SMTP id a2so1533204iln.13 for ; Thu, 22 Sep 2022 10:41:19 -0700 (PDT) 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=AsxpWsr5dzcIncNfx/+Sw1HyEwfMiBKVAKBEW7wNeQA=; b=xYg7eNH2E59ifGSKJ3gYbC9iEd9Gobl0j03aup9GarMlNYU+LGDaRf1vkMUJSwxVMt P9cnaMa8VkWJxEc/53fAyo+bQqm6Ywez2DzyISq1vf41DfQkqk8yEpk/gQZ4XrS+cm+o TWBtoUx8yStGo4K333CErzozRIqMVp8gFo4Xw8/dXs6MupgOA1iKPeFosmuLB6pqDXAs CAqwwTTLaVpp9s7ETpCGn0tiE6YRy7YybHprdllLncbM2D84EutjcykUC+mpCrDciNRQ WFYzEoCSj/1d6ffvX34wV+6OIxd1q0oysFZtdF7yXmXQzNqi8TXPq0+Qqig4lglE1q3T pmNg== X-Gm-Message-State: ACrzQf2y3bUHYyCeq4g7N/4sg5L4455F+GcUUsSA9fxrUb5Umhzx6ExN Zb0kvAlue8flK4omz1ela+vnCdqCYOyxS3GIT8s= X-Google-Smtp-Source: AMsMyM5Iawxjt3SoOGTNllk8NVk3tyvcsl1U/lS7sz1j/GB7JoPgBuMEGvT0T6zJ1tbupUccXP7nLvzrv1dgRwQijjQ= X-Received: by 2002:a05:6e02:152a:b0:2f6:58ae:ff0c with SMTP id i10-20020a056e02152a00b002f658aeff0cmr2429401ilu.237.1663868478589; Thu, 22 Sep 2022 10:41:18 -0700 (PDT) MIME-Version: 1.0 References: <20220922031013.2150682-1-keescook@chromium.org> <20220922031013.2150682-12-keescook@chromium.org> <202209220855.B8DA16E@keescook> In-Reply-To: <202209220855.B8DA16E@keescook> From: Miguel Ojeda Date: Thu, 22 Sep 2022 19:41:07 +0200 Message-ID: To: Kees Cook X-Mailman-Original-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=AsxpWsr5dzcIncNfx/+Sw1HyEwfMiBKVAKBEW7wNeQA=; b=HG1BCa9aD7EruuXSP8vfBpl2xSAcB9NgvDE4n3t4WegezK8iPhrhfTbs3Xxfdxp/aP 0j4XfOQ90rYJJLxvR5Fxutq+CKSR+3NwG5g3gHNWC0rGeSJkCPwM1qeiyt5MoX9kie1E Ogc+09wvN660uSYqTrtW/DY7BHEKikOuBqjuMNkdFuICid58Qmi9sfyROy/V1LgkIpE7 e2Nv1gEo4Vp0GQpWl3bRqM1059jceqcIcZbW6os/ZnPJ8J1PnWKNgSi8e2+WYP/WJpYk +8abyMsCFGIX1fgDuD8Pv5kCGUDjVFxUFNtnD5auEWqa0LNmLWv9bnrrUipYT443cCtB +LNg== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=HG1BCa9a 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 , =?UTF-8?Q?Christian_K=C3=B6nig?= , 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 5:56 PM Kees Cook wrote: > > 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? Hmm... On one hand, they end up being attributes, so it could make sense to have them there (after all, the big advantage of that header is that there is no `#ifdef` nest like in others, and that it is only for attributes). On the other hand, you are right that the file so far is intended to be as simple as possible (`__always_inline` having an extra `inline` and `fallthrough` would be closest outliers), so if we do it, I would prefer to do so in an independent series that carries its own rationale. So I would leave the patch as it is here. Cheers, Miguel _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan