Software: Apache. PHP/5.4.45 

uname -a: Linux webm056.cluster010.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue
Sep 17 08:14:20 UTC 2024 x86_64
 

uid=243112(mycochar) gid=100(users) groups=100(users)  

Safe-mode: OFF (not secure)

/home/mycochar/www/image/photo/gcc-12.3.0/gcc/testsuite/gcc.target/i386/   drwxr-xr-x
Free 0 B of 0 B (0%)
Your ip: 216.73.216.77 - Server ip: 213.186.33.19
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    

[Enumerate]    [Encoder]    [Tools]    [Proc.]    [FTP Brute]    [Sec.]    [SQL]    [PHP-Code]    [Backdoor Host]    [Back-Connection]    [milw0rm it!]    [PHP-Proxy]    [Self remove]
    


Viewing file:     pr97642-2.c (2.01 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* PR target/97642 */
/* { dg-do run { target *-*-linux* } } */
/* { dg-options "-O2 -mavx512dq -mavx512vl -mavx512bw" } */
/* { dg-require-effective-target avx512vl } */
/* { dg-require-effective-target avx512dq } */
/* { dg-require-effective-target avx512bw } */

#include <assert.h>
#include <immintrin.h>
#include <stdint.h>
#include <sys/mman.h>

#define N 5

// Faults with GCC because usage of vpblendd
__m256i __attribute__((noinline)) mask_load(uint32_t * arr) {
  __m256i tmp;
  return _mm256_mask_loadu_epi32(tmp, (1 << N) - 1, arr);
}

// Faults
__m256i __attribute__((noinline)) blend_load_asm(uint32_t * arr) {
  __m256i tmp = _mm256_set1_epi64x(0);
  asm volatile("vpblendd %[m], (%[arr]), %[tmp], %[tmp]\n\t"
           : [ tmp ] "+x"(tmp)
           : [ arr ] "r"(arr), [ m ] "i"(((1 << N) - 1))
           :);
  return tmp;
}

// Does not fault
__m256i __attribute__((noinline)) mask_load_asm(uint32_t * arr) {
  __m256i           tmp;
  asm volatile(
           "movb %[m], %%al\n\t"
           "kmovb %%eax, %%k1\n\t"
           "vmovdqu32 (%[arr]), %[tmp] %{%%k1} %{z%}\n\t"
           : [ tmp ] "+x"(tmp)
           : [ arr ] "r"(arr), [ m ] "i"(((1 << N) - 1))
           : "eax", "k1");
  return tmp;
}


void __attribute__((noinline)) mask_store(uint32_t * arr, __m256i v) {
  return _mm256_mask_storeu_epi32(arr, (1 << N) - 1, v);
}


#define NPAGES      (2)
#define END_OF_PAGE (1024 - N)

#ifndef LOAD_METHOD
#define LOAD_METHOD mask_load // mask_load_asm does not fault
#endif


int
main() {
  if (!(__builtin_cpu_supports ("avx512dq")
    && __builtin_cpu_supports ("avx512vl")
    && __builtin_cpu_supports ("avx512bw")))
    return 0;

  uint32_t * addr =
    (uint32_t *)mmap(NULL, NPAGES * 4096, PROT_READ | PROT_WRITE,
             MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);

  for (uint32_t i = 0; i < NPAGES; i += 2) {

    uint32_t page_offset      = 1024 * i + END_OF_PAGE;
    uint32_t next_page_offset = 1024 * (i + 1);

    assert(!mprotect(addr + next_page_offset, 4096, PROT_NONE));
    mask_store(addr + page_offset, LOAD_METHOD(addr + page_offset));
  }
}

Enter:
 
Select:
 

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

Search
  - regexp 

Upload
 
[ ok ]

Make Dir
 
[ ok ]
Make File
 
[ ok ]

Go Dir
 
Go File
 

--[ x2300 Locus7Shell v. 1.0a beta Modded by #!physx^ | www.LOCUS7S.com | Generation time: 0.0059 ]--