Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp242135pxa; Wed, 26 Aug 2020 09:22:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHKDwV/RBKAyajKrCvVjwJDtH2oPasgVsxNbBqtdUzmytQaR/hMOQ+hakZVv4vqgOLpwrh X-Received: by 2002:a17:906:5914:: with SMTP id h20mr12448539ejq.346.1598458942665; Wed, 26 Aug 2020 09:22:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598458942; cv=none; d=google.com; s=arc-20160816; b=n+4uDOEHvk4AiY5icnrywEKzcWCeB8zDXRTHG2qqVHEl2JrUe9E72VMjtGUqBnyWVx 43wdttDtaCO+H/7MYJ2yat5KWWiUF5NHtZlBvRAcV3ru8gu7VYsH2vLy/q8dDkkO9vEf AqRaxz4+dlHGv/L3BMJgOyNfaVuxqN0aB9h2lVKbKbrFFLyAGWJRklYtYzEcGtPxDInm yUWDxXNuoMF4RYOqEPnokrnVjeujQXVJPlhYGdVIC3aPUxDdL7X7I+C/q0/d8M6hoK/N X6sYALJ+v/1+yuOJOkkD+DPgPT6Opveg7pIKwRjbp1MH1LdSf/7yq0PRLykyQ6CYzYLn FY8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ilq96LncB63Fy/CIWeCW+LtnzaRpV/8JBgOE+6AYhNY=; b=y8BkzjByYBjDf7t7BbLi7YVa5twQHpo5+oMu34mEHqqqspS6fK6fcxJtGeEkpOhcEy 2K/p34TNwcSb76SpX+Ityk5gACtsqSeTyhBbU4JEUnvW9LMR7uMRJoCTs3QXSLgdtDRQ BRrxhrYbrygIdqfWQWnYBmS6V7mQSTcjWDNTQa9k4LK/7WQ08OOIn+hB1woLpsst60GA /kKVJ69j6r8aLCmI2v9e+Aq3XNXN3UQMUT7II6vM1c6585f43BHoOpibopYmv46tZBDJ 7Bf1B6bfHV77YnQUR2MGHzeRq7wWPzAjA/urEq//T16ZM/LKnVFGGlm85cJYK3Xsq68q tZ5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="jkj2lJ/w"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi9si2355317edb.366.2020.08.26.09.22.00; Wed, 26 Aug 2020 09:22:22 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="jkj2lJ/w"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727878AbgHZQTW (ORCPT + 99 others); Wed, 26 Aug 2020 12:19:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726820AbgHZQTU (ORCPT ); Wed, 26 Aug 2020 12:19:20 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80DB8C061574; Wed, 26 Aug 2020 09:19:20 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id d22so1234382pfn.5; Wed, 26 Aug 2020 09:19:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ilq96LncB63Fy/CIWeCW+LtnzaRpV/8JBgOE+6AYhNY=; b=jkj2lJ/wIshXTsGOEM64SsGQiF7RQEp7AAMTx/xiXkBBHv2KNeujd9MOPiD5kyQY8K hf6yqxBesJFomueFy75MOk012wz7xpqJ0MwXVnD5pgU3v+SuGh9PQoHMTlzllEWlNso2 c2jmgT7yi0ZERQqXEdy4W3JE3P3vqVcJsoSp0jYSzSZoaxhBYV8ujdHHKWFn8BSpF9ya mDIP+nyshLpiaJo8ZWYtQ58DI3chffKPgs6EUoLzrkDi0/ei3lYuVqKQ67l63bUgPAEA 9L/IrVAGvC03lLBPyY9u2Lj3waTfRLL82ppuYy0hqNnVehBouQnPIJkCoKDYDMIc/WkZ kifQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ilq96LncB63Fy/CIWeCW+LtnzaRpV/8JBgOE+6AYhNY=; b=r4YsJIIdD8f65cfsvkamlYuy5vLjM4vI1P3391jhbSrSEbJNbeXFCVpHZ8CND7tgfr 1ej4Symqf93qz1BLWX1ecUnGrSwAyO1Eq74ww8VlippxDqrdRLOuXPpHqjThBoi9P5a2 /sa75+914hWpPjDayo6aJrS8DTYYY5/9Yflca3vp+UokQkUTNCYpflhZ2ssJbvv4TDKw gnALAZObpaxArPChwfiVurgB+JTVHjjEpyjfbJYofgUlFlipOTM7JheW0wUUEb/hHXuy ReWFKZb6UtMazl6JtC2oKJ3NoOwUJXtA03dDRCLpLGEPy5KDLfAeDlewYVnKRYiVMaHp bNag== X-Gm-Message-State: AOAM5322X2KxYR7ObvgQqYJCD1ZxX8YpVcf1FxjJNWn9/5V67T5B4e7t 47yqe/dxP0l1CHU7zo2rgi9DKctdDoHSGa+ZsiU= X-Received: by 2002:a63:f24a:: with SMTP id d10mr11083692pgk.4.1598458760092; Wed, 26 Aug 2020 09:19:20 -0700 (PDT) MIME-Version: 1.0 References: <20200826134315.GA3882506@kroah.com> <1425ab4f-ef7e-97d9-238f-0328ab51eb35@samsung.com> <20200826153347.GB4187816@kroah.com> In-Reply-To: From: Andy Shevchenko Date: Wed, 26 Aug 2020 19:19:03 +0300 Message-ID: Subject: Re: [GIT PULL] USB fixes for 5.9-rc3 To: Marek Szyprowski Cc: Greg KH , Brooke Basile , Linus Torvalds , Andrew Morton , Linux Kernel Mailing List , USB , Ilja Van Sprundel , Kees Cook , Felipe Balbi , Bartlomiej Zolnierkiewicz Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 26, 2020 at 7:17 PM Marek Szyprowski wrote: > On 26.08.2020 17:53, Andy Shevchenko wrote: > > On Wed, Aug 26, 2020 at 6:36 PM Greg KH wrote: > >> On Wed, Aug 26, 2020 at 05:02:38PM +0200, Marek Szyprowski wrote: > >>> On 26.08.2020 15:43, Greg KH wrote: > >>> > >>>> Brooke Basile (2): > >>>> USB: gadget: u_f: add overflow checks to VLA macros > >>> Sorry, but the above patch breaks USB Ethernet Gadget operation. It also > >>> didn't get the proper testing in linux-next (next-20200826 is the first > >>> one with this patch). > >>> > >>> This is how it explodes on Samsung Exynos (ARM 32bit) based board with > >>> g_ether module loaded: > >> Odd, for a "normal" descriptor, the logic should have remained the same > >> as without this patch. > >> Brooke, any ideas? > > I have an idea. > > > > Does below fix this? > > Yep, that's it. I've also moved offset assignment in the first part > after size_t size = array_size(n, sizeof(type)); > > Feel free to add: > > Reported-by: Marek Szyprowski > > Tested-by: Marek Szyprowski Will send a formal patch soon. Thanks for reporting and testing! -- With Best Regards, Andy Shevchenko