Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1276354pxm; Wed, 23 Feb 2022 23:09:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJyeHy5BdHLdKjFL8csT76GmXwBUn9NT3nqmZZd/ZY1JnRk9AyBdMfwibda+3Zt7yByBSSmc X-Received: by 2002:a63:b06:0:b0:374:5e1a:150a with SMTP id 6-20020a630b06000000b003745e1a150amr1258398pgl.137.1645686571594; Wed, 23 Feb 2022 23:09:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645686571; cv=none; d=google.com; s=arc-20160816; b=XWk9ILRnxkhioIFtDGFrNP2XRyC8WZ/xe3FJIyPSgjRaUk13HIZvVRZMQGFxBXayFO nDXlnYVau6niwVH8rm35D3vO68OziO08eiOfhzT+VYmnisTRwNX2ExjcYEoyQtRGwOoZ VD/ipklrUVgLaqAodqq+geIBUZ6fjVCYXpeWsPoRpiQEYMj7y0AimYphqbqBd32Icmtf yqVLi1SvybIUmGxUttGE3uI1yH4/N+kMGev68s+hSBG9XWb0IWyDYpmwirB+bW0hxKxL 8IHOENb8/bUS5cfjVAavXOD+/a99lnz5YWMbNepZQVVGAZ9MeV0W/WHemlrFkEQVFGJT 0Qww== 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:dkim-signature; bh=TBzpubb6QOX3/lVtwo5fvzqAqnSESNJxHaASJrbDiHU=; b=svmmVUoqCbGENNczl+KsHApN+RLjV9s8hkedGicHtIaDcmRYIAWu97Girk15cIbEdB kvZKPqnZy7HVU1vXlgmBlES+bnaRlaluGPcOBgpkKcQLq0iUU6TLoBxGUsR1MzDPu1q2 R0NV36ZphQmMR/B8draHQj+H5gkxXontmZXVJBXc1kW2OxSuSxDBPdcux4goqojts9uA ajGDRP66the/6dM4t0RaOlhmH7Gdv/xW9hlrrfbpRcgBzr8B1h3hGaMwd5U3nh3MK2T2 UXWn9zj9xDhQtxAHwonyOrYjyFZ4y2obHLj9bcO7Vl9WLnB6q/gnQzmO3rkeL6RamvK3 z91w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d9kZ0BbV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f21si1711932pfc.210.2022.02.23.23.09.14; Wed, 23 Feb 2022 23:09:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d9kZ0BbV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S231448AbiBXHGk (ORCPT + 99 others); Thu, 24 Feb 2022 02:06:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229925AbiBXHGh (ORCPT ); Thu, 24 Feb 2022 02:06:37 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADD3F2649B0; Wed, 23 Feb 2022 23:06:07 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E40CD61978; Thu, 24 Feb 2022 07:06:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47C7EC34100; Thu, 24 Feb 2022 07:06:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645686366; bh=d3iTCnmjiWI2WfX8T3i0lRHp9N81t6Yh8Z7V7FwGN/U=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=d9kZ0BbVkyCyNqDMbIIl+9W1OVaOiHcqpofy9Tv0x+jjG5DysO9+U6Q2K4lcdfFyH fai03dHJQzajxq5x8dD/JFbdF1zJckhozUk8lR9cVmlk5bBWd0W6ERB7Zbxdjefy3a B8/SUsADYD0SQguWOueuCsugHgBSJ8wqUkSLkiLSqKWedW5ys5Z7/z6mU2vQUHnHJ6 T4vRyvf7dvKpTRGhlcWD3SzP2O+MDfjLinnJiEst0s0apfF0uwuaENIe6tuGMnmiQ2 f1b6FsJH1WZrXXQHaNQBk/Ix0arInQgA572KGEYojkJ/0uUcVIi+T6URqFtcgb3eKx YzcfTkJH+KZ5w== Received: by mail-wr1-f41.google.com with SMTP id n14so1094215wrq.7; Wed, 23 Feb 2022 23:06:06 -0800 (PST) X-Gm-Message-State: AOAM533IwfhdoMLynJ+bABIrvx9165dae9qEOAN49auVA5Wg4l9cRSuW wg6wjh0haKlmXfi2cxR8wCiOxEwWbvnr+Ck444Y= X-Received: by 2002:adf:a446:0:b0:1ed:c41b:cf13 with SMTP id e6-20020adfa446000000b001edc41bcf13mr1075883wra.407.1645686364180; Wed, 23 Feb 2022 23:06:04 -0800 (PST) MIME-Version: 1.0 References: <20220216131332.1489939-1-arnd@kernel.org> <20220216131332.1489939-8-arnd@kernel.org> In-Reply-To: From: Arnd Bergmann Date: Thu, 24 Feb 2022 08:05:48 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 07/18] nios2: drop access_ok() check from __put_user() To: Dinh Nguyen Cc: Linus Torvalds , Christoph Hellwig , linux-arch , Linux-MM , Linux API , Arnd Bergmann , Linux Kernel Mailing List , Al Viro , Russell King - ARM Linux , Will Deacon , Guo Ren , Brian Cain , Geert Uytterhoeven , Michal Simek , Thomas Bogendoerfer , Nick Hu , Greentime Hu , Stafford Horne , Helge Deller , Michael Ellerman , Peter Zijlstra , Ingo Molnar , Mark Rutland , Heiko Carstens , Rich Felker , David Miller , Richard Weinberger , "the arch/x86 maintainers" , Max Filippov , "Eric W . Biederman" , Andrew Morton , Ard Biesheuvel , alpha , "open list:SYNOPSYS ARC ARCHITECTURE" , linux-csky@vger.kernel.org, "open list:QUALCOMM HEXAGON..." , linux-ia64@vger.kernel.org, linux-m68k , "open list:BROADCOM NVRAM DRIVER" , Openrisc , Parisc List , linuxppc-dev , linux-riscv , linux-s390 , Linux-sh list , sparclinux , linux-um , "open list:TENSILICA XTENSA PORT (xtensa)" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 24, 2022 at 12:30 AM Dinh Nguyen wrote: > On 2/16/22 07:13, Arnd Bergmann wrote: From: Arnd Bergmann > > > > Unlike other architectures, the nios2 version of __put_user() has an > > extra check for access_ok(), preventing it from being used to implement > > __put_kernel_nofault(). > > > > Split up put_user() along the same lines as __get_user()/get_user() > > > > Signed-off-by: Arnd Bergmann > > Acked-by: Dinh Nguyen Thanks! Could you also have a look at patch 2 (uaccess: fix nios2 and microblaze get_user_8)? That one is actually more critical, and should be backported to stable kernels. Arnd