mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [GIT PULL] random number generator updates for 6.11-rc1
@ 2024-07-14 20:00 Jason A. Donenfeld
  2024-07-19 18:27 ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Jason A. Donenfeld @ 2024-07-14 20:00 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

Hi Linus,

Here's the vDSO getrandom() work we've been discussing for the last few weeks.
Thank you very much for your input on this and for working with me to get this
where it is. I'm happy with the set of compromises, and I think this wound up
in a decent place. A blurb for the merge message:

This is a short series adding getrandom() support to the vDSO. First, it adds a
new kind of mapping to mmap(2), MAP_DROPPABLE, which lets the kernel zero out
pages anytime under memory pressure, which enables allocating memory that never
gets swapped to disk but also doesn't count as being mlocked. Then, the vDSO
implementation of getrandom() is introduced in a generic manner and hooked into
random.c. Next, this is implemented on x86. (Also, though it's not ready for
this pull, somebody has begun an arm64 implementation already.) Finally, two
vDSO selftests are added.

Each version of this series has been in linux-next for a little bit, and there
are no major reported issues, though there may be a trivial merge conflict.

Please pull, and thanks again for your input on this.

Thanks,
Jason

The following changes since commit 8a18fda0febb7790de20ec1c3b4522ce026be1c6:

  Merge tag 'spi-fix-v6.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi (2024-07-11 12:07:50 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git tags/random-6.11-rc1-for-linus

for you to fetch changes up to 41c32169260827f81a55f5c832c4b334ad4c3586:

  selftests/vDSO: add tests for vgetrandom (2024-07-12 03:31:01 +0200)

----------------------------------------------------------------
Random number generator updates for Linux 6.11-rc1.
----------------------------------------------------------------

Jason A. Donenfeld (4):
      mm: add MAP_DROPPABLE for designating always lazily freeable mappings
      random: introduce generic vDSO getrandom() implementation
      x86: vdso: Wire up getrandom() vDSO implementation
      selftests/vDSO: add tests for vgetrandom

 MAINTAINERS                                        |   4 +
 arch/x86/Kconfig                                   |   1 +
 arch/x86/entry/vdso/Makefile                       |   3 +-
 arch/x86/entry/vdso/vdso.lds.S                     |   2 +
 arch/x86/entry/vdso/vgetrandom-chacha.S            | 178 +++++++++++++
 arch/x86/entry/vdso/vgetrandom.c                   |  17 ++
 arch/x86/include/asm/vdso/getrandom.h              |  55 ++++
 arch/x86/include/asm/vdso/vsyscall.h               |   2 +
 arch/x86/include/asm/vvar.h                        |  16 ++
 drivers/char/random.c                              |  18 +-
 fs/proc/task_mmu.c                                 |   1 +
 include/linux/mm.h                                 |   7 +
 include/linux/userfaultfd_k.h                      |   3 +
 include/trace/events/mmflags.h                     |   7 +
 include/uapi/linux/mman.h                          |   1 +
 include/uapi/linux/random.h                        |  15 ++
 include/vdso/datapage.h                            |  11 +
 include/vdso/getrandom.h                           |  46 ++++
 lib/vdso/Kconfig                                   |   5 +
 lib/vdso/getrandom.c                               | 251 ++++++++++++++++++
 mm/ksm.c                                           |   2 +-
 mm/madvise.c                                       |   5 +-
 mm/memory.c                                        |   4 +
 mm/mempolicy.c                                     |   3 +
 mm/mlock.c                                         |   2 +-
 mm/mmap.c                                          |  30 +++
 mm/rmap.c                                          |  22 +-
 mm/vmscan.c                                        |   9 -
 tools/include/asm/rwonce.h                         |   0
 tools/include/uapi/linux/mman.h                    |   1 +
 tools/testing/selftests/mm/.gitignore              |   1 +
 tools/testing/selftests/mm/Makefile                |   1 +
 tools/testing/selftests/mm/droppable.c             |  53 ++++
 tools/testing/selftests/vDSO/.gitignore            |   2 +
 tools/testing/selftests/vDSO/Makefile              |  18 ++
 tools/testing/selftests/vDSO/vdso_test_chacha.c    |  43 +++
 tools/testing/selftests/vDSO/vdso_test_getrandom.c | 288 +++++++++++++++++++++
 37 files changed, 1110 insertions(+), 17 deletions(-)
 create mode 100644 arch/x86/entry/vdso/vgetrandom-chacha.S
 create mode 100644 arch/x86/entry/vdso/vgetrandom.c
 create mode 100644 arch/x86/include/asm/vdso/getrandom.h
 create mode 100644 include/vdso/getrandom.h
 create mode 100644 lib/vdso/getrandom.c
 create mode 100644 tools/include/asm/rwonce.h
 create mode 100644 tools/testing/selftests/mm/droppable.c
 create mode 100644 tools/testing/selftests/vDSO/vdso_test_chacha.c
 create mode 100644 tools/testing/selftests/vDSO/vdso_test_getrandom.c

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] random number generator updates for 6.11-rc1
  2024-07-14 20:00 [GIT PULL] random number generator updates for 6.11-rc1 Jason A. Donenfeld
@ 2024-07-19 18:27 ` Jason A. Donenfeld
  2024-07-19 18:33   ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Jason A. Donenfeld @ 2024-07-19 18:27 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

Hi Linus,

On Sun, Jul 14, 2024 at 10:00:50PM +0200, Jason A. Donenfeld wrote:
> The following changes since commit

Some fixes accumulated since I initially sent this. I assume you're
waiting for akpm's series before merging this, which would make sense.
But rather than send two pulls, I figured I'd just retract this one,
move the tag, and send you another (which I'll do immediately as a reply
to this email). I actually debated for a solid day on whether that was
best or if sending you another pull next week was best, and figured this
would result in the least churn, but if you prefer things to be done
differently in the future, it doesn't make a difference to me. (And
because of the "fetch changes up to ..." line, I can't just silently
move the tag, not that this would be a good thing anyway.)

Jason

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [GIT PULL] random number generator updates for 6.11-rc1
  2024-07-19 18:27 ` Jason A. Donenfeld
@ 2024-07-19 18:33   ` Jason A. Donenfeld
  2024-07-24 17:50     ` pr-tracker-bot
  0 siblings, 1 reply; 4+ messages in thread
From: Jason A. Donenfeld @ 2024-07-19 18:33 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

Hi Linus,

Here's the vDSO getrandom() work we've been discussing for the last few weeks.
Thank you very much for your input on this and for working with me to get this
where it is. I'm happy with the set of compromises, and I think this wound up
in a decent place. A blurb for the merge message:

This is a short pull adding getrandom() support to the vDSO. First, it adds a
new kind of mapping to mmap(2), MAP_DROPPABLE, which lets the kernel zero out
pages anytime under memory pressure, which enables allocating memory that never
gets swapped to disk but also doesn't count as being mlocked. Then, the vDSO
implementation of getrandom() is introduced in a generic manner and hooked into
random.c. Next, this is implemented on x86. (Also, though it's not ready for
this pull, somebody has begun an arm64 implementation already.) Finally, two
vDSO selftests are added.

There are also two housekeeping cleanup commits.

Each version of this series has been in linux-next for a little bit, and there
are no major reported issues, though there is a easy merge conflict in
mm/rmap.c and a trivial one in tools/testing/selftests/mm/Makefile, both of
which have resolutions in linux-next.

Please pull, and thanks again for your input on this.

Thanks,
Jason

The following changes since commit 8a18fda0febb7790de20ec1c3b4522ce026be1c6:

  Merge tag 'spi-fix-v6.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi (2024-07-11 12:07:50 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git tags/random-6.11-rc1-for-linus

for you to fetch changes up to ad8070cb1b4bd40aa19a5e3f7c24d7f62c71b382:

  MAINTAINERS: add random.h headers to RNG subsection (2024-07-19 20:23:12 +0200)

----------------------------------------------------------------
Random number generator updates for Linux 6.11-rc1.
----------------------------------------------------------------

Jason A. Donenfeld (6):
      mm: add MAP_DROPPABLE for designating always lazily freeable mappings
      random: introduce generic vDSO getrandom() implementation
      x86: vdso: Wire up getrandom() vDSO implementation
      selftests/vDSO: add tests for vgetrandom
      random: note that RNDGETPOOL was removed in 2.6.9-rc2
      MAINTAINERS: add random.h headers to RNG subsection

 MAINTAINERS                                        |   6 +
 arch/x86/Kconfig                                   |   1 +
 arch/x86/entry/vdso/Makefile                       |   3 +-
 arch/x86/entry/vdso/vdso.lds.S                     |   2 +
 arch/x86/entry/vdso/vgetrandom-chacha.S            | 178 +++++++++++++
 arch/x86/entry/vdso/vgetrandom.c                   |  17 ++
 arch/x86/include/asm/vdso/getrandom.h              |  55 ++++
 arch/x86/include/asm/vdso/vsyscall.h               |   2 +
 arch/x86/include/asm/vvar.h                        |  16 ++
 drivers/char/random.c                              |  18 +-
 fs/proc/task_mmu.c                                 |   1 +
 include/linux/mm.h                                 |   7 +
 include/linux/userfaultfd_k.h                      |   3 +
 include/trace/events/mmflags.h                     |   7 +
 include/uapi/linux/mman.h                          |   1 +
 include/uapi/linux/random.h                        |  17 +-
 include/vdso/datapage.h                            |  11 +
 include/vdso/getrandom.h                           |  46 ++++
 lib/vdso/Kconfig                                   |   5 +
 lib/vdso/getrandom.c                               | 251 ++++++++++++++++++
 mm/ksm.c                                           |   2 +-
 mm/madvise.c                                       |   5 +-
 mm/memory.c                                        |  13 +
 mm/mempolicy.c                                     |   3 +
 mm/mlock.c                                         |   2 +-
 mm/mmap.c                                          |  30 +++
 mm/rmap.c                                          |  22 +-
 mm/vmscan.c                                        |   9 -
 tools/include/asm/rwonce.h                         |   0
 tools/include/uapi/linux/mman.h                    |   1 +
 tools/testing/selftests/mm/.gitignore              |   1 +
 tools/testing/selftests/mm/Makefile                |   1 +
 tools/testing/selftests/mm/droppable.c             |  53 ++++
 tools/testing/selftests/vDSO/.gitignore            |   2 +
 tools/testing/selftests/vDSO/Makefile              |  18 ++
 tools/testing/selftests/vDSO/vdso_test_chacha.c    |  43 +++
 tools/testing/selftests/vDSO/vdso_test_getrandom.c | 288 +++++++++++++++++++++
 37 files changed, 1122 insertions(+), 18 deletions(-)
 create mode 100644 arch/x86/entry/vdso/vgetrandom-chacha.S
 create mode 100644 arch/x86/entry/vdso/vgetrandom.c
 create mode 100644 arch/x86/include/asm/vdso/getrandom.h
 create mode 100644 include/vdso/getrandom.h
 create mode 100644 lib/vdso/getrandom.c
 create mode 100644 tools/include/asm/rwonce.h
 create mode 100644 tools/testing/selftests/mm/droppable.c
 create mode 100644 tools/testing/selftests/vDSO/vdso_test_chacha.c
 create mode 100644 tools/testing/selftests/vDSO/vdso_test_getrandom.c

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] random number generator updates for 6.11-rc1
  2024-07-19 18:33   ` Jason A. Donenfeld
@ 2024-07-24 17:50     ` pr-tracker-bot
  0 siblings, 0 replies; 4+ messages in thread
From: pr-tracker-bot @ 2024-07-24 17:50 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: Linus Torvalds, linux-kernel

The pull request you sent on Fri, 19 Jul 2024 20:33:08 +0200:

> https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git tags/random-6.11-rc1-for-linus

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/7a3fad30fd8b4b5e370906b3c554f64026f56c2f

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-24 17:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-14 20:00 [GIT PULL] random number generator updates for 6.11-rc1 Jason A. Donenfeld
2024-07-19 18:27 ` Jason A. Donenfeld
2024-07-19 18:33   ` Jason A. Donenfeld
2024-07-24 17:50     ` pr-tracker-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®