From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41A68C433EF for ; Wed, 15 Sep 2021 15:09:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 082FA61029 for ; Wed, 15 Sep 2021 15:09:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 082FA61029 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Fc5znQSyKqIghUmjR9QZDu2aFqpMPW7dqCgifa0Oi5M=; b=HEGWghousCINPT VEbBOfCZIKr2EgNOLka9aw25nb/9vqafb0+1Q5KRkIolHR5A7idslulrQpZJXFVC3WvBOG4rQVhhI 8rWrJu4yTdBObPZtKeYXpAWXtdDD4UmnQMDaKZzoHRlEFmkETDidbNumaj8iUyGhd957i37gjctP3 Eo6ATiWxzpxGDHhKUCR26QTdkKPFK6d4sb1JjRNGfk+H/zlp48Rs6jI59hD9eDE5zPHbYhWHCO69h KddHz/TG6bhEOT8CHWqOb4rzmrqOTST85b+YlfmpYgV7fgoZAHQg+wnNY6OEIpTr7GbXvRRndkbkq +/CliPXqQJ7XhllwiI0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQWVx-009MjC-HU; Wed, 15 Sep 2021 15:07:57 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQWVt-009MiF-M6 for linux-arm-kernel@lists.infradead.org; Wed, 15 Sep 2021 15:07:55 +0000 Received: by mail-pj1-x1031.google.com with SMTP id k23-20020a17090a591700b001976d2db364so2443596pji.2 for ; Wed, 15 Sep 2021 08:07:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RZ2zdO4EO1F5NLbo0L62IyjtDBNQ5qjCmnSeaySzVsA=; b=RywfdUo6wWIjKq5o5JccUUpxkIJ/R3TA23mBRIw5t5HfZICJNT4WRP3BirVafYwO6e CdWRp9Ouke38QMvhp8/yp+QhCryr2Vpgx2fx4SPdWeRTpvx2Ep6UgGgGcfdPWP8PfkKO q4cw4Z7+3eCJKfrPYQxl1O+C1Z7WPnB1t5BLnyjgWUNOWzPXNypogUjuaz1atBjcWo42 RGSWj+VbqA8l84bgGYfOIxeg9oizbVURcgmqCF7u3X56CUCjK98Ew2RpKyE5dHH+Q730 HYnl0EtpBkKyJ1MV3EN3pKciiChnrGaUjCq6Gh2urVo7RCagQff5p0XuZFAA1r0wnx5R XatQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RZ2zdO4EO1F5NLbo0L62IyjtDBNQ5qjCmnSeaySzVsA=; b=3RxaDOwkrJZphXcmPmeY86e6x8FpWvMV9qImedZWG3fZr0M+UiQLiNI5HAeUiHY36w Q4dvZwuJgd+Xx8gNWtmnG9oTy8Bq6NDwSHcZRPhtSFOup31MJW0NcnaMTkTmhbUsA2Pc FQoR9edWBpQ0wcp/7utwIEGNzJYE3syler93UhxodRmbcixjcpLBZwrbJWBPROE5riRR S1fHQSL66f6xD/JGBGsLdqOzGXUo//Y8qZWSMyvGBOpT/rqYLBDugfQXVtT/vkMvBZnT ycXUFRfihYlqYcA2JJTP9bAHz1Cn9hi/dic6f/kuR+Sl1fGH+BbGDmZpBnMYRQ16KWnD AgRQ== X-Gm-Message-State: AOAM531FlJsXdWd0cFadQLnPxWobk0I6wgSl+AS71L13OF89vyN6010n scLqepw+wbtw783c3m5lyszGiHGPcggVzTRJG//LhtcyoUI= X-Google-Smtp-Source: ABdhPJymp9q/8T2rV8tPuPrdZ/1CkbNySLuZiuikFKtuEBZS6dBN+BG/nUIBZqBro/frh0ndwGT5stU7ich3LXeCU2U= X-Received: by 2002:a17:90b:791:: with SMTP id l17mr267551pjz.155.1631718471628; Wed, 15 Sep 2021 08:07:51 -0700 (PDT) MIME-Version: 1.0 References: <20210819212819.GM22278@shell.armlinux.org.uk> <20210820001646.GN22278@shell.armlinux.org.uk> <381afc78-5a7f-8286-76ea-2e6c7867972d@arm.com> In-Reply-To: From: Tim Harvey Date: Wed, 15 Sep 2021 08:07:39 -0700 Message-ID: Subject: Re: arm32 insecure W+X mapping To: Fabio Estevam Cc: Shawn Guo , Pengutronix Kernel Team , "Russell King (Oracle)" , Linux ARM Mailing List , Lee Jones , Robin Murphy , NXP Linux Team X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210915_080753_837347_B0677627 X-CRM114-Status: GOOD ( 22.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 15, 2021 at 2:45 AM Fabio Estevam wrote: > > Hi Tim, > > [Adding the NXP folks] > > On Tue, Sep 7, 2021 at 2:49 PM Tim Harvey wrote: > > > Shawn, Fabio and Pengutronix Kernel team, > > > > Do you know why we get 'Checked W+X mappings: FAILED, 1 W+X pages > > found' messages for IMX6 with CONFIG_SUSPEND and CONFIG_DEBUG_WX > > enabled due to to __arm_ioremap_exec call remapping ocram? [1] > > Not sure if this is related or not to the following behavior that I am seeing. > > On 5.15-rc1 I see the following on an imx6dl based board: > > [ 0.123336] imx6q_suspend_init: failed to find ocram device! > > Also, suspend/resume is not working as expected: > > # echo enabled > /sys/class/tty/ttymxc0/power/wakeup > # echo mem > /sys/power/state > > (Sometimes it reboots the board, sometimes it does not enter in suspend). > > I haven't had a chance to debug this but just wanted to report it. > Fabio, I don't see how this would be related. The warning and kernel dump are a security warning that a page is left writable which could be used as an attack vector. It doesn't constitute a bug necessarily but it is a possible security hole that should be fixed. As Russell mentions there would need to be some functions created to deal with it properly. Best regards, Tim _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel