From patchwork Sun Jun 17 10:06:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omer Efrat X-Patchwork-Id: 10468739 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 89ED2600CC for ; Sun, 17 Jun 2018 10:06:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B5FF2881E for ; Sun, 17 Jun 2018 10:06:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D978288CF; Sun, 17 Jun 2018 10:06:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB9272881E for ; Sun, 17 Jun 2018 10:06:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933375AbeFQKGX (ORCPT ); Sun, 17 Jun 2018 06:06:23 -0400 Received: from mail-eopbgr70124.outbound.protection.outlook.com ([40.107.7.124]:2913 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933351AbeFQKGW (ORCPT ); Sun, 17 Jun 2018 06:06:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tandemg.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8F9OdjvaqCMW08/j6C31gyrDp/QE6NOR8dSIJISLpU0=; b=R7c02bW0Se+WNIO7GRLkroRIYHWZ9nUY4exjP3oXdIJSRLs9elJj73UbkiG0z8CypLAWhNp1/Ow2BG66jg9WvOEA/c5tQfZiVYNpqLjFgIIRjLV3bQC8DuS0Xd0mfjG7l9GtJXmTsSUjoJ/LNrkFI8TfYcLhfVUXH2F6ICAzPu4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=omer.efrat@tandemg.com; Received: from omer-laptop.tandemg.local (37.142.120.98) by VI1PR02MB3631.eurprd02.prod.outlook.com (2603:10a6:803:32::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.19; Sun, 17 Jun 2018 10:06:17 +0000 From: Omer Efrat To: linux-wireless@vger.kernel.org Cc: Omer Efrat Subject: [PATCH v3 1/5] cfg80211: use BIT_ULL for NL80211_STA_INFO_* attribute types Date: Sun, 17 Jun 2018 13:06:14 +0300 Message-Id: <1529229974-17789-1-git-send-email-omer.efrat@tandemg.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [37.142.120.98] X-ClientProxiedBy: AM5PR0402CA0002.eurprd04.prod.outlook.com (2603:10a6:203:90::12) To VI1PR02MB3631.eurprd02.prod.outlook.com (2603:10a6:803:32::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 43a3ea70-e463-4a48-c251-08d5d439f813 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:VI1PR02MB3631; X-Microsoft-Exchange-Diagnostics: 1; VI1PR02MB3631; 3:Q4sMITj8hIuMLyc+KANSU7/1bmSZX0uXod5Mr7xzBsFmvIF2YiTiVek1v2UFbZ7OBqUHT7Z0GnL8BBWBkQa7OyGkYy0tKzE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iRU1Xz8asi9wMIbLTWEPgX/gAwP7lgFTRzNroi/79sVMvEruvUr60wYJUVty+QgvWED/qBG2+zqUw==; 4:FTyc69H98agn4x115E8HVIgy/xtyRqgUyb1COs3qmFSKb4aXyBRj9U3N6AxFvoWsd9vb9XyxN/DjggmVPaSL3gnj3z4+5IVjOWCxQKNFVJU86maidmr6aqXrsZ+171XFnSK3MqQBD2CVh+4HRASgLmwhRERILFZtZpyqrVQcrQ4gPQ3glt2k3hSnsYUvUrNyqFwYYKxVNe5kh7xny1W22WdWybw3cA3VJHVXxX+e2OV/7lkUqTM25T5c/ALwS3ZWz0BrPwPKUdUYjg6jU33Etw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:VI1PR02MB3631; BCL:0; PCL:0; RULEID:; SRVR:VI1PR02MB3631; X-Forefront-PRVS: 07063A0A30 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(366004)(396003)(39830400003)(346002)(376002)(39380400002)(199004)(189003)(386003)(8936002)(26005)(81166006)(107886003)(50226002)(486006)(5660300001)(476003)(956004)(44832011)(2616005)(6506007)(50466002)(52116002)(6512007)(8676002)(81156014)(48376002)(16526019)(186003)(4326008)(66066001)(25786009)(51416003)(6486002)(47776003)(59450400001)(2361001)(16586007)(105586002)(106356001)(15760500003)(316002)(6666003)(2906002)(6916009)(86362001)(7736002)(6116002)(3846002)(53936002)(97736004)(68736007)(478600001)(305945005)(36756003)(2351001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR02MB3631; H:omer-laptop.tandemg.local; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: tandemg.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR02MB3631; 23:0m5dj2kxQQmMPSfrGQ5tAd2ysun2rKAn3oCR/e5Fm?= =?us-ascii?Q?yw936ATPtN0Fcp6u2WHkzPfx4neyuOv+tN7yx6W0/K1kcwQCj1Ns2xgA93Zm?= =?us-ascii?Q?PK7DvNY39ivDmu5ZK9DzCElOo6hhMhieAV80St6FiXBpaRTq4G8pfcQ9bVty?= =?us-ascii?Q?WV3vG1pJi81AI8iYc4VXBu1YOEqFzA5Xv6ohD2mEt7bvcy3XHZNlmv1GN/Zr?= =?us-ascii?Q?h2jzLAC2tqkevQqLilGj/y7TLXhiLn2M0vcJ/dNRTMb+ZAWLpF4qazmGjs/P?= =?us-ascii?Q?WJ11F+pNTgFkbm0NwSF35Rr65/wUkNchE6O1p1cqK+PyLWB+UoZeqwNJ3Z8w?= =?us-ascii?Q?lQsaYtnbFx/bZtzXaf0L+v2NorfrR3aoeJ9vPkXbJ5bk2lkd11DytRlzNkd+?= =?us-ascii?Q?ZexOWvnS2mfQHyuqkKw/Qi+4X6+K3OjrOF9oGuLXbB6VmHu5EDGfACf+4xvW?= =?us-ascii?Q?qQT11U7EfXHdKfdAw8pMEZwVz9PONSKpupjdDQQSZH7mpQoeUhq0tCTazCRD?= =?us-ascii?Q?48O29M+zcsQBgpedQz0sZmfdoS0qJodUTDgrtNV4t9hXx0/FIjaWPM4w5q01?= =?us-ascii?Q?yL/x6ZB+9xJo3l7Ah1CWjGI9mylz+G8WVAOVHjitDpP1GS7yccSSyCiqiXtW?= =?us-ascii?Q?6fTOtdR2H3hsUtRaSscZp0/9Pz+0ThAOaAX1OdUbNJWtPEGlsuExJCvJOEa4?= =?us-ascii?Q?Mb1p9UKKw1Ym6cbHvcaFJoQDvbmtMerkmyDYxstynAu/vuxa1iT1ffoeB3yN?= =?us-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acjhdJnMwsEHthcsLCVFg5dnPK8Dwj9rc1xqrYsHc8joJQqbOpTR2n8HNGNWFYXtra83hDBVp3CRpOkPvHVR+RVRpOt35dkJorSYVPwMf4g8zjJoLVSEc/PWeRG3hWAqQM0H0t3tj7KPwnufqpZKZT4QzwyZF8avkLBWqBw4bYBRTvuTmq40xUnwR0aEN4Bn8YKSTL0nrQXKegZpP8y2q5t0eX2NCUv3AHboJCKlpV/ek6yHpCF65BLFrN6tl6O5K6aKBsWIsPKikPg==; 5:UIgBUke526Mt57RoeO74kWHPCTleA3c3RmShvD9WI+pSn/0m9Xa5TAJudU1H0TLKFaNrDM2yeyFKpGlp1LyKacdYRdVrxv9NCdHexXTe+MZmiFZ2w0zs0x15mr8FIJwRj80Uei5ZnIdIoG57aEau9iuNPGsXghKtDHrUAAaMRvI=; 24:RUJXZefG35jPzKidkEhp+XaqJG3tQJYHKm2rmbNPaYncIsqf9h36kS5/JCKjYzLCpEFJoMy5MjMvYlscCL1qfo+5nuHoMTcchBetBEdyM10= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR02MB3631; 7:tOyvrvrR1gko7awfdZwjKtfjL5IaA/1rvzRDa5H7KYnnwTcPn1/BZjYhHzBQE09+8L7eTXnMt3IupoA3thehq+FDamiUt1NoMsnUrIgmJ8m1rakHni1fHoEjRMCjanoIfqgt8oi2smqPjjX2cGPmqgmT6pIJSEDmw9hTTm6iAT+agatECCLycPhHinQhtYihj0jl0pu1ModUBq9Dacf0lBw8FFRr4RCpxQjrSnYNqxSWhRiLYDInbMNwASyn1HoM X-OriginatorOrg: tandemg.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2018 10:06:17.9209 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 43a3ea70-e463-4a48-c251-08d5d439f813 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d690b55a-f04a-454b-9f62-fb1e25467a25 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR02MB3631 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The BIT macro uses unsigned long which some architectures handle as 32 bit and therefore might cause macro's shift to overflow when used on a value equals or larger than 32 (NL80211_STA_INFO_RX_DURATION and afterwards). Since 'filled' member in station_info changed to u64, BIT_ULL macro should be used with all NL80211_STA_INFO_* attribute types instead of BIT to prevent future possible bugs when one will use BIT macro for higher attributes by mistake. This commit cleans up all usages of BIT macro with the above field in cfg80211 by changing it to BIT_ULL instead. In addition, there are some places which don't use BIT nor BIT_ULL macros so align those as well. Signed-off-by: Omer Efrat --- net/wireless/nl80211.c | 26 +++++++++++++------------- net/wireless/wext-compat.c | 10 +++++----- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 0ccce33..350d296 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -4619,13 +4619,13 @@ static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid, #define PUT_SINFO(attr, memb, type) do { \ BUILD_BUG_ON(sizeof(type) == sizeof(u64)); \ - if (sinfo->filled & (1ULL << NL80211_STA_INFO_ ## attr) && \ + if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_ ## attr) && \ nla_put_ ## type(msg, NL80211_STA_INFO_ ## attr, \ sinfo->memb)) \ goto nla_put_failure; \ } while (0) #define PUT_SINFO_U64(attr, memb) do { \ - if (sinfo->filled & (1ULL << NL80211_STA_INFO_ ## attr) && \ + if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_ ## attr) && \ nla_put_u64_64bit(msg, NL80211_STA_INFO_ ## attr, \ sinfo->memb, NL80211_STA_INFO_PAD)) \ goto nla_put_failure; \ @@ -4634,14 +4634,14 @@ static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid, PUT_SINFO(CONNECTED_TIME, connected_time, u32); PUT_SINFO(INACTIVE_TIME, inactive_time, u32); - if (sinfo->filled & (BIT(NL80211_STA_INFO_RX_BYTES) | - BIT(NL80211_STA_INFO_RX_BYTES64)) && + if (sinfo->filled & (BIT_ULL(NL80211_STA_INFO_RX_BYTES) | + BIT_ULL(NL80211_STA_INFO_RX_BYTES64)) && nla_put_u32(msg, NL80211_STA_INFO_RX_BYTES, (u32)sinfo->rx_bytes)) goto nla_put_failure; - if (sinfo->filled & (BIT(NL80211_STA_INFO_TX_BYTES) | - BIT(NL80211_STA_INFO_TX_BYTES64)) && + if (sinfo->filled & (BIT_ULL(NL80211_STA_INFO_TX_BYTES) | + BIT_ULL(NL80211_STA_INFO_TX_BYTES64)) && nla_put_u32(msg, NL80211_STA_INFO_TX_BYTES, (u32)sinfo->tx_bytes)) goto nla_put_failure; @@ -4661,24 +4661,24 @@ static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid, default: break; } - if (sinfo->filled & BIT(NL80211_STA_INFO_CHAIN_SIGNAL)) { + if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_CHAIN_SIGNAL)) { if (!nl80211_put_signal(msg, sinfo->chains, sinfo->chain_signal, NL80211_STA_INFO_CHAIN_SIGNAL)) goto nla_put_failure; } - if (sinfo->filled & BIT(NL80211_STA_INFO_CHAIN_SIGNAL_AVG)) { + if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_CHAIN_SIGNAL_AVG)) { if (!nl80211_put_signal(msg, sinfo->chains, sinfo->chain_signal_avg, NL80211_STA_INFO_CHAIN_SIGNAL_AVG)) goto nla_put_failure; } - if (sinfo->filled & BIT(NL80211_STA_INFO_TX_BITRATE)) { + if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_TX_BITRATE)) { if (!nl80211_put_sta_rate(msg, &sinfo->txrate, NL80211_STA_INFO_TX_BITRATE)) goto nla_put_failure; } - if (sinfo->filled & BIT(NL80211_STA_INFO_RX_BITRATE)) { + if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_RX_BITRATE)) { if (!nl80211_put_sta_rate(msg, &sinfo->rxrate, NL80211_STA_INFO_RX_BITRATE)) goto nla_put_failure; @@ -4694,7 +4694,7 @@ static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid, PUT_SINFO(PEER_PM, peer_pm, u32); PUT_SINFO(NONPEER_PM, nonpeer_pm, u32); - if (sinfo->filled & BIT(NL80211_STA_INFO_BSS_PARAM)) { + if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_BSS_PARAM)) { bss_param = nla_nest_start(msg, NL80211_STA_INFO_BSS_PARAM); if (!bss_param) goto nla_put_failure; @@ -4713,7 +4713,7 @@ static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid, nla_nest_end(msg, bss_param); } - if ((sinfo->filled & BIT(NL80211_STA_INFO_STA_FLAGS)) && + if ((sinfo->filled & BIT_ULL(NL80211_STA_INFO_STA_FLAGS)) && nla_put(msg, NL80211_STA_INFO_STA_FLAGS, sizeof(struct nl80211_sta_flag_update), &sinfo->sta_flags)) @@ -10266,7 +10266,7 @@ static int cfg80211_cqm_rssi_update(struct cfg80211_registered_device *rdev, if (err) return err; - if (sinfo.filled & BIT(NL80211_STA_INFO_BEACON_SIGNAL_AVG)) + if (sinfo.filled & BIT_ULL(NL80211_STA_INFO_BEACON_SIGNAL_AVG)) wdev->cqm_config->last_rssi_event_value = (s8) sinfo.rx_beacon_signal_avg; } diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index 05186a4..167f702 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c @@ -1278,7 +1278,7 @@ static int cfg80211_wext_giwrate(struct net_device *dev, if (err) return err; - if (!(sinfo.filled & BIT(NL80211_STA_INFO_TX_BITRATE))) + if (!(sinfo.filled & BIT_ULL(NL80211_STA_INFO_TX_BITRATE))) return -EOPNOTSUPP; rate->value = 100000 * cfg80211_calculate_bitrate(&sinfo.txrate); @@ -1320,7 +1320,7 @@ static struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev) switch (rdev->wiphy.signal_type) { case CFG80211_SIGNAL_TYPE_MBM: - if (sinfo.filled & BIT(NL80211_STA_INFO_SIGNAL)) { + if (sinfo.filled & BIT_ULL(NL80211_STA_INFO_SIGNAL)) { int sig = sinfo.signal; wstats.qual.updated |= IW_QUAL_LEVEL_UPDATED; wstats.qual.updated |= IW_QUAL_QUAL_UPDATED; @@ -1334,7 +1334,7 @@ static struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev) break; } case CFG80211_SIGNAL_TYPE_UNSPEC: - if (sinfo.filled & BIT(NL80211_STA_INFO_SIGNAL)) { + if (sinfo.filled & BIT_ULL(NL80211_STA_INFO_SIGNAL)) { wstats.qual.updated |= IW_QUAL_LEVEL_UPDATED; wstats.qual.updated |= IW_QUAL_QUAL_UPDATED; wstats.qual.level = sinfo.signal; @@ -1347,9 +1347,9 @@ static struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev) } wstats.qual.updated |= IW_QUAL_NOISE_INVALID; - if (sinfo.filled & BIT(NL80211_STA_INFO_RX_DROP_MISC)) + if (sinfo.filled & BIT_ULL(NL80211_STA_INFO_RX_DROP_MISC)) wstats.discard.misc = sinfo.rx_dropped_misc; - if (sinfo.filled & BIT(NL80211_STA_INFO_TX_FAILED)) + if (sinfo.filled & BIT_ULL(NL80211_STA_INFO_TX_FAILED)) wstats.discard.retries = sinfo.tx_failed; return &wstats;