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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3D06C433F5 for ; Wed, 17 Nov 2021 09:11:23 +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 7FBB163212 for ; Wed, 17 Nov 2021 09:11:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7FBB163212 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=8FbwBFWxsn7v1BdcKi4RWIThMug0zWTpavNx9LvnOdo=; b=foa9q4E4vIMUAB bOtOsSoKx/SsjX6JG05CpMIaJtdc1TM77e+N/Jd6b6fYFU+Vb+s7W9QpLW+SElUmncIjymCd/Ztpm lB8KAT+ooXGGdVCdPjxfnz1oKOjzCJD/4o4N6NdZyQ3y28ACQ3kGi2njIJ5N+HmxgL8yjUZEs/bfP RDb9doZWCuYGCAzoOOU+YilQYU69mk47XSVOOj56VMi6WyNkAbOn0kLCQnzldUFnFsWKU5v/Ru/QF S9ZRsp25FZIFYKVQBYlM4LSXQcGCZbdnhcASI7dGeB7cVHhUUb/a9UwGpUPd0AT8wZkk8GqtOtqn6 IUPx9kgbT+NU2s0uv4Rw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnGwR-0046yY-It; Wed, 17 Nov 2021 09:09:20 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnGwG-0046x0-ME for linux-arm-kernel@lists.infradead.org; Wed, 17 Nov 2021 09:09:10 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4C5F861BCF for ; Wed, 17 Nov 2021 09:09:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637140148; bh=Q8rPdGyWzHJbVy92iCnDVDVHbqtIz9MymTI2XMjaoyU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=G+jbf1IbLtGnkU8MSh1psnmnl/0VGjoIJcuLGYJjtiwzIacErJVnZJnXsWC+bJeou 7fj7xX9F4OVmvodFDmLlu2TlUIfr6VmdIXPMnB4WA7EtnTv4KMfxWXSUV4/jNZI4Ti WNHm7nbqWuoT7NnTQKHdX9V3258IPZjZqWnnw5tnyNbLT3iQP09ndyLHpoSrNcvVGs Nk1vWq03CTBn1+vf7nwwkeaDx2/CG/70CaT93TRlhPpruVDzc7mfXcDc/v9IiYFjGQ 7n16Ow19d9xuRIMgj8j3/0Y6W+f2JakrbSY7zbXSGGyB+L496RL5rccL7AhMlTf4Da 46KiWgaFaLXVw== Received: by mail-oi1-f179.google.com with SMTP id s139so4897736oie.13 for ; Wed, 17 Nov 2021 01:09:08 -0800 (PST) X-Gm-Message-State: AOAM531aOYGVJY4Zonwge7QcM7n8NvA71xsuFFIVZWrblqQzxNvDCs3d VQxsO0RUSBPSlctcDGeOfmHt77ZcKCm03nJUPsI= X-Google-Smtp-Source: ABdhPJzS56N8O5cnI2a78lO4dXgpHdVPz6HBEAMhS/V2JnOVZpZx2ickPp3JwvH7Cer0L93O7jgaUOr9IvNBMFpcvVg= X-Received: by 2002:a05:6808:12:: with SMTP id u18mr12948787oic.174.1637140147649; Wed, 17 Nov 2021 01:09:07 -0800 (PST) MIME-Version: 1.0 References: <20211115111816.3911213-1-ardb@kernel.org> <20211115111816.3911213-8-ardb@kernel.org> In-Reply-To: From: Ard Biesheuvel Date: Wed, 17 Nov 2021 10:08:56 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 7/7] ARM: implement support for vmap'ed stacks To: Arnd Bergmann Cc: Tony Lindgren , "Russell King (Oracle)" , Guillaume Tucker , linux-omap , Linux ARM , Nicolas Pitre , Kees Cook , Keith Packard , Linus Walleij , Nick Desaulniers , "kernelci@groups.io" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211117_010908_832055_97E8D16B X-CRM114-Status: GOOD ( 27.98 ) 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, 17 Nov 2021 at 10:07, Arnd Bergmann wrote: > > On Wed, Nov 17, 2021 at 10:03 AM Arnd Bergmann wrote: > > > > On Wed, Nov 17, 2021 at 9:36 AM Tony Lindgren wrote: > > > * Ard Biesheuvel [211117 08:29]: > > > > > > > > Thanks Tony, that is very helpful. I have a Beaglebone white somewhere > > > > so I'll try and reproduce it locally as well. > > > > > > I think with Beaglebone you may hit this only with suspend/resume if at > > > all. On am335x cpuidle is not shutting down the CPU. And only some models > > > will suspend to deeper idle states as it depends on the PMIC. > > > > > > If you have some test patch to try, just let me know. > > > > I looked at how the sleep code is called and found that cpu_suspend()/ > > __cpu_suspend() has interesting manipulation of the stack pointer to > > call the platform specific function with a simple 1:1 page table, > > I would expect the problem somewhere in there, haven't pinpointed > > the exact line yet, but if any of that code tries to local the physical > > address of the stack using virt_to_phys or its asm equivalent, this > > fails for a vmap stack. > > and just after sending this I see > > void __cpu_suspend_save(u32 *ptr, u32 ptrsz, u32 sp, u32 *save_ptr) > { > *save_ptr = virt_to_phys(ptr); > > 'ptr' is a pointer to the stack here. It might not be the only place that > needs fixing, but this clearly has to do a page table walk like > vmalloc_to_page() does to get to the correct physical address. > I had just arrived at the same conclusion. I'll fix this up and drop it in kernelci. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel