Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp465378ybz; Fri, 1 May 2020 02:22:44 -0700 (PDT) X-Google-Smtp-Source: APiQypKyuuutIFO6BNfa4D05Jwo+jX/G3heJAWlv/0OCUFnqYfpIVlBYv4s9CTyZ19v7U5yd7Bth X-Received: by 2002:a17:906:390a:: with SMTP id f10mr2294503eje.74.1588324964419; Fri, 01 May 2020 02:22:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588324964; cv=none; d=google.com; s=arc-20160816; b=qRzRNupTjWBeF9PmWKAxmkP4f298E2o523kFJ7CybKdG03I0daIx3s/gwpfEGCaj47 G7lBfCPnGyjN+KKFhXuClFWYsKwhqFranmhnoaNjCrEjLVSwPoBIJyqOmoxpyE6CnOjb ICFf3VfpYHZd30lZe2wAESsxzwxFk4AeivSPRJqCSjLvnWW2dcCr71nRSZGZTMrSHMkQ ChEp/1mb/ITZqi9SNs5DgKrwN6NdKrPY/uo3zjG9BuTAp5LyqOd9OP2uMjSrbvY6g3Dk jyGmejQ40f06686rY+EMctf46W1mB9RiDZPBb3msWTooDZKGG/lslV/5ZdNPH6laDUUi BlGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=BZ4Ad/d1aSVu6gEi6Ay6gMOz386r1wTGu5+DXuek8aw=; b=SrO3NBnmSPuBHwp0uvRNs4VajPSbdQ158X7nikc8Ss7FM8py+e6V96/wLIUbEyHPRt npg6+SMA8b0Igtfz1DE2Vi6IYbFcVB2jw/qiUyLYOu/gD1Bm+ltbDQKug9BLpW+DNbgi zy1CBpoER2/z1hPrx/fhLUzNZ54NRaGDcl45dcr1aDD3CgZymjPN6uEnOXQdYE9+jPA0 eJY5GYlZvVmQRaeJXMIM61BOtjfN1fIV9XUQjtr4zDsDm1wUflcptN1MdufeWn5JKyOH UU5okt0AwYatXtqBJZKDVmxbGqxo/JH+ji8qrUoTwdWQffFrxwV4jQ3IcHHUsLf+J/uh iftw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=WgXOCclT; 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 ch12si1534140ejb.36.2020.05.01.02.22.10; Fri, 01 May 2020 02:22:44 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=WgXOCclT; 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 S1728387AbgEAJTe (ORCPT + 99 others); Fri, 1 May 2020 05:19:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728325AbgEAJTd (ORCPT ); Fri, 1 May 2020 05:19:33 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B2CBC035495 for ; Fri, 1 May 2020 02:19:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=BZ4Ad/d1aSVu6gEi6Ay6gMOz386r1wTGu5+DXuek8aw=; b=WgXOCclTS0nBGm5Zf2MOFfRtNl YOv6++VdrVqW0o/O1/zOJ+jSSfV5IkRN0PJNL28ZInz6FzyQf9brsodj3m9+IqJwpqeQtl1669nkA QDuXDrc/XZGsZ8DfBrKyAeJcX5pr7sWK/9Fv7WSHfDNuh8SzhfOu7abcUUsajQwHufkwgdt9X+mz2 60uRKl83xoUxfyb/i4n1MdDA1NyvYU+/3loWFg9qDQewdTazfjyYABUbyAe6ZBHPncgpgX+Pc+G00 5797eCIV9CrPpMreWlKz4z8h5MVXuefxtiwYh1xEhBmmY6R7/xXUJxjhpMc/GAz4sRriRFeaqCEEv sQFMxS6w==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jURpV-0000xh-1D; Fri, 01 May 2020 09:19:33 +0000 Date: Fri, 1 May 2020 02:19:33 -0700 From: Christoph Hellwig To: Max Filippov Cc: Christoph Hellwig , ira.weiny@intel.com, LKML , "open list:TENSILICA XTENSA PORT (xtensa)" Subject: Re: xtensa question, was Re: [PATCH V1 00/10] Remove duplicated kmap code Message-ID: <20200501091933.GA3084@infradead.org> References: <20200430203845.582900-1-ira.weiny@intel.com> <20200501084634.GH27858@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 01, 2020 at 02:02:19AM -0700, Max Filippov wrote: > Hi Christoph, > > On Fri, May 1, 2020 at 1:46 AM Christoph Hellwig wrote: > > any idea why xtensa uses PAGE_KERNEL_EXEC instead of PAGE_KERNEL > > for kmap_prot? Mapping all mapped highmem as executable seems rather > > dangerous. > > I sure do: to allow instruction cache flushing when writing to high user > pages temporarily mapped with kmap. Instruction cache management > opcodes that operate on virtual addresses would raise an exception if > the address is not executable. Seems like this should use kmap_atomic_prot with PAGE_KERNEL_EXEC just for that case. Which of course didn't exist on xtensa so far, but with this series will.