linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Zhangjin Wu <falcon@tinylab.org>
To: w@1wt.eu
Cc: falcon@tinylab.org, arnd@arndb.de, david.laight@aculab.com,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-riscv@lists.infradead.org, thomas@t-8ch.de
Subject: [PATCH v6 00/15] tools/nolibc: add a new syscall helper
Date: Fri,  7 Jul 2023 22:49:28 +0800	[thread overview]
Message-ID: <cover.1688739492.git.falcon@tinylab.org> (raw)

Hi, Willy

Here is the v6 of the __sysret series [1], applies your suggestions.
additionally, the sbrk() also uses the __sysret helper.

These patches are tested (together with the coming v4 selftests/nolibc
patches) for all of the supported architectures:

           arch/board | result
          ------------|------------
      arm/vexpress-a9 | 142 test(s) passed, 1 skipped, 0 failed.
             arm/virt | 142 test(s) passed, 1 skipped, 0 failed.
         aarch64/virt | 142 test(s) passed, 1 skipped, 0 failed.
          ppc/g3beige | not supported
          ppc/ppce500 | not supported
              i386/pc | 142 test(s) passed, 1 skipped, 0 failed.
            x86_64/pc | 142 test(s) passed, 1 skipped, 0 failed.
         mipsel/malta | 142 test(s) passed, 1 skipped, 0 failed.
     loongarch64/virt | 142 test(s) passed, 1 skipped, 0 failed.
         riscv64/virt | 142 test(s) passed, 1 skipped, 0 failed.
         riscv32/virt | 0 test(s) passed, 0 skipped, 0 failed.
s390x/s390-ccw-virtio | 142 test(s) passed, 1 skipped, 0 failed.

Changes from v5 --> v6:

* tools/nolibc: arch-*.h: fix up code indent errors
  toolc/nolibc: arch-*.h: clean up whitespaces after __asm__

    Fix up the code indent errors and whitespaces between __asm__ and volatile.

    The post-whitespaces are reserved as before.

* tools/nolibc: arch-loongarch.h: shrink with _NOLIBC_SYSCALL_CLOBBERLIST
  tools/nolibc: arch-mips.h: shrink with _NOLIBC_SYSCALL_CLOBBERLIST

    Add _NOLIBC_ prefix for SYSCALL_CLOBBERLIST.

* tools/nolibc: add missing my_syscall6() for mips

    Use post-whitespaces instead of post-tab.

    The above 4 patches are preparation for this one.

* tools/nolibc: __sysret: support syscalls who return a pointer

    Add comments about the new errno range [-MAX_ERRNOR, -1], add ref to
    the musl and glibc.

* tools/nolibc: clean up mmap() routine

    Comment the MAP_FAILED return info.

* tools/nolibc: clean up sbrk() routine

    New patch, applies __sysret() helper too and also fixes up an error
    reported by scripts/checkpatch.pl.

* selftests/nolibc: export argv0 for some tests
  selftests/nolibc: prepare: create /dev/zero

    Prepare /dev/zero and argv0 for mmap test cases.

* selftests/nolibc: add EXPECT_PTREQ, EXPECT_PTRNE and EXPECT_PTRER
  selftests/nolibc: add sbrk_0 to test current brk getting

    No change.

* selftests/nolibc: add mmap_bad test case
  selftests/nolibc: add munmap_bad test case
  selftests/nolibc: add mmap_munmap_good test case

    Split the first two out to standalone patches.

    Add /dev/zero and argv0 to the file list and assigns a file_size
    manually for /dev/zero.

Best regards,
Zhangjin
---
[1]: https://lore.kernel.org/lkml/cover.1687957589.git.falcon@tinylab.org/

Zhangjin Wu (15):
  tools/nolibc: arch-*.h: fix up code indent errors
  toolc/nolibc: arch-*.h: clean up whitespaces after __asm__
  tools/nolibc: arch-loongarch.h: shrink with _NOLIBC_SYSCALL_CLOBBERLIST
  tools/nolibc: arch-mips.h: shrink with _NOLIBC_SYSCALL_CLOBBERLIST
  tools/nolibc: add missing my_syscall6() for mips
  tools/nolibc: __sysret: support syscalls who return a pointer
  tools/nolibc: clean up mmap() routine
  tools/nolibc: clean up sbrk() routine
  selftests/nolibc: export argv0 for some tests
  selftests/nolibc: prepare: create /dev/zero
  selftests/nolibc: add EXPECT_PTREQ, EXPECT_PTRNE and EXPECT_PTRER
  selftests/nolibc: add sbrk_0 to test current brk getting
  selftests/nolibc: add mmap_bad test case
  selftests/nolibc: add munmap_bad test case
  selftests/nolibc: add mmap_munmap_good test case

 tools/include/nolibc/arch-aarch64.h          |  28 ++--
 tools/include/nolibc/arch-arm.h              |  28 ++--
 tools/include/nolibc/arch-i386.h             |  24 ++--
 tools/include/nolibc/arch-loongarch.h        |  37 +++---
 tools/include/nolibc/arch-mips.h             |  73 +++++++----
 tools/include/nolibc/arch-riscv.h            |  14 +-
 tools/include/nolibc/arch-s390.h             |  14 +-
 tools/include/nolibc/arch-x86_64.h           |  28 ++--
 tools/include/nolibc/nolibc.h                |   9 +-
 tools/include/nolibc/sys.h                   |  55 ++++----
 tools/include/nolibc/types.h                 |   6 +
 tools/testing/selftests/nolibc/nolibc-test.c | 129 ++++++++++++++++++-
 12 files changed, 292 insertions(+), 153 deletions(-)

--
2.25.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

             reply	other threads:[~2023-07-07 14:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07 14:49 Zhangjin Wu [this message]
2023-07-07 14:50 ` [PATCH v6 01/15] tools/nolibc: arch-*.h: fix up code indent errors Zhangjin Wu
2023-07-09  9:17   ` Willy Tarreau
2023-07-07 14:52 ` [PATCH v6 02/15] toolc/nolibc: arch-*.h: clean up whitespaces after __asm__ Zhangjin Wu
2023-07-07 14:53 ` [PATCH v6 03/15] tools/nolibc: arch-loongarch.h: shrink with _NOLIBC_SYSCALL_CLOBBERLIST Zhangjin Wu
2023-07-07 14:54 ` [PATCH v6 04/15] tools/nolibc: arch-mips.h: " Zhangjin Wu
2023-07-07 14:55 ` [PATCH v6 05/15] tools/nolibc: add missing my_syscall6() for mips Zhangjin Wu
2023-07-07 14:56 ` [PATCH v6 06/15] tools/nolibc: __sysret: support syscalls who return a pointer Zhangjin Wu
2023-07-07 14:58 ` [PATCH v6 07/15] tools/nolibc: clean up mmap() routine Zhangjin Wu
2023-07-07 14:59 ` [PATCH v6 08/15] tools/nolibc: clean up sbrk() routine Zhangjin Wu
2023-07-07 15:01 ` [PATCH v6 09/15] selftests/nolibc: export argv0 for some tests Zhangjin Wu
2023-07-07 15:02 ` [PATCH v6 10/15] selftests/nolibc: prepare: create /dev/zero Zhangjin Wu
2023-07-07 15:03 ` [PATCH v6 11/15] selftests/nolibc: add EXPECT_PTREQ, EXPECT_PTRNE and EXPECT_PTRER Zhangjin Wu
2023-07-07 15:04 ` [PATCH v6 12/15] selftests/nolibc: add sbrk_0 to test current brk getting Zhangjin Wu
2023-07-07 15:05 ` [PATCH v6 13/15] selftests/nolibc: add mmap_bad test case Zhangjin Wu
2023-07-09  9:15   ` Willy Tarreau
2023-07-09 18:33     ` Zhangjin Wu
2023-07-10  7:04       ` Willy Tarreau
2023-07-07 15:07 ` [PATCH v6 14/15] selftests/nolibc: add munmap_bad " Zhangjin Wu
2023-07-07 15:08 ` [PATCH v6 15/15] selftests/nolibc: add mmap_munmap_good " Zhangjin Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1688739492.git.falcon@tinylab.org \
    --to=falcon@tinylab.org \
    --cc=arnd@arndb.de \
    --cc=david.laight@aculab.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=thomas@t-8ch.de \
    --cc=w@1wt.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).