From: Haifeng Xu via ltp <ltp@lists.linux.it>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] ht_affinity.c: fix ht_affinity test failure
Date: Sat, 21 Sep 2024 12:17:09 +0800 [thread overview]
Message-ID: <aedad82f-1981-4e6b-bf24-773e79606a1b@shopee.com> (raw)
In-Reply-To: <Zu1pGq6bklSY3SSZ@yuki.lan>
On 2024/9/20 20:22, Cyril Hrubis wrote:
> Hi!
>> From the kernel source code, the user_mask_ptr is unsigned long.
>>
>> SYSCALL_DEFINE3(sched_setaffinity, pid_t, pid, unsigned int, len,
>> unsigned long __user *, user_mask_ptr)
>>
>> so maybe we can keep the type of user_mask_ptr consistent with it.
>
> It's actually accessed as an array. See get_user_cpu_mask() function just
> above this syscall definition and userspace is suppose to pass an array
> big enough for all the flags of CPUs it cares about.
>
> There are also macros in the libc sched.h header that allows you to
> allocate an array big enough for the current machine and manipulate the
> bits, see man CPU_ALLOC.
>
OK. I'll post next version with your suggestions.
Thanks!
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-09-21 4:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-20 8:30 [LTP] [PATCH] ht_affinity.c: fix ht_affinity test failure Haifeng Xu via ltp
2024-09-20 8:58 ` Cyril Hrubis
2024-09-20 10:52 ` Haifeng Xu via ltp
2024-09-20 12:22 ` Cyril Hrubis
2024-09-21 4:17 ` Haifeng Xu via ltp [this message]
2024-09-21 4:38 ` [LTP] [PATCH v2] " Haifeng Xu via ltp
2024-09-23 12:25 ` Cyril Hrubis
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=aedad82f-1981-4e6b-bf24-773e79606a1b@shopee.com \
--to=ltp@lists.linux.it \
--cc=chrubis@suse.cz \
--cc=haifeng.xu@shopee.com \
/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