-
Notifications
You must be signed in to change notification settings - Fork 5.2k
memory corruption when using memset32() on RPi Zero #4798
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
Comments
|
See: raspberrypi#4798 Signed-off-by: Phil Elwell <[email protected]>
If you are in a position to build your own kernel, have a look at #4820 which should fix the problem. Tested with a hacked Kconfig on Pi 4, but should work as-is on Pi Zero etc. |
See: #4798 Signed-off-by: Phil Elwell <[email protected]>
See: #4798 Signed-off-by: Phil Elwell <[email protected]>
See: #4798 Signed-off-by: Phil Elwell <[email protected]>
Should now be fixed in rpi-5.10.y, rpi-5.15.y and rpi-5.16.y. |
See: #4798 Signed-off-by: Phil Elwell <[email protected]>
See: #4798 Signed-off-by: Phil Elwell <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
See: #4798 Signed-off-by: Phil Elwell <[email protected]>
@npitre okay to close? |
See: #4798 Signed-off-by: Phil Elwell <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
See: #4798 Signed-off-by: Phil Elwell <[email protected]>
See: #4798 Signed-off-by: Phil Elwell <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
See: #4798 Signed-off-by: Phil Elwell <[email protected]>
See: raspberrypi#4798 Signed-off-by: Phil Elwell <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
See: #4798 Signed-off-by: Phil Elwell <[email protected]>
See: #4798 Signed-off-by: Phil Elwell <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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/linux#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/linux#1381 Signed-off-by: Phil Elwell <[email protected]> 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 192a4e923ef092924dd013e7326f2ec520ee4783 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: raspberrypi/linux#4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
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 <[email protected]> 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 <[email protected]> Signed-off-by: Christopher Blake <[email protected]> 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 <[email protected]> arm: Fix custom rpi __memset32 and __memset64 See: #4798 Signed-off-by: Phil Elwell <[email protected]> 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 <[email protected]>
Describe the bug
Any configuration enabling CONFIG_BCM2835_FAST_MEMCPY pulls in
an alternative
memset()
implementation to be found inarch/arm/lib/memset_rpi.S.
This alternative implementation aliases
__memset32()
and__memset64()
to
memset()
which is totally wrong, resulting in actual memory corruptionwhenever
memset32()
and/ormemset64()
is used.Expected behaviour
memset32()
is used to fill memory with 32-bit values.Likewise for
memset64()
.Actual behaviour
The low 8 bits of provided value are repeated like
memset()
should do.System
PiZeroW
cat /etc/rpi-issue
)?All of them.
vcgencmd version
)?N/A
uname -a
)?All kernels since commit 385b89c.
Additional context
I think the inclusion of an alternative
memset()
in a commit titled"Improve __copy_to_user and __copy_from_user performance" was wrong
in the first place. There is nothing really that I can see to justify
an alternative implementation for ARMv6 here either, even if it hadn't
broken
memset32()
which is unacceptable.The text was updated successfully, but these errors were encountered: