Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1945845ybg; Thu, 30 Jul 2020 06:50:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzar4S8ExUzKazAlGrZMMmP8KvwjcE1w1NKPqO8y1b0gmcnyul2Q6j3s57LtHg2wCCabw+P X-Received: by 2002:a17:906:82c1:: with SMTP id a1mr2669875ejy.172.1596117015476; Thu, 30 Jul 2020 06:50:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596117015; cv=none; d=google.com; s=arc-20160816; b=c0qaxJ2NrJiQeDstOe1tRQoYqDUuVGlI8nRejBRVi1fKeK2FcorE7rby+hNydjzMA8 expUQcEVP8IgALmKsWRd2DRhGnRzFcTTAxL1XYdg+Dbt2/BRxJNUuW3TGyMm/qcKlR12 2DWpkIVSdhrhxMhFoT48hZjvX5Si2D4BZYJlnz/SjjfYduI2zWxG8gyd1E9BVA9+R8G6 swS+wwkEIv0+NJ5G+/1MH+VHPAxuTLf+5xIfjtYs//J3ZwQYts8+AhJH582rfUtgkCeE U5qSP+cdDSecVnzQQ5lzKEELtAkA0HKHjqUraLqWmV2tWEHNkE+IgYYRxeUjCv+EH+jS aY3g== 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; bh=voXPumdLMRvd0kC83k2jPSVDEuyrI328KCDfOapIWtQ=; b=eiEirIRnKrundFL4IbAM3lmpqBJMPzIth8qSt9mZX5EkSEq9umu9+ahruiHlCMYZez 7mcdqdc2Xhu+GNZgK9aeugBwvxG9zZNMjL/Ii1oRX8tjHdemmKLJj2MDsh5qKesB0pTL /7eKE1TdRD596QLXKfCowsZSghQoNXLAAVhQtGJ6mL0QARIaG2p3UvK5S2SeZUftJ5WJ jsrpcJL5GdwUULyJSv/pMnaCdrRLh1pjE0v1A/5lv7UmVRbLU0d/GuFciyW7yH8xX9CO my3/70QKxU6Xfx2trorj72NWx9JD/Smhepy9kGWuKI4l8uzBC4+PX7A9TYdEbzze9Z+r WPAQ== 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 rs7si2939404ejb.195.2020.07.30.06.49.52; Thu, 30 Jul 2020 06:50:15 -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 S1728629AbgG3Nta (ORCPT + 99 others); Thu, 30 Jul 2020 09:49:30 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:39211 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726281AbgG3Nt3 (ORCPT ); Thu, 30 Jul 2020 09:49:29 -0400 Received: from mail-qt1-f178.google.com ([209.85.160.178]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPSA (Nemesis) id 1M7JvQ-1k8qZm0vgC-007oJg; Thu, 30 Jul 2020 15:49:26 +0200 Received: by mail-qt1-f178.google.com with SMTP id s23so20305529qtq.12; Thu, 30 Jul 2020 06:49:25 -0700 (PDT) X-Gm-Message-State: AOAM533BMn694DConxOl9d3hpveys2uKfWHhCH4VJMHP/BuqPLu67ulP oOErG67Wk6fJ4GggcbgMxk2Ityg9neRED9OnB2g= X-Received: by 2002:aed:2946:: with SMTP id s64mr3072428qtd.204.1596116965004; Thu, 30 Jul 2020 06:49:25 -0700 (PDT) MIME-Version: 1.0 References: <20200726222703.102701-1-yepeilin.cs@gmail.com> <20200727131608.GD1913@kadam> <20200728130632.GI1913@kadam> <20200730083833.GD3703480@smile.fi.intel.com> <20200730114842.GH3703480@smile.fi.intel.com> In-Reply-To: <20200730114842.GH3703480@smile.fi.intel.com> From: Arnd Bergmann Date: Thu, 30 Jul 2020 15:49:08 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [Linux-kernel-mentees] [PATCH v3] media/v4l2-core: Fix kernel-infoleak in video_put_user() To: Andy Shevchenko Cc: Bartosz Golaszewski , Dan Carpenter , Linus Walleij , Peilin Ye , Mauro Carvalho Chehab , Greg Kroah-Hartman , syzkaller-bugs , Hans Verkuil , Sakari Ailus , Laurent Pinchart , Vandana BN , Ezequiel Garcia , =?UTF-8?Q?Niklas_S=C3=B6derlund?= , linux-kernel-mentees@lists.linuxfoundation.org, Linux Media Mailing List , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:4L8J6U7u4enMispHGwLPSaPdYn/3ag24Ug7NY8p+/yQf2qTb+A0 H4ZCK7qUorpCmcWBV6zNckHjpPaCX6hIYOxi/mzodf2FLXeG6r7+BItc1RahU+89xVkEhoX tlyma2oxQqAzKJKlCPrU49rXpS5Rp2wS9g+cMUX6FnEgHXcbZ4b6skOhkIpBJJhNttfXuED rj2ljDoR3WlpToDR1FJfg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ixAp1TSKQ9o=:lfxiAtY+WA2NeLrtT8BIe7 y2NCq/AYh/izuO/j2j2tgr/mOkAYTF1F61UGPqtqKgD3SdpXLiMRu4f5RS9u0WFOeC98wTECO yv/qN9zj1uUqtFqmXmaFc6VKIxeS0h6RXpcDVvdwEDsgGX/d5JqlOwLich9AeUcoiJKmeRXNz hLI9t9mM5Ia/C/p1Ljls544WtMO89761OCJtrHyXbtBqQS+ocFxm9Txw8jEWaa3JjMpbW3npt 0m4ktsMvi4IKROQ+ly84giRSq+PiTDfMtUyl3VSPIpfpgLoRJKCrr0VERRPbnya6m+SP/QMTa NZiv2bkex2vVOw1HVjsSZQYXKgwN+XliVlEhEyOwCt7FIlGMGA0Ni5gYAu1T84fHB2tUMiZ6r Rh6m9cKZQPKqcIVTaYkzTgvyBz2n0uw3LiSVhjOAPXeXr0lyHnpreLOGMyTfiRLCjFbn5hlaF K6ZFcFP5QiXw39OLY8Tsrn8joLoYWQ9gM6sjUDFp+Lk4XG2YZu1V82Y7Zod3+vBldx2piLmFU K0+6WMo8eb653bboZbER1CH+j/WclHd9LUUqzXsOzYggqpt/vNjvjeYcBBz9VZSoN79+lCyfS 11tLXlSe/inMa3B04PSMpZj6X2oqeRCBD4dfzeubks3OK4Aa8QBqt3RgwFtUXTgErMTv0dqjP /SFhLZf/VEaFWE9OM30/LLnqt1ttidERnzxfgtB73HljOzdTOGnLtAIOrfwPZZKsfdASu7snO nhSYBHM88Sm079y7Kw4zGp75vpEotnF37JNj7ZAfy0cSGKLYisKA8S8v1aBcDY6rKO/82gob8 sbgwU/LRQUpDy0Hsm2kbHtRtGyE666sxoW4AN7PdZ/5WYziuGTo54Gu+k6IcgrUg1kB8uZ1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 30, 2020 at 1:48 PM Andy Shevchenko wrote: > On Thu, Jul 30, 2020 at 11:18:04AM +0200, Arnd Bergmann wrote: > > The in_ia32_syscall() check should be completely reliable in telling whether > > we are called from read() by an ia32 task or not, and we use the same > > logic for input_event, which has a similar problem (on all compat architectures, > > not just x86). > > By the way any reason why we have to have in_ia32_syscall() instead of > in_compat_syscall()? x86 is the only architecture that has different struct alignment between 32-bit and 64-bit processes, so others don't have this particular problem. On top of that, x86 also has two different 32-bit ABIs and only one of them needs the workaround, while the other (x32) uses the same struct layout as x86-64 and must use the normal code path. Arnd