Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3678344pxm; Tue, 1 Mar 2022 03:19:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxiuMENBcZds7yU5/6BztpRezhinSEnm1x9uTQGUrUErBCkNNXEKmPDulBZcyeG0Mcg4rIN X-Received: by 2002:a05:6a00:c93:b0:4f1:4f0:ee71 with SMTP id a19-20020a056a000c9300b004f104f0ee71mr27141430pfv.36.1646133554193; Tue, 01 Mar 2022 03:19:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646133554; cv=none; d=google.com; s=arc-20160816; b=wNHJFuxLCJMlkBWt+gt6W1awwYVg3Ck1hPEXtL5TDv8y5P48nRVnpbH4qSrqD87uCb 5Fil6Ve/KPM8k4urM+omuETAOe9Kfv+4ocDRD/MJ++yxNHbbA77s1Ge8d+gpG2lPFgDV cOCV5yXdJeHrdO9jGnoJAjiggSeQQRy+g40uWh3URFgxWzanVedTbTDu/P5asmfn+/0g MzPpRa0VnszD7xFAp7Sqn5q1a4+ZY4MmJAJ277Sp1Hdk/tkhsEoTg5mJ9tZ/zBbtd8bO yiOeo5GStDSWWLyQgwmvQ8uvxaS9fSVFLCocEThbBROSsloY47vUxwoIRWPmVPMdw6HR e67w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3u7MIrbpVdaLqG9Uqr3lA3Jqll+sAuWBAxK//kkArRY=; b=l1qSm6ndRgJVUcH/nF1WuqCzhUverEgURm9D5nsBDztBTYvc/Cv/o0CftyBa62yWbc KY+Mu7/MKd9ClJsh1/XFNIA2NVHYFEh1jKT+Ni4IHDqNf9AaGI7wFjbJ54gJ3pwPZkpz Qvfir62hOEdBQGSseyZB6yaW3H/Q8ZDUZ5ZsOm6ND38Ig8hfFDGd/ghW9tKihodDko3e 1uWh85E7t07Y/U0aXnzFogY+7vgcr1+ES34qZ9pF1zs9I8bASt7AyUtxfAK+K2xmFlBl AlhrKf7C4jSr9B8rXFJNjnxKe1DWAUB3nvZ/B2pnCteL2u2R+qxarq8+FX/zfAPQRA6c MSOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hPJQya0f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x6-20020a656aa6000000b00378cda44347si3495052pgu.187.2022.03.01.03.18.59; Tue, 01 Mar 2022 03:19:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hPJQya0f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233899AbiCAJfY (ORCPT + 99 others); Tue, 1 Mar 2022 04:35:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233904AbiCAJfQ (ORCPT ); Tue, 1 Mar 2022 04:35:16 -0500 Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63B348BF0A; Tue, 1 Mar 2022 01:34:31 -0800 (PST) Received: by mail-qk1-x72a.google.com with SMTP id d84so12477087qke.8; Tue, 01 Mar 2022 01:34:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3u7MIrbpVdaLqG9Uqr3lA3Jqll+sAuWBAxK//kkArRY=; b=hPJQya0fMkrYp7W9gJzWqHP9x4nADh9bRmReFwWvJ3PThg0eFX4wyaaqZ0yQuwnkJo uWKbWdDblTL2rWmcvIMv6YjaQS9XVe84m/XaxsPLN7kQMK+a7VUTA9dgY8lNGk9elw4V rckreDwBzlqfobzy652C6yMHP6oXEnalLUI0ehFaXn1uDb2kZkcbHfzWncjJlm0Keptd ROGy7icoJWpojCSrPuChvIQSDaLIUhLo7S1mXbzPNxLWwrEK9zGtCaR1xS3STPJkHthV 0HZUQUFSCbylBtIbGx10jnkA3R2LIWl31ZL6Q4d/VGYAqNqhs1K+g9QuNHUGQGM/RNFX JDGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3u7MIrbpVdaLqG9Uqr3lA3Jqll+sAuWBAxK//kkArRY=; b=GvOEDoRuecFzIP1dxc+SNKqxdrJ3PJ+EWo0Mj10qMA/rQ9lY1rbZBZHsE5ue6s+JIN HHGFfCNyJ9wOZAuDmxpaAeCrLSYIkTHU9UoQXqRmAzjZrTvE11bSJqa2c7SRwCBaOHI9 pV8Z2kMjFfkdmU4CPYt1yYJu4HriQQ2cWQOTL6V10X04UkVHmpX8CDLaJHC7SsYhPHet jlYI4xoblvnyD8eqQgn8mkRyUOcnyaWHUkxTPpJ0fd5PUye+h3j2lEmOXYXybUQAwXiV SBVH5Jk4W1sVzwKtNbjde6PebLbrZcEsKVi69Vt2PCEPrHrGk50V3JhswEYafVvtCQBL C+Rw== X-Gm-Message-State: AOAM532rTepjJcYIqNXnUTctkv2afGVO+oYxKVEeGnc7pQGGG5QD+X6M iHtTqtaIPr9SqjCLHun3gSsQviMzCiI= X-Received: by 2002:a37:8605:0:b0:648:e9ae:ce94 with SMTP id i5-20020a378605000000b00648e9aece94mr13232282qkd.58.1646127270573; Tue, 01 Mar 2022 01:34:30 -0800 (PST) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id o18-20020a05622a139200b002de25b59013sm8663439qtk.84.2022.03.01.01.34.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:34:30 -0800 (PST) From: Lv Ruyi X-Google-Original-From: Lv Ruyi To: krzysztof.kozlowski@canonical.com Cc: cgel.zte@gmail.com, chi.minghao@zte.com.cn, davem@davemloft.net, kuba@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, zealci@zte.com.cn Subject: Re: [PATCH] net/nfc/nci: use memset avoid infoleaks Date: Tue, 1 Mar 2022 09:34:24 +0000 Message-Id: <20220301093424.2053471-1-lv.ruyi@zte.com.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: <664af071-badf-5cc9-c065-c702b0c8a13d@canonical.com> References: <664af071-badf-5cc9-c065-c702b0c8a13d@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hello sir I think this way: On 64-bit systems, struct nci_set_config_param has an added padding of 7 bytes between struct members id and len. Even though all struct members are initialized, the 7-byte hole will contain data from the kernel stack. thanks Minghao