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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DE5A4C0015E for ; Thu, 27 Jul 2023 15:04:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4o9rJGi+BLIQ3DFP6INHfXCdhBeBuFHy+xuq5b92Sq0=; b=D+Xf6zN2c5nucR vm63NReuidE2kRI8Y7HwDySW1XyDoEV/P9/kuqCK0rrXq9K3vPgoKQmI5uafXTBlhW5DrbPYNPKZ+ ZDfEgujiIMMRUGHbhh8sd+YsIV/68M5qZiBDI8VS0dqGCCkCFoZqI3TY8ZdESt8cekXro/XK6E1Mk kKRNNbPcwG5oFSd5NbdVjpLZ88986r19sArI9J85HoTW2q+TPVFtHPx532sVQ0wBbIIPeQPP9/klZ EtJu6T2g7PYVroJRaJyI/5OEvxYe62QC4fviMzoAtW4ajQTKIbIiRARdQ/VRr5blzUd8/1UNSNunQ GVEnlsdgDwuUDBG6/gmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qP2Wq-00FbTJ-21; Thu, 27 Jul 2023 15:03:48 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qP2Wl-00FbNy-3B for linux-arm-kernel@lists.infradead.org; Thu, 27 Jul 2023 15:03:46 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3fb4146e8fcso7334945e9.0 for ; Thu, 27 Jul 2023 08:03:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690470222; x=1691075022; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=v+7K7N1HrBOO9ojx4XhuX5XeUgpfjjdJ6RhT0kUIZNQ=; b=pH9MBOTyCKqKk8fJqK5/7It+/tcMCAR2ABxOPjmXKtH9NYsavyp2NbjigGfbmd/hSs D6AcOFHpEs1lPCL+NgkIV384u8nBE8kafbiCak7P4TlHtAhoie9yu14nnTnS6uapai+C ncB3+3h/F33Ns78d7n9JWtQ/xRcfEcT6GjVl4Wq0zJfPWgQFSmmnVLSdbtpHVAX1+kKH 7dzmWtS9CuG3kzDxFkvZAZHjk1qBjOexqAsM8nTPKcYo/j4O5sZf90/JFuD9XDWh1pkv 5Ni1QBwoP2NSpsP5SR7FHua6O79cLOBgTVcdNxCWjPoMitQdn6NiF0EwwAscbmdNh0HA qp3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690470222; x=1691075022; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=v+7K7N1HrBOO9ojx4XhuX5XeUgpfjjdJ6RhT0kUIZNQ=; b=eF+ryF9ZivU4W4nOeG6nfrt+txle1d1G7aLbU2YUot5iJ9MuBNcIZs0Xsn5wFK/xV3 VdeebUQ1x1xqkJvq0dOL5I2/8sON6iGh8AgRG4JNZsw87OBRP83yYRnJMQiKhvHjulQd lE0End360aiAyyH4lgg4rG+6LCaFo6sdN3eF/7zNY0s+9OrwCN2sIHRwNErbgKZp5YgQ 3CxYXZgBF6CaZyU3eaHADX7cg9pGyHHhTiBgrjWfFtKryKymag47GtbjjkJZEVMsum0n GP7iWi7sjbfRgrTEaeXGAH9138CwPFP8W0EcYaH03sHgi8wwmG0MHXnyrjPL7ZL7CUfH QWcQ== X-Gm-Message-State: ABy/qLZuP4nQDJjBL2bbsdB5hsLVnO9rLz9wJ4IlxJw2/vItNULH5wWd ftP9SRqaITfWnbilyrS2jSn+Cg== X-Google-Smtp-Source: APBJJlEeZbcvjHHK/qS3M+V49Nm7sz4oGhzqLLA5BAgZvrDmBzx0eZJXQXeS9zpHYg+B0OM39RDnsg== X-Received: by 2002:a1c:790c:0:b0:3fc:180:6463 with SMTP id l12-20020a1c790c000000b003fc01806463mr1960886wme.7.1690470222084; Thu, 27 Jul 2023 08:03:42 -0700 (PDT) Received: from [192.168.2.107] ([79.115.63.48]) by smtp.gmail.com with ESMTPSA id e22-20020a05600c219600b003fbfea1afffsm2005621wme.27.2023.07.27.08.03.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Jul 2023 08:03:41 -0700 (PDT) Message-ID: Date: Thu, 27 Jul 2023 16:03:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 7/8] mtd: rawnand: qcom: Early structure initialization To: Miquel Raynal , Manivannan Sadhasivam , Md Sadre Alam , Sricharan Ramabadhran Cc: Richard Weinberger , Vignesh Raghavendra , Pratyush Yadav , Michael Walle , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org References: <20230716144612.32132-1-miquel.raynal@bootlin.com> <20230716144612.32132-8-miquel.raynal@bootlin.com> Content-Language: en-US From: Tudor Ambarus In-Reply-To: <20230716144612.32132-8-miquel.raynal@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230727_080344_046028_3039F0B7 X-CRM114-Status: GOOD ( 10.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 7/16/23 15:46, Miquel Raynal wrote: > Instead of allocating a structure on the stack with random data and then > expect the callee to perform the initialization (which is, in general, > error prone), prefer zeroing the structure explicitly at allocation and > provide the already zeroed area, so no explicit memset operation is > needed. It is probably safer to do so, so we limit the timeframe when > dirty data could actually be accessed by mistake. Why is zeroed data considered safe or sane? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel