From: Martin KaFai Lau <martin.lau@linux.dev>
To: Shakeel Butt <shakeel.butt@linux.dev>
Cc: bpf@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Kui-Feng Lee <thinker.li@gmail.com>,
kernel-team@meta.com, linux-mm@kvack.org
Subject: Re: [PATCH v5 bpf-next 06/12] bpf: Add uptr support in the map_value of the task local storage.
Date: Wed, 23 Oct 2024 17:44:48 -0700 [thread overview]
Message-ID: <cdd04472-7e8d-4609-986b-bbea82fd77ca@linux.dev> (raw)
In-Reply-To: <2ngvjjbgow7bhsr5bpcyosxrzkbaux6mrvtvh2ru6wrzujtoki@7vpyhef5vux5>
On 10/22/24 5:57 PM, Shakeel Butt wrote:
> On Tue, Oct 22, 2024 at 04:07:50PM GMT, Shakeel Butt wrote:
>> On Mon, Oct 14, 2024 at 05:49:56PM GMT, Martin KaFai Lau wrote:
>>> From: Martin KaFai Lau <martin.lau@kernel.org>
> [...]
>>> +
>>> + err = pin_user_pages_fast(start, 1, FOLL_LONGTERM | FOLL_WRITE, &page);
>>> + if (err != 1)
>>> + goto unpin_all;
>>> +
>>> + *uptr_addr = page_address(page) + offset_in_page(start);
>>
>> Please use kmap(page) instead of page_address(page) and then you will
>> need to kunmap(kptr) on the unpin side.
>>
>
> This is needed only if you plan to support your feature for HIGHMEM
> kernels though. Otherwise you can error out for PageHighMem(page).
I just posted v6 with the PageHighMem(page). Thanks for the review.
prev parent reply other threads:[~2024-10-24 0:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20241015005008.767267-1-martin.lau@linux.dev>
2024-10-15 0:49 ` [PATCH v5 bpf-next 06/12] bpf: Add uptr support in the map_value of the task local storage Martin KaFai Lau
2024-10-22 23:07 ` Shakeel Butt
2024-10-23 0:57 ` Shakeel Butt
2024-10-24 0:44 ` Martin KaFai Lau [this message]
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=cdd04472-7e8d-4609-986b-bbea82fd77ca@linux.dev \
--to=martin.lau@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@meta.com \
--cc=linux-mm@kvack.org \
--cc=shakeel.butt@linux.dev \
--cc=thinker.li@gmail.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;
as well as URLs for NNTP newsgroup(s).