Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3753071ybk; Tue, 19 May 2020 12:06:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKw4eobxgOZyUzHMq4xpm/DM29AIZygiKlwbnBWW0+NwRmFTxmkSm57NuVnz8wrEPTIflt X-Received: by 2002:a50:fd83:: with SMTP id o3mr296863edt.329.1589915183351; Tue, 19 May 2020 12:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589915183; cv=none; d=google.com; s=arc-20160816; b=IUVOLk1JWxcw4cEgCPtweFfkkEX9NHVMQeE1smfwIafe6Eaq9SZToI9Aa3VWiM85IA A7y3i1z4t6EjPYtUkkmImVfIXrODvoWs9a2I/r/p2I/PtqbBAVHYhGWOQTHd31wN7HQ8 68Qo9Cca5afJ43EIpjyRJyiuKuvCzcktNbvW5wUMRD2YcjoisSB6lTNydlMqR5f3R+B6 ilNYjsR90r91VAi5e4YKb2crucqgHNtVm4gwU1jC0UjXHA/FuAU1mll+kmT2e/2h6H9o 48vDlKnDku4JecNMnFVmzPxxQ9aDWfHM37gX9TeqIBU+K5HduFOPIg76CSrVbj5lpsgw Tqlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=fsRjzRkdp+KSs7yfg0FtwZddSVJlSAQ2v29fD3P3GtE=; b=ICT9XKqw2PbTcYU4GvlhFvmhumCWPwYc8T2I30eeu4B9gc0UtbXsHXlrZhmoTVvVud J1zrfGwxtzqT2oq9SD8WhCDuGMvtpaEzfKbt2zSUTplb2yHa0h6aGf4+K1+SotuzKDb0 JpYbK/iNXD3wws6XewZrmFN8LSJQ8YfwZtGbD4surBzoFDJMkjen8SngBr5jn/qGaO1A fOslKyc60DFSctzHpkat/MBBjHD1q5y76Kyln1ZZJA4cxm1JRCLYXdOSB9R82+wFKqnl cmUe2+yXk0qagVZzLSGa3o6+g5d+lDEQK6Z6vcy2Nnj3Sb9DTlQbzvNpa/KctNc+yyI6 M5Lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a21si398978ejx.547.2020.05.19.12.05.58; Tue, 19 May 2020 12:06:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727966AbgESTDx (ORCPT + 99 others); Tue, 19 May 2020 15:03:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726903AbgESTDx (ORCPT ); Tue, 19 May 2020 15:03:53 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B372C08C5C0; Tue, 19 May 2020 12:03:53 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 8D934128B3862; Tue, 19 May 2020 12:03:52 -0700 (PDT) Date: Tue, 19 May 2020 12:03:51 -0700 (PDT) Message-Id: <20200519.120351.1307026516427954350.davem@davemloft.net> To: jk@ozlabs.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, benh@kernel.crashing.org, paulus@samba.org, fthain@telegraphics.com.au, userm57@yahoo.com Subject: Re: [PATCH] net: bmac: Fix read of MAC address from ROM From: David Miller In-Reply-To: <20200519010558.24805-1-jk@ozlabs.org> References: <4863b7d34cf23d269921ad133dc585ec83a0bb63.camel@ozlabs.org> <20200519010558.24805-1-jk@ozlabs.org> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 19 May 2020 12:03:52 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jeremy Kerr Date: Tue, 19 May 2020 09:05:58 +0800 > In bmac_get_station_address, We're reading two bytes at a time from ROM, > but we do that six times, resulting in 12 bytes of read & writes. This > means we will write off the end of the six-byte destination buffer. > > This change fixes the for-loop to only read/write six bytes. > > Based on a proposed fix from Finn Thain . > > Signed-off-by: Jeremy Kerr > Reported-by: Stan Johnson > Tested-by: Stan Johnson > Reported-by: Finn Thain Applied, thanks.