* [musl] Add PAGESIZE definition for LoongArch
@ 2024-05-06 9:05 lixing
2024-05-06 12:36 ` Rich Felker
0 siblings, 1 reply; 6+ messages in thread
From: lixing @ 2024-05-06 9:05 UTC (permalink / raw)
To: musl
Hi, Rich,
arch/loongarch64/bits/limits.h | 1 +
1 file changed, 1 insertion(+)
create mode 100644 arch/loongarch64/bits/limits.h
diff --git a/arch/loongarch64/bits/limits.h b/arch/loongarch64/bits/limits.h
new file mode 100644
index 00000000..5cd9aad6
--- /dev/null
+++ b/arch/loongarch64/bits/limits.h
@@ -0,0 +1 @@
+#define PAGESIZE 16384
thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [musl] Add PAGESIZE definition for LoongArch
2024-05-06 9:05 [musl] Add PAGESIZE definition for LoongArch lixing
@ 2024-05-06 12:36 ` Rich Felker
2024-05-07 1:30 ` lixing
0 siblings, 1 reply; 6+ messages in thread
From: Rich Felker @ 2024-05-06 12:36 UTC (permalink / raw)
To: lixing; +Cc: musl
On Mon, May 06, 2024 at 05:05:36PM +0800, lixing wrote:
> Hi, Rich,
>
> arch/loongarch64/bits/limits.h | 1 +
> 1 file changed, 1 insertion(+)
> create mode 100644 arch/loongarch64/bits/limits.h
>
> diff --git a/arch/loongarch64/bits/limits.h b/arch/loongarch64/bits/limits.h
> new file mode 100644
> index 00000000..5cd9aad6
> --- /dev/null
> +++ b/arch/loongarch64/bits/limits.h
> @@ -0,0 +1 @@
> +#define PAGESIZE 16384
Can you explain why you want this change? I would be very hesitant to
merge it. Defining PAGESIZE for an arch is a contract that the
application-facing runtime page size (i.e. mmap granularity) can
*never*, now or in the future, be anything other than the value you
define this macro as having.
Rich
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [musl] Add PAGESIZE definition for LoongArch
2024-05-06 12:36 ` Rich Felker
@ 2024-05-07 1:30 ` lixing
2024-05-07 1:39 ` Rich Felker
0 siblings, 1 reply; 6+ messages in thread
From: lixing @ 2024-05-07 1:30 UTC (permalink / raw)
To: Rich Felker; +Cc: musl
在 2024/5/6 下午8:36, Rich Felker 写道:
> On Mon, May 06, 2024 at 05:05:36PM +0800, lixing wrote:
>> Hi, Rich,
>>
>> arch/loongarch64/bits/limits.h | 1 +
>> 1 file changed, 1 insertion(+)
>> create mode 100644 arch/loongarch64/bits/limits.h
>>
>> diff --git a/arch/loongarch64/bits/limits.h b/arch/loongarch64/bits/limits.h
>> new file mode 100644
>> index 00000000..5cd9aad6
>> --- /dev/null
>> +++ b/arch/loongarch64/bits/limits.h
>> @@ -0,0 +1 @@
>> +#define PAGESIZE 16384
> Can you explain why you want this change? I would be very hesitant to
> merge it. Defining PAGESIZE for an arch is a contract that the
> application-facing runtime page size (i.e. mmap granularity) can
> *never*, now or in the future, be anything other than the value you
> define this macro as having.
when I debuging "indent" program error, the caculation of relro_start
and relro_end in function kernel_mapped_dso get wrong value. It seems
the PAGE_SIZE value is 0 and it come from libc.page_size, but the
libc.page_size initialized until __dls3. Is there any other way to make
the PAGE_SIZE correct at the before __dls3 ?
Also, if the xmalloc low and high address aparted by the protect page
in a loop, it seems to trigger SIGSEGV when the loop meet the protect
page. Can this situation happen?
> Rich
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [musl] Add PAGESIZE definition for LoongArch
2024-05-07 1:30 ` lixing
@ 2024-05-07 1:39 ` Rich Felker
2024-05-07 1:45 ` lixing
0 siblings, 1 reply; 6+ messages in thread
From: Rich Felker @ 2024-05-07 1:39 UTC (permalink / raw)
To: lixing; +Cc: musl
On Tue, May 07, 2024 at 09:30:13AM +0800, lixing wrote:
>
> 在 2024/5/6 下午8:36, Rich Felker 写道:
> >On Mon, May 06, 2024 at 05:05:36PM +0800, lixing wrote:
> >>Hi, Rich,
> >>
> >> arch/loongarch64/bits/limits.h | 1 +
> >> 1 file changed, 1 insertion(+)
> >> create mode 100644 arch/loongarch64/bits/limits.h
> >>
> >>diff --git a/arch/loongarch64/bits/limits.h b/arch/loongarch64/bits/limits.h
> >>new file mode 100644
> >>index 00000000..5cd9aad6
> >>--- /dev/null
> >>+++ b/arch/loongarch64/bits/limits.h
> >>@@ -0,0 +1 @@
> >>+#define PAGESIZE 16384
> >Can you explain why you want this change? I would be very hesitant to
> >merge it. Defining PAGESIZE for an arch is a contract that the
> >application-facing runtime page size (i.e. mmap granularity) can
> >*never*, now or in the future, be anything other than the value you
> >define this macro as having.
>
> when I debuging "indent" program error, the caculation of
> relro_start and relro_end in function kernel_mapped_dso get wrong
> value. It seems the PAGE_SIZE value is 0 and it come from
> libc.page_size, but the libc.page_size initialized until __dls3. Is
> there any other way to make the PAGE_SIZE correct at the before
> __dls3 ?
I believe this is a known bug that somehow got skipped over in the
last release cycle. I'll get it fixed. It does not mean you need to
define a constant PAGESIZE.
> Also, if the xmalloc low and high address aparted by the protect
> page in a loop, it seems to trigger SIGSEGV when the loop meet the
> protect page. Can this situation happen?
I don't understand.
Rich
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [musl] Add PAGESIZE definition for LoongArch
2024-05-07 1:39 ` Rich Felker
@ 2024-05-07 1:45 ` lixing
2024-05-07 15:09 ` Rich Felker
0 siblings, 1 reply; 6+ messages in thread
From: lixing @ 2024-05-07 1:45 UTC (permalink / raw)
To: musl
在 2024/5/7 上午9:39, Rich Felker 写道:
> On Tue, May 07, 2024 at 09:30:13AM +0800, lixing wrote:
>> 在 2024/5/6 下午8:36, Rich Felker 写道:
>>> On Mon, May 06, 2024 at 05:05:36PM +0800, lixing wrote:
>>>> Hi, Rich,
>>>>
>>>> arch/loongarch64/bits/limits.h | 1 +
>>>> 1 file changed, 1 insertion(+)
>>>> create mode 100644 arch/loongarch64/bits/limits.h
>>>>
>>>> diff --git a/arch/loongarch64/bits/limits.h b/arch/loongarch64/bits/limits.h
>>>> new file mode 100644
>>>> index 00000000..5cd9aad6
>>>> --- /dev/null
>>>> +++ b/arch/loongarch64/bits/limits.h
>>>> @@ -0,0 +1 @@
>>>> +#define PAGESIZE 16384
>>> Can you explain why you want this change? I would be very hesitant to
>>> merge it. Defining PAGESIZE for an arch is a contract that the
>>> application-facing runtime page size (i.e. mmap granularity) can
>>> *never*, now or in the future, be anything other than the value you
>>> define this macro as having.
>> when I debuging "indent" program error, the caculation of
>> relro_start and relro_end in function kernel_mapped_dso get wrong
>> value. It seems the PAGE_SIZE value is 0 and it come from
>> libc.page_size, but the libc.page_size initialized until __dls3. Is
>> there any other way to make the PAGE_SIZE correct at the before
>> __dls3 ?
> I believe this is a known bug that somehow got skipped over in the
> last release cycle. I'll get it fixed. It does not mean you need to
> define a constant PAGESIZE.
ok,thanks.
>> Also, if the xmalloc low and high address aparted by the protect
>> page in a loop, it seems to trigger SIGSEGV when the loop meet the
>> protect page. Can this situation happen?
> I don't understand.
ok, I will do more test to check this happens or not.
Thanks.
>
> Rich
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [musl] Add PAGESIZE definition for LoongArch
2024-05-07 1:45 ` lixing
@ 2024-05-07 15:09 ` Rich Felker
0 siblings, 0 replies; 6+ messages in thread
From: Rich Felker @ 2024-05-07 15:09 UTC (permalink / raw)
To: lixing; +Cc: musl
On Tue, May 07, 2024 at 09:45:32AM +0800, lixing wrote:
>
> 在 2024/5/7 上午9:39, Rich Felker 写道:
> >On Tue, May 07, 2024 at 09:30:13AM +0800, lixing wrote:
> >>在 2024/5/6 下午8:36, Rich Felker 写道:
> >>>On Mon, May 06, 2024 at 05:05:36PM +0800, lixing wrote:
> >>>>Hi, Rich,
> >>>>
> >>>> arch/loongarch64/bits/limits.h | 1 +
> >>>> 1 file changed, 1 insertion(+)
> >>>> create mode 100644 arch/loongarch64/bits/limits.h
> >>>>
> >>>>diff --git a/arch/loongarch64/bits/limits.h b/arch/loongarch64/bits/limits.h
> >>>>new file mode 100644
> >>>>index 00000000..5cd9aad6
> >>>>--- /dev/null
> >>>>+++ b/arch/loongarch64/bits/limits.h
> >>>>@@ -0,0 +1 @@
> >>>>+#define PAGESIZE 16384
> >>>Can you explain why you want this change? I would be very hesitant to
> >>>merge it. Defining PAGESIZE for an arch is a contract that the
> >>>application-facing runtime page size (i.e. mmap granularity) can
> >>>*never*, now or in the future, be anything other than the value you
> >>>define this macro as having.
> >>when I debuging "indent" program error, the caculation of
> >>relro_start and relro_end in function kernel_mapped_dso get wrong
> >>value. It seems the PAGE_SIZE value is 0 and it come from
> >>libc.page_size, but the libc.page_size initialized until __dls3. Is
> >>there any other way to make the PAGE_SIZE correct at the before
> >>__dls3 ?
> >I believe this is a known bug that somehow got skipped over in the
> >last release cycle. I'll get it fixed. It does not mean you need to
> >define a constant PAGESIZE.
> ok,thanks.
> >>Also, if the xmalloc low and high address aparted by the protect
> >>page in a loop, it seems to trigger SIGSEGV when the loop meet the
> >>protect page. Can this situation happen?
> >I don't understand.
>
> ok, I will do more test to check this happens or not.
>
> Thanks.
OK, the bug was supposedly already fixed by commit
f47a8cdd250d9163fcfb39bf4e9d813957c0b187, but that commit didn't
actually do anything because of inclusion order issues. A fix for the
fix is now available in commit
6f666231bf51703fadbef10460d462fb573548a1.
Rich
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-05-07 15:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-06 9:05 [musl] Add PAGESIZE definition for LoongArch lixing
2024-05-06 12:36 ` Rich Felker
2024-05-07 1:30 ` lixing
2024-05-07 1:39 ` Rich Felker
2024-05-07 1:45 ` lixing
2024-05-07 15:09 ` Rich Felker
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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).