-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.4] kernel crash with omxplayer when CONFIG_CPU_SW_DOMAIN_PAN=y #1381
Comments
Confirmed, everything works with CONFIG_CPU_SW_DOMAIN_PAN is turned off. Please fix the drivers to work properly with this security feature enabled. |
CONFIG_CPU_SW_DOMAIN_PAN is disabled until upstream is fixed: raspberrypi/linux#1381 rpi2 kernel changed to CONFIG_VMSPLIT_3G_OPT.
To save time, what is the minimal set of steps required to cause a crash? Does it vary with content? |
Just compile kernel with CONFIG_CPU_SW_DOMAIN_PAN=y. For me the above backtrace is reproduced when playing any mp4 video with omxplayer. Apparently the semantics how to copy data to/from userland are much stricter with domain pan is enabled. |
CONFIG_CPU_SW_DOMAIN_PAN and CONFIG_UACCESS_WITH_MEMCPY are currently incompatible, see #1178 (comment) |
Thanks for the hint and link, @notro - that should make the task much easier. |
I can confirm that I get a crash when CONFIG_CPU_SW_DOMAIN_PAN is set (booting to the desktop is all that is required), and that removing CONFIG_UACCESS_WITH_MEMCPY prevents the crash. UACCESS_WITH_MEMCPY gives a boost to performance, so it isn't something we would want to disable by default. We could make UACCESS_WITH_MEMCPY dependent on !CPU_SW_DOMAIN_PAN, but that is a change to purely upstream code which we try to avoid. Given that you have to explicitly add CPU_SW_DOMAIN_PAN, explicitly remove UACCESS_WITH_MEMCPY at the same time. @popcornmix Would you agree? The change to arch/arm/Kconfig is trivial. |
I'm okay with that. It really is an upstream issue so it would be nice if it were fixed there, but in the meantime we could make CPU_SW_DOMAIN_PAN remove UACCESS_WITH_MEMCPY to avoid others hitting this issue. |
Did not realize it's upstream issue. Yeah, maybe we should bug them again about this. The Kconfig issue sounds good enough workaround. Do you have any numbers on what kind of performance boost UACCESS_WITH_MEMCPY would give? |
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c014953d84ec21a4df9a43be2378861ea6e9246e made it to 4.4 This is not a full fix? Or there's more problems with the compatibility? |
I seem to recall a network file transfer measurement that increased by about 10% with UACCESS_WITH_MEMCPY. This was probably Pi1 where CPU is more of a bottleneck. But there is a measurable improvement. |
@pelwell Does "Improve __copy_to_user and __copy_from_user performance" need anything from "ARM: fix uaccess_with_memcpy() with SW_DOMAIN_PAN" (I've not looked, but I wonder if the upstream fix needs to handle another code path). |
"ARM: fix uaccess_with_memcpy() with SW_DOMAIN_PAN" (c014953) only appears in rpi-4.4.y and above, so won't help 4.1. I can push the config fix there, or we can just leave it since 4.1 is obsolescent. "Improve __copy_to_user and __copy_from_user performance" adds arm_copy_from_user, which also need to modified. I have a patch for this which allows omxplayer to work. |
The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
CONFIG_CPU_SW_DOMAIN_PAN is incompatible with CONFIG_UACCESS_WITH_MEMCPY, so make the "depends on" rules reflect that. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
I've pushed patches for this to 4.1, 4.4 and 4.5. Please test, and close if happy. |
4.1 does not need to be patched. The domain pan features is new for 4.4. |
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
The 4.1 patch is harmless. @fabled okay to close? |
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: raspberrypi#1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: raspberrypi#1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: raspberrypi#1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: raspberrypi#4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. arch/arm: Add mmiocpy/set aliases for memcpy/set See: #1082 copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. See: #1381 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code is not safe on ARMv7 if LPAE & high memory is enabled and causes crashes which look like PTE corruption. Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y which is really an ARMv6 / Pi1 optimization and not necessary on newer ARM processors. arm: fix mmap unlocks in uaccess_with_memcpy.c This is a regression that was added with the commit 192a4e9 as of rpi-5.8.y, since that is when the move to the mmap locking API was introduced - d8ed45c The issue is that when the patch to improve performance for the __copy_to_user and __copy_from_user functions were added for the Raspberry Pi, some of the mmaps were incorrectly mapped to write instead of read. This would cause a verity of issues, and in my case, prevent the booting of a squashfs filesystem on rpi-5.8-y and above. An example of the panic you would see from this can be seen at https://pastebin.com/raw/jBz5xCzL Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Christopher Blake <chrisrblake93@gmail.com> arch/arm: Add __memset alias to memset_rpi.S memset_rpi.S is an optimised memset implementation, but doesn't define __memset (which was just added to memset.S). As a result, building for the BCM2835 platform causes a link failure. Add __memset as yet another alias to our common implementation. Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <phil@raspberrypi.com> arm: Fix annoying .eh_frame section warnings Replace the cfi directives with the UNWIND equivalents. This prevents the .eh_frame section from being created, eliminating the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
I tried the 4.4.6 kernel today, and it crashed with the following dump:
This is probably related to my kernel build having CONFIG_CPU_SW_DOMAIN_PAN=y.
The text was updated successfully, but these errors were encountered: