Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3993489pxb; Mon, 8 Feb 2021 05:34:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwYNC75/2BdKMhihceJ9Uw6k7c37ZMfpXl9l1JkS7Rq+w1AQlYgVcOuZ+lx4Atrjp7k0n6d X-Received: by 2002:a17:906:d0cd:: with SMTP id bq13mr16770913ejb.75.1612791284192; Mon, 08 Feb 2021 05:34:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612791284; cv=none; d=google.com; s=arc-20160816; b=gbgHfFL5Zq8S+8ofZIsyigSn1JUOFgEboYuxJVY73U4HW963unItJpAWnkXNnErIdy UEpm41p+S0qqOK3CD6YGsiSKPYvnVLs9ax1KhutRvTd60sMuhWy1GAw9ZlTt1cRDR4Lo hNSzAQ4p9t75rkn0vtpUD9vNZG67IX7lQ90FSYSx5ot/O7BhLBWDWEdZ4NF+lRveSKtv EC9We5yPMGIT766uIzX/zg5L67UXqf9UE58dXe0qbttUC7/p9uzyVs3r04pPaoQr39Fx q/mvA6AI2klpZ4YeTxGCdNM20bkUNLa+lpH+vilJuQUn80lUcO3fdOJc5MrRAMcQypht 1FzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=U/t1IwV4ufUUzFNMKU88aGBBQ6IzUhzBsbhwEAmEs8w=; b=p2qaE4bgtDwxskVv7ISV49jBv3prdhAJ7HPAjAkjR2pxIPNQszn7ldTW8qBZNPWZ/J L/GI0EpERCnBkCtDXuvFyEFTF3Im42Ag5DYXTCjl6Q4oxFXA6DdBTiqndj/DqObQTzSK /MeOTSwyrLS7NF9f0Nz6eB91ffAD8UEfn8nKFfPKLttBovWPFV+aOUEyg3Pes+teQDyV f91398QSfgRR+goHXmnElBm4Jv0NwN4SkdlFD8IrdHi9Mift1j+6BzOCT5BUK+DgKRtF P4ZjWUCqPG3VGBHVHrj91ox1MoLyn4+wsBUhOfnKs/gJMSC0jszu5wgrdKrsYkPeF9Bf RM1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fcqXZDxE; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id uz29si10707384ejb.527.2021.02.08.05.34.21; Mon, 08 Feb 2021 05:34:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fcqXZDxE; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231273AbhBHNd1 (ORCPT + 99 others); Mon, 8 Feb 2021 08:33:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:58186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230186AbhBHNdV (ORCPT ); Mon, 8 Feb 2021 08:33:21 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0860564DD5; Mon, 8 Feb 2021 13:32:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612791160; bh=U/t1IwV4ufUUzFNMKU88aGBBQ6IzUhzBsbhwEAmEs8w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fcqXZDxEe9hQYI2EY054RB0ZN+wx43xyPV1k9dt1TeMary+tHuz+z6G1WoGEA7JhJ ptzSE8qz34rcX8xH8i5Hv1FcMOi1+6ItnG2aOqZ0RMpNFsvUW6IzP+hx/N/uTMfwdV 8I6Y3Y5Bx0G+M+P1W4qVzPYiGgDuSJoueA2mO5gPtksMOwr/RKhHDFm2DmR3dHvyIy RUK1JCR/KXrcvgxOdYPwDmfqiT9olxR+Rqorqk6buPlCPqLlOu2r5ah0rem3rDywbS UwXDS0H5lG8lUtgDLpTmae4Dcq7wJiMYhX33VZcdrfIyzkrT/3iNBxEPUDCjgl+3s5 nDzbZyH3AlfHg== Date: Mon, 8 Feb 2021 14:32:35 +0100 From: Lorenzo Bianconi To: Kalle Valo Cc: linux-wireless@vger.kernel.org, kuba@kernel.org, nbd@nbd.name, lorenzo.bianconi@redhat.com Subject: Re: [PATCH wireless-drivers] mt76: dma: do not report truncated frames to mac80211 Message-ID: <20210208133235.GF2593@lore-desk> References: <87mtwfkr6u.fsf@tynnyri.adurom.net> <20210208082516.GB2593@lore-desk> <87im735593.fsf@codeaurora.org> <20210208112035.GD2593@lore-desk> <87a6se667c.fsf@codeaurora.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="/aVve/J9H4Wl5yVO" Content-Disposition: inline In-Reply-To: <87a6se667c.fsf@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --/aVve/J9H4Wl5yVO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > Lorenzo Bianconi writes: >=20 > >> Lorenzo Bianconi writes: > >>=20 > >> >> Lorenzo Bianconi writes: > >> >>=20 > >> >> > If the fragment is discarded in mt76_add_fragment() since shared_= info > >> >> > frag array is full, discard truncated frames and do not forward t= hem to > >> >> > mac80211. > >> >> > > >> >> > Signed-off-by: Lorenzo Bianconi > >> >>=20 > >> >> Should there be a Fixes line? I can add it. > >> > > >> > I am not sure it needs a Fixes tag. > >>=20 > >> I think the commit log should have some kind of description about the > >> background of the issue, for example if this is a recent regression or > >> has been there forever etc. > > > > Agree. Can you please check the commit log below? > > > > " > > Commit 'b102f0c522cf6 ("mt76: fix array overflow on receiving too many > > fragments for a packet")' fixes a possible OOB access but it introduces= a > > memory leak since the pending frame is not released to page_frag_cache = if > > the frag array of skb_shared_info is full. > > Commit '93a1d4791c10 ("mt76: dma: fix a possible memory leak in > > mt76_add_fragment()")' fixes the issue but does not free the truncated = skb that > > is forwarded to mac80211 layer. Fix the leftover issue discarding even = truncated > > skbs. > > " >=20 > Looks good, but I think the recommended style for commit ids is not to > use ' chararacter. So I would change it to this: >=20 > ---------------------------------------------------------------------- > Commit b102f0c522cf6 ("mt76: fix array overflow on receiving too many > fragments for a packet") fixes a possible OOB access but it introduces a > memory leak since the pending frame is not released to page_frag_cache > if the frag array of skb_shared_info is full. Commit 93a1d4791c10 > ("mt76: dma: fix a possible memory leak in mt76_add_fragment()") fixes > the issue but does not free the truncated skb that is forwarded to > mac80211 layer. Fix the leftover issue discarding even truncated skbs. > ---------------------------------------------------------------------- >=20 > Should I add that to the commit log and queue the patch to be applied > after the merge window opens? ack, fine to me, thx. Regards, Lorenzo >=20 > --=20 > https://patchwork.kernel.org/project/linux-wireless/list/ >=20 > https://wireless.wiki.kernel.org/en/developers/documentation/submittingpa= tches --/aVve/J9H4Wl5yVO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCYCE9cQAKCRA6cBh0uS2t rNF/AP4yrNcPIxu95cRWcmp5dFjLC2PxSmQAu5oiYlAQra/ahgD/QpZHnQgQASfq +mWVdixoVTL1ePsz59fJxgm340KJ4AU= =Dkrz -----END PGP SIGNATURE----- --/aVve/J9H4Wl5yVO--