linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jordan Richards <jordanrichards@google.com>
To: linux@weissschuh.net
Cc: dmatlack@google.com, jasonmiu@google.com,
	jordanrichards@google.com,  linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org,  linux-mm@kvack.org,
	pasha.tatashin@soleen.com, pratyush@kernel.org,  rppt@kernel.org,
	shuah@kernel.org, w@1wt.eu
Subject: Re: [PATCH v2 1/2] tools/nolibc: add ftruncate()
Date: Mon,  2 Mar 2026 22:20:43 +0000	[thread overview]
Message-ID: <20260302222043.2432413-1-jordanrichards@google.com> (raw)
In-Reply-To: <ebf0c9fd-9c45-4aa2-8cd7-fe8d5956ce52@t-8ch.de>

Hi Thomas,

> (please Cc nolibc maintainers on nolibc changes, I only saw this by
> chance)

Will do, sorry about that.

> off_t is now always 64bit on nolibc. On 32-bit architectures however
> __NR_ftruncate only takes a 32bit value, leading to the wrong kind of
> truncation. Use __NR_ftruncate64 instead where available.

Good call. On some archs (arm, mips, ppc) register pairs need to start
in an even register. I assume adding a flag like:

  #define ARCH_ALIGN_REGISTER_PAIR 1

in "nolibc/arch-xxx.h" is appropriate?

> Please also add a simple test to
> tools/testing/selftests/nolibc/nolibc-test.c

Will include in the next version.

Thanks for the review,
Jordan


  reply	other threads:[~2026-03-02 22:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05 22:23 [PATCH v2 0/2] selftests/liveupdate: add end to end test infrastructure and scripts Jordan Richards
2026-02-05 22:23 ` [PATCH v2 1/2] tools/nolibc: add ftruncate() Jordan Richards
2026-02-06 21:55   ` Thomas Weißschuh
2026-03-02 22:20     ` Jordan Richards [this message]
2026-03-02 22:30       ` Thomas Weißschuh
2026-02-05 22:23 ` [PATCH v2 2/2] selftests/liveupdate: add end to end test infrastructure and scripts Jordan Richards
2026-02-06 22:06   ` Thomas Weißschuh
2026-02-09 20:56     ` Jordan Richards
2026-02-08 18:27   ` Mike Rapoport
2026-02-10 14:18     ` Pratyush Yadav

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=20260302222043.2432413-1-jordanrichards@google.com \
    --to=jordanrichards@google.com \
    --cc=dmatlack@google.com \
    --cc=jasonmiu@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@weissschuh.net \
    --cc=pasha.tatashin@soleen.com \
    --cc=pratyush@kernel.org \
    --cc=rppt@kernel.org \
    --cc=shuah@kernel.org \
    --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