* Re: [PATCH v2 0/4] Remove get_kernel_pages()
[not found] < <CAHk-=wh3+moi98rbiMnwnxPNZcYBaVY57TM2EP6NgXgNwFeP7Q@mail.gmail.com>
@ 2023-02-14 8:53 ` Jens Wiklander
0 siblings, 0 replies; 9+ messages in thread
From: Jens Wiklander @ 2023-02-14 8:53 UTC (permalink / raw)
To: op-tee
[-- Attachment #1: Type: text/plain, Size: 511 bytes --]
On Mon, Feb 13, 2023 at 11:02:52AM -0800, Linus Torvalds wrote:
> On Mon, Feb 13, 2023 at 7:02 AM Jens Wiklander
> <jens.wiklander@linaro.org> wrote:
> >
> > Sure, I'll take it. The timing is a bit unfortunate, it's likely too
> > close to the merge window to be included there. However, I'll pick it
> > up and add it to linux-next so it's ready for the 6.4 merge window.
>
> With this boeing almost all code removal, I'm perfectly fine taking it
> in the upcoming merge window.
OK, thank you.
Cheers,
Jens
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: < <CAHUa44GAM=meibiSDjjWb0wKmHzud6JddE3W=zG3XCFfgP+Sag@mail.gmail.com>]
* Re: [PATCH v2 0/4] Remove get_kernel_pages()
[not found] < <CAHUa44GAM=meibiSDjjWb0wKmHzud6JddE3W=zG3XCFfgP+Sag@mail.gmail.com>
@ 2023-02-13 18:53 ` Ira Weiny
2023-02-13 19:03 ` Linus Torvalds
1 sibling, 0 replies; 9+ messages in thread
From: Ira Weiny @ 2023-02-13 18:53 UTC (permalink / raw)
To: op-tee
[-- Attachment #1: Type: text/plain, Size: 1465 bytes --]
Jens Wiklander wrote:
> Hi Ira,
>
> On Fri, Feb 10, 2023 at 9:28 PM Ira Weiny <ira.weiny@intel.com> wrote:
> >
> > Ira Weiny wrote:
> > > Sumit Garg wrote:
> > > > On Sat, 4 Feb 2023 at 09:36, Ira Weiny <ira.weiny@intel.com> wrote:
> > > > >
> > > > > Sumit,
> > > > >
> > > > > I did not see a follow up on this series per your last email.[1] I'd like to
> > > > > move forward with getting rid of kmap_to_page(). So Hopefully this can land
> > > > > and you can build on this rather than the other way around?
> > > >
> > > > Apologies Ira for keeping you waiting. Actually I was fully involved
> > > > with other high priority work with my upstream review backlog
> > > > increasing. So I wasn't able to devote time to this work. Sure I will
> > > > rebase my work on top of your changes.
> > >
> > > No problem on my end. I just wanted to ensure that I did not miss
> > > something.
> >
> > Andrew, can I get an ack on patches 1 and 4 for this series? I realized
> > that perhaps I was not clear on my expectations of this series. I was
> > thinking this would be easiest to go through the tee subsystem tree.
> >
> > Sumit or Jens, is that ok with you all?
>
> Sure, I'll take it. The timing is a bit unfortunate, it's likely too
> close to the merge window to be included there. However, I'll pick it
> up and add it to linux-next so it's ready for the 6.4 merge window.
6.4 is fine with me.
Thanks everyone!
Ira
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH v2 0/4] Remove get_kernel_pages()
[not found] < <CAHUa44GAM=meibiSDjjWb0wKmHzud6JddE3W=zG3XCFfgP+Sag@mail.gmail.com>
2023-02-13 18:53 ` Ira Weiny
@ 2023-02-13 19:03 ` Linus Torvalds
1 sibling, 0 replies; 9+ messages in thread
From: Linus Torvalds @ 2023-02-13 19:03 UTC (permalink / raw)
To: op-tee
[-- Attachment #1: Type: text/plain, Size: 417 bytes --]
On Mon, Feb 13, 2023 at 7:02 AM Jens Wiklander
<jens.wiklander@linaro.org> wrote:
>
> Sure, I'll take it. The timing is a bit unfortunate, it's likely too
> close to the merge window to be included there. However, I'll pick it
> up and add it to linux-next so it's ready for the 6.4 merge window.
With this boeing almost all code removal, I'm perfectly fine taking it
in the upcoming merge window.
Linus
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: < <CAFA6WYM5tzs3T1tDgspA=R=VxfWrknm2YPHMCZihx405pF-ftA@mail.gmail.com>]
* Re: [PATCH v2 0/4] Remove get_kernel_pages()
[not found] < <CAFA6WYM5tzs3T1tDgspA=R=VxfWrknm2YPHMCZihx405pF-ftA@mail.gmail.com>
@ 2023-02-07 16:19 ` Ira Weiny
2023-02-10 20:27 ` Ira Weiny
0 siblings, 1 reply; 9+ messages in thread
From: Ira Weiny @ 2023-02-07 16:19 UTC (permalink / raw)
To: op-tee
[-- Attachment #1: Type: text/plain, Size: 3190 bytes --]
Sumit Garg wrote:
> On Sat, 4 Feb 2023 at 09:36, Ira Weiny <ira.weiny@intel.com> wrote:
> >
> > Sumit,
> >
> > I did not see a follow up on this series per your last email.[1] I'd like to
> > move forward with getting rid of kmap_to_page(). So Hopefully this can land
> > and you can build on this rather than the other way around?
>
> Apologies Ira for keeping you waiting. Actually I was fully involved
> with other high priority work with my upstream review backlog
> increasing. So I wasn't able to devote time to this work. Sure I will
> rebase my work on top of your changes.
No problem on my end. I just wanted to ensure that I did not miss
something.
Thanks for the reviews!
Ira
>
> -Sumit
>
> >
> > All,
> >
> > Al Viro found[2] that kmap_to_page() is broken. But not only is it broken, it
> > presents confusion over how highmem should be used because kmap() and friends
> > should not be used for 'long term' mappings.
> >
> > get_kernel_pages() is a caller of kmap_to_page(). It only has one caller
> > [shm_get_kernel_pages()] which does not need the functionality.
> >
> > Alter shm_get_kernel_pages() to no longer call get_kernel_pages() and remove
> > get_kernel_pages(). Along the way it was noted that shm_get_kernel_pages()
> > does not have any need to support vmalloc'ed addresses either. Remove that
> > functionality to clean up the logic.
> >
> > This series also fixes is_kmap_addr() and uses it to ensure no kmap addresses
> > slip in later.
> >
> > [1] https://lore.kernel.org/all/CAFA6WYMqEVDVW-ifoh-V9ni1zntYdes8adQKf2XXAUpqdaW53w(a)mail.gmail.com/
> > [2] https://lore.kernel.org/lkml/YzSSl1ItVlARDvG3(a)ZenIV
> >
> > To: Sumit Garg <sumit.garg@linaro.org>
> > To: Andrew Morton <akpm@linux-foundation.org>
> > Cc: "Al Viro" <viro@zeniv.linux.org.uk>
> > Cc: "Christoph Hellwig" <hch@lst.de>
> > Cc: linux-kernel(a)vger.kernel.org
> > Cc: op-tee(a)lists.trustedfirmware.org
> > Cc: linux-mm(a)kvack.org
> > Cc: Jens Wiklander <jens.wiklander@linaro.org>
> > Cc: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
> > Signed-off-by: Ira Weiny <ira.weiny@intel.com>
> >
> > ---
> > Changes in v2:
> > - Al Viro: Avoid allocating the kiov.
> > - Sumit: Update cover letter to clarify the motivation behind removing
> > get_kernel_pages()
> > - Link to v1: https://lore.kernel.org/r/20221002002326.946620-1-ira.weiny(a)intel.com
> >
> > ---
> > Ira Weiny (4):
> > highmem: Enhance is_kmap_addr() to check kmap_local_page() mappings
> > tee: Remove vmalloc page support
> > tee: Remove call to get_kernel_pages()
> > mm: Remove get_kernel_pages()
> >
> > drivers/tee/tee_shm.c | 37 ++++++++++---------------------------
> > include/linux/highmem-internal.h | 5 ++++-
> > include/linux/mm.h | 2 --
> > mm/swap.c | 30 ------------------------------
> > 4 files changed, 14 insertions(+), 60 deletions(-)
> > ---
> > base-commit: 0136d86b78522bbd5755f8194c97a987f0586ba5
> > change-id: 20230203-get_kernel_pages-199342cfba79
> >
> > Best regards,
> > --
> > Ira Weiny <ira.weiny@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH v2 0/4] Remove get_kernel_pages()
2023-02-07 16:19 ` Ira Weiny
@ 2023-02-10 20:27 ` Ira Weiny
2023-02-13 15:02 ` Jens Wiklander
0 siblings, 1 reply; 9+ messages in thread
From: Ira Weiny @ 2023-02-10 20:27 UTC (permalink / raw)
To: op-tee
[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]
Ira Weiny wrote:
> Sumit Garg wrote:
> > On Sat, 4 Feb 2023 at 09:36, Ira Weiny <ira.weiny@intel.com> wrote:
> > >
> > > Sumit,
> > >
> > > I did not see a follow up on this series per your last email.[1] I'd like to
> > > move forward with getting rid of kmap_to_page(). So Hopefully this can land
> > > and you can build on this rather than the other way around?
> >
> > Apologies Ira for keeping you waiting. Actually I was fully involved
> > with other high priority work with my upstream review backlog
> > increasing. So I wasn't able to devote time to this work. Sure I will
> > rebase my work on top of your changes.
>
> No problem on my end. I just wanted to ensure that I did not miss
> something.
Andrew, can I get an ack on patches 1 and 4 for this series? I realized
that perhaps I was not clear on my expectations of this series. I was
thinking this would be easiest to go through the tee subsystem tree.
Sumit or Jens, is that ok with you all?
Thanks,
Ira
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 0/4] Remove get_kernel_pages()
2023-02-10 20:27 ` Ira Weiny
@ 2023-02-13 15:02 ` Jens Wiklander
0 siblings, 0 replies; 9+ messages in thread
From: Jens Wiklander @ 2023-02-13 15:02 UTC (permalink / raw)
To: op-tee
[-- Attachment #1: Type: text/plain, Size: 1348 bytes --]
Hi Ira,
On Fri, Feb 10, 2023 at 9:28 PM Ira Weiny <ira.weiny@intel.com> wrote:
>
> Ira Weiny wrote:
> > Sumit Garg wrote:
> > > On Sat, 4 Feb 2023 at 09:36, Ira Weiny <ira.weiny@intel.com> wrote:
> > > >
> > > > Sumit,
> > > >
> > > > I did not see a follow up on this series per your last email.[1] I'd like to
> > > > move forward with getting rid of kmap_to_page(). So Hopefully this can land
> > > > and you can build on this rather than the other way around?
> > >
> > > Apologies Ira for keeping you waiting. Actually I was fully involved
> > > with other high priority work with my upstream review backlog
> > > increasing. So I wasn't able to devote time to this work. Sure I will
> > > rebase my work on top of your changes.
> >
> > No problem on my end. I just wanted to ensure that I did not miss
> > something.
>
> Andrew, can I get an ack on patches 1 and 4 for this series? I realized
> that perhaps I was not clear on my expectations of this series. I was
> thinking this would be easiest to go through the tee subsystem tree.
>
> Sumit or Jens, is that ok with you all?
Sure, I'll take it. The timing is a bit unfortunate, it's likely too
close to the merge window to be included there. However, I'll pick it
up and add it to linux-next so it's ready for the 6.4 merge window.
Thanks,
Jens
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 0/4] Remove get_kernel_pages()
@ 2023-02-04 4:06 Ira Weiny
2023-02-04 19:51 ` Linus Torvalds
2023-02-06 6:22 ` Sumit Garg
0 siblings, 2 replies; 9+ messages in thread
From: Ira Weiny @ 2023-02-04 4:06 UTC (permalink / raw)
To: op-tee
[-- Attachment #1: Type: text/plain, Size: 2462 bytes --]
Sumit,
I did not see a follow up on this series per your last email.[1] I'd like to
move forward with getting rid of kmap_to_page(). So Hopefully this can land
and you can build on this rather than the other way around?
All,
Al Viro found[2] that kmap_to_page() is broken. But not only is it broken, it
presents confusion over how highmem should be used because kmap() and friends
should not be used for 'long term' mappings.
get_kernel_pages() is a caller of kmap_to_page(). It only has one caller
[shm_get_kernel_pages()] which does not need the functionality.
Alter shm_get_kernel_pages() to no longer call get_kernel_pages() and remove
get_kernel_pages(). Along the way it was noted that shm_get_kernel_pages()
does not have any need to support vmalloc'ed addresses either. Remove that
functionality to clean up the logic.
This series also fixes is_kmap_addr() and uses it to ensure no kmap addresses
slip in later.
[1] https://lore.kernel.org/all/CAFA6WYMqEVDVW-ifoh-V9ni1zntYdes8adQKf2XXAUpqdaW53w(a)mail.gmail.com/
[2] https://lore.kernel.org/lkml/YzSSl1ItVlARDvG3(a)ZenIV
To: Sumit Garg <sumit.garg@linaro.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Al Viro" <viro@zeniv.linux.org.uk>
Cc: "Christoph Hellwig" <hch@lst.de>
Cc: linux-kernel(a)vger.kernel.org
Cc: op-tee(a)lists.trustedfirmware.org
Cc: linux-mm(a)kvack.org
Cc: Jens Wiklander <jens.wiklander@linaro.org>
Cc: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
---
Changes in v2:
- Al Viro: Avoid allocating the kiov.
- Sumit: Update cover letter to clarify the motivation behind removing
get_kernel_pages()
- Link to v1: https://lore.kernel.org/r/20221002002326.946620-1-ira.weiny(a)intel.com
---
Ira Weiny (4):
highmem: Enhance is_kmap_addr() to check kmap_local_page() mappings
tee: Remove vmalloc page support
tee: Remove call to get_kernel_pages()
mm: Remove get_kernel_pages()
drivers/tee/tee_shm.c | 37 ++++++++++---------------------------
include/linux/highmem-internal.h | 5 ++++-
include/linux/mm.h | 2 --
mm/swap.c | 30 ------------------------------
4 files changed, 14 insertions(+), 60 deletions(-)
---
base-commit: 0136d86b78522bbd5755f8194c97a987f0586ba5
change-id: 20230203-get_kernel_pages-199342cfba79
Best regards,
--
Ira Weiny <ira.weiny@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH v2 0/4] Remove get_kernel_pages()
2023-02-04 4:06 Ira Weiny
@ 2023-02-04 19:51 ` Linus Torvalds
2023-02-06 6:22 ` Sumit Garg
1 sibling, 0 replies; 9+ messages in thread
From: Linus Torvalds @ 2023-02-04 19:51 UTC (permalink / raw)
To: op-tee
[-- Attachment #1: Type: text/plain, Size: 807 bytes --]
On Fri, Feb 3, 2023 at 8:06 PM Ira Weiny <ira.weiny@intel.com> wrote:
>
> This series also fixes is_kmap_addr() and uses it to ensure no kmap addresses
> slip in later.
Ack. Please make it so.
That said...
I wasn't cc'd on all the patches, but checked them on the mailing
list, and that first is_kmap_addr() patch makes me a bit unhappy.
Right now that 'is_kmap_addr()' is only used for user copy addresses,
for debugging purposes, and I'm not exactly thrilled about extending
it this way.
I get the feeling that we should just have a name for that "kmap _or_
kmap_local" range instead of making it two ranges.
But admittedly I can't come up with anything better, and it looks like
different architectures may do different things. I just don't like
it.
Linus
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH v2 0/4] Remove get_kernel_pages()
2023-02-04 4:06 Ira Weiny
2023-02-04 19:51 ` Linus Torvalds
@ 2023-02-06 6:22 ` Sumit Garg
1 sibling, 0 replies; 9+ messages in thread
From: Sumit Garg @ 2023-02-06 6:22 UTC (permalink / raw)
To: op-tee
[-- Attachment #1: Type: text/plain, Size: 2905 bytes --]
On Sat, 4 Feb 2023 at 09:36, Ira Weiny <ira.weiny@intel.com> wrote:
>
> Sumit,
>
> I did not see a follow up on this series per your last email.[1] I'd like to
> move forward with getting rid of kmap_to_page(). So Hopefully this can land
> and you can build on this rather than the other way around?
Apologies Ira for keeping you waiting. Actually I was fully involved
with other high priority work with my upstream review backlog
increasing. So I wasn't able to devote time to this work. Sure I will
rebase my work on top of your changes.
-Sumit
>
> All,
>
> Al Viro found[2] that kmap_to_page() is broken. But not only is it broken, it
> presents confusion over how highmem should be used because kmap() and friends
> should not be used for 'long term' mappings.
>
> get_kernel_pages() is a caller of kmap_to_page(). It only has one caller
> [shm_get_kernel_pages()] which does not need the functionality.
>
> Alter shm_get_kernel_pages() to no longer call get_kernel_pages() and remove
> get_kernel_pages(). Along the way it was noted that shm_get_kernel_pages()
> does not have any need to support vmalloc'ed addresses either. Remove that
> functionality to clean up the logic.
>
> This series also fixes is_kmap_addr() and uses it to ensure no kmap addresses
> slip in later.
>
> [1] https://lore.kernel.org/all/CAFA6WYMqEVDVW-ifoh-V9ni1zntYdes8adQKf2XXAUpqdaW53w(a)mail.gmail.com/
> [2] https://lore.kernel.org/lkml/YzSSl1ItVlARDvG3(a)ZenIV
>
> To: Sumit Garg <sumit.garg@linaro.org>
> To: Andrew Morton <akpm@linux-foundation.org>
> Cc: "Al Viro" <viro@zeniv.linux.org.uk>
> Cc: "Christoph Hellwig" <hch@lst.de>
> Cc: linux-kernel(a)vger.kernel.org
> Cc: op-tee(a)lists.trustedfirmware.org
> Cc: linux-mm(a)kvack.org
> Cc: Jens Wiklander <jens.wiklander@linaro.org>
> Cc: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
> Signed-off-by: Ira Weiny <ira.weiny@intel.com>
>
> ---
> Changes in v2:
> - Al Viro: Avoid allocating the kiov.
> - Sumit: Update cover letter to clarify the motivation behind removing
> get_kernel_pages()
> - Link to v1: https://lore.kernel.org/r/20221002002326.946620-1-ira.weiny(a)intel.com
>
> ---
> Ira Weiny (4):
> highmem: Enhance is_kmap_addr() to check kmap_local_page() mappings
> tee: Remove vmalloc page support
> tee: Remove call to get_kernel_pages()
> mm: Remove get_kernel_pages()
>
> drivers/tee/tee_shm.c | 37 ++++++++++---------------------------
> include/linux/highmem-internal.h | 5 ++++-
> include/linux/mm.h | 2 --
> mm/swap.c | 30 ------------------------------
> 4 files changed, 14 insertions(+), 60 deletions(-)
> ---
> base-commit: 0136d86b78522bbd5755f8194c97a987f0586ba5
> change-id: 20230203-get_kernel_pages-199342cfba79
>
> Best regards,
> --
> Ira Weiny <ira.weiny@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-02-14 8:53 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] < <CAHk-=wh3+moi98rbiMnwnxPNZcYBaVY57TM2EP6NgXgNwFeP7Q@mail.gmail.com>
2023-02-14 8:53 ` [PATCH v2 0/4] Remove get_kernel_pages() Jens Wiklander
[not found] < <CAHUa44GAM=meibiSDjjWb0wKmHzud6JddE3W=zG3XCFfgP+Sag@mail.gmail.com>
2023-02-13 18:53 ` Ira Weiny
2023-02-13 19:03 ` Linus Torvalds
[not found] < <CAFA6WYM5tzs3T1tDgspA=R=VxfWrknm2YPHMCZihx405pF-ftA@mail.gmail.com>
2023-02-07 16:19 ` Ira Weiny
2023-02-10 20:27 ` Ira Weiny
2023-02-13 15:02 ` Jens Wiklander
2023-02-04 4:06 Ira Weiny
2023-02-04 19:51 ` Linus Torvalds
2023-02-06 6:22 ` Sumit Garg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox