On Wed, Jun 09, 2021 at 03:12:11PM -0700, Vineet Gupta wrote:
> Currently enabling this triggers a warning
>
> | usercopy: Kernel memory overwrite attempt detected to kernel text (offset
> 155633, size 11)!
> | usercopy: BUG: failure at mm/usercopy.c:99/usercopy_abort()!
> |
> |gcc generated __bu
config: arc-randconfig-r001-20210610 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://git.kernel.org
On 6/10/21 10:02 AM, Kees Cook wrote:
> On Wed, Jun 09, 2021 at 03:12:11PM -0700, Vineet Gupta wrote:
>> Currently enabling this triggers a warning
>>
>> | usercopy: Kernel memory overwrite attempt detected to kernel text (offset
>> 155633, size 11)!
>> | usercopy: BUG: failure at mm/usercopy.c:99
ARCv2 has some configuration dependent registers (r30, r58, r59) which
could be targetted by the compiler. To keep the ABI stable, these were
unconditionally part of the glibc ABI
(sysdeps/unix/sysv/linux/arc/sys/ucontext.h:mcontext_t) however we
missed populating them (by saving/restoring them acr
On Thu, Jun 10, 2021 at 06:56:48PM +, Vineet Gupta wrote:
> On 6/10/21 10:02 AM, Kees Cook wrote:
> > On Wed, Jun 09, 2021 at 03:12:11PM -0700, Vineet Gupta wrote:
> >> Currently enabling this triggers a warning
> >>
> >> | usercopy: Kernel memory overwrite attempt detected to kernel text
> >>
t/next/linux-next.git__;!!A4F2R9G_pg!OKqfde4ua3ZrR7XYJtEqASSTLKtjW1iEEeBD5V38iLgNZ9l3CBkaluPc9FDW_E5l$
> master
> head: 50a1180e6cf12462bbbf3f2ebc5b93094ed9abee
> commit: 98ec2edf58c820ef953fbdfcf98d706aa804b822 [8465/8758] ARCv2: save ABI
> registers across signal handling
> config:
On 6/10/21 4:56 PM, Kees Cook wrote:
|Stack Trace:
| memfd_fcntl+0x0/0x470
| usercopy_abort+0x8a/0x8c
| __check_object_size+0x10e/0x138
| copy_strings+0x1f4/0x38c
| __do_execve_file+0x352/0x848
| EV_Trap+0xcc/0xd0
>>> What was the root cause here? Was it that the