Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp217591pxy; Wed, 21 Apr 2021 23:59:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWZ3qe+TWGLnWU+1qDmkGHY0CtUZcLNrnBD+k1pfsPm5v8oezrFxA2W+6ujpmXqJTS5e8J X-Received: by 2002:a63:fe12:: with SMTP id p18mr2077162pgh.425.1619074782733; Wed, 21 Apr 2021 23:59:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619074782; cv=none; d=google.com; s=arc-20160816; b=QOpTJwV8n64BKXqOBAmRAClkBGa/awHxSZMeEWH7GQGGPnsRgWGiUENYOj2M/DurUx gRD9g72S0oNKNLh5mbUz9To3VvMZowGTSIslhE01dbXb4EgdNPJ0+hOJEEoV/LHPMq+l wz8FfRzH2Lrt5jjd/tXIELZ2q0sHNc+Kcim0gFoDjTu7EOL9UU0K4USTuVL7Hn4780ZK VVHDRqJrEvjuDmBbxhCgNkHCWBg4rclCoVaz3NwGN1onEYJmqupQRPbAC+n8dnbwuCOX cn+KEgXpRoLRd92WHLNL6mFYgrWglLn22Ewm8wjirsbrggBGrWFnzSJm/RuCeYXS3W27 4Y9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=4foBw09MDw6s3pXeHYY2a07YfZSi/nyyHNfjUeyH1VU=; b=vH+5qyy8Mzdnzm64lGoCKWBkBxfjxYGBDuHf4swG6DJ4R1inaYX9nKKwbvIOl+oPeq ZSDXpPLdKZ78wrjdbpgBY3oiq29OHPfjNoXMKm81oZNIgjB5FZ3zgOcMY1eWSqRaQLGH BYGj4UH7ggkh4r8KpjIwep76uep5aE6MueLUv3L7wEfAANiCf9/jSJYjiExWxHcwI0Yl LHrQjqQMOW0+3x2Jtf/hwy+KJ/ygJnxQ07tdqH1eum50QouAkcn9JhUHDtGslP4YCtQv NknzQugw3z0WuTseNyp1Kay5t9UViXhp91F0O+h/kvcRTJdGBFEk9eaVDIc76AOpiKEw 5XlA== 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 o14si2440278plg.65.2021.04.21.23.59.30; Wed, 21 Apr 2021 23:59:42 -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 S234991AbhDVG61 (ORCPT + 99 others); Thu, 22 Apr 2021 02:58:27 -0400 Received: from mail-vs1-f44.google.com ([209.85.217.44]:44651 "EHLO mail-vs1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234976AbhDVG61 (ORCPT ); Thu, 22 Apr 2021 02:58:27 -0400 Received: by mail-vs1-f44.google.com with SMTP id t23so6044720vso.11; Wed, 21 Apr 2021 23:57:52 -0700 (PDT) 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=4foBw09MDw6s3pXeHYY2a07YfZSi/nyyHNfjUeyH1VU=; b=M8WUUI0HfZlLeryijBdLqI5EICYOkWqHO5NYuv/GubYr5K8grBMpadIo7XHxhSp/9h ExYxHtK4C09Zjki/MkeqnIQTOec8GQx7RP7trgxfsQe50H2IqGV2dz83JAcXnuRDg8fJ OMtN/2tCHz+dT610357pf/kRfatWkVlzYRPn3aUn8Vtp4GvgL9fkEG0hdXYVIaqJStuY zEJA+HPajlEq8CLyuJ3h0opeKg1yuTtD0B2T1aEWdrr4GdtflstF7Kmj1K3RC9GEihl1 s2rIkHN41nRz9DV5a7hb++YMMJEqiplunA8dg/9f5gxHVUm4VUHA7g9P9WyafDeYOzb1 Ufpw== X-Gm-Message-State: AOAM532iGnozgwqSk4yPsggNDWilhv5z7siTNJFJP/JgW5/DSjzmOpv4 7EkFOJgAnbtI0aJ76oN2R1IeRNjK2BkZvYljl/w= X-Received: by 2002:a67:fc57:: with SMTP id p23mr1176649vsq.40.1619074672248; Wed, 21 Apr 2021 23:57:52 -0700 (PDT) MIME-Version: 1.0 References: <20210421130105.1226686-1-gregkh@linuxfoundation.org> <20210421130105.1226686-74-gregkh@linuxfoundation.org> In-Reply-To: From: Geert Uytterhoeven Date: Thu, 22 Apr 2021 08:57:41 +0200 Message-ID: Subject: Re: [PATCH 073/190] Revert "media: rcar_drif: fix a memory disclosure" To: Laurent Pinchart Cc: Greg Kroah-Hartman , Linux Kernel Mailing List , Kangjie Lu , Hans Verkuil , Mauro Carvalho Chehab , Fabrizio Castro , Linux-Renesas , =?UTF-8?Q?Niklas_S=C3=B6derlund?= Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Laurent, On Wed, Apr 21, 2021 at 11:22 PM Laurent Pinchart wrote: > On Wed, Apr 21, 2021 at 08:58:22PM +0200, Geert Uytterhoeven wrote: > > On Wed, Apr 21, 2021 at 3:06 PM Greg Kroah-Hartman wrote: > > > This reverts commit d39083234c60519724c6ed59509a2129fd2aed41. > > > > > > Commits from @umn.edu addresses have been found to be submitted in "bad > > > faith" to try to test the kernel community's ability to review "known > > > malicious" changes. The result of these submissions can be found in a > > > paper published at the 42nd IEEE Symposium on Security and Privacy > > > entitled, "Open Source Insecurity: Stealthily Introducing > > > Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University > > > of Minnesota) and Kangjie Lu (University of Minnesota). > > > > > > Because of this, all submissions from this group must be reverted from > > > the kernel tree and will need to be re-reviewed again to determine if > > > they actually are a valid fix. Until that work is complete, remove this > > > change to ensure that no problems are being introduced into the > > > codebase. > > > > > > Cc: Kangjie Lu > > > Cc: Geert Uytterhoeven > > > Cc: Hans Verkuil > > > Cc: Mauro Carvalho Chehab > > > Signed-off-by: Greg Kroah-Hartman > > > > Upon a second look, I still see nothing wrong with the original commit. > > However, as I'm no v4l expert, I'd like to defer to the experts for final > > judgement. > > It seems fine to me, but it also seems unneeded, as the V4L2 core clears > the whole f->fmt union before calling this operation. The revert will > this improve performance very slightly. Hmm, that means very recent commit f12b81e47f48940a ("media: core headers: fix kernel-doc warnings") is not fully correct, as it added kerneldoc stating this is the responsibility of the driver: + * @reserved: drivers and applications must zero this array Anyway, it doesn't look like this umn.edu patch introduced a bug. > > > --- a/drivers/media/platform/rcar_drif.c > > > +++ b/drivers/media/platform/rcar_drif.c > > > @@ -915,7 +915,6 @@ static int rcar_drif_g_fmt_sdr_cap(struct file *file, void *priv, > > > { > > > struct rcar_drif_sdr *sdr = video_drvdata(file); > > > > > > - memset(f->fmt.sdr.reserved, 0, sizeof(f->fmt.sdr.reserved)); > > > f->fmt.sdr.pixelformat = sdr->fmt->pixelformat; > > > f->fmt.sdr.buffersize = sdr->fmt->buffersize; Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds