Skip to content

arm64: remove set_fs() and friends

Mark Rutland linux-arm-kernel 5 versions – Applied

Status from this message: Applied to arm64 (for-next/uaccess), thanks! I skipped patch 3 as it was

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest12 patches 4 repliesApplied
  2. v417 patches 20 repliesSuperseded
  3. v317 patches 9 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v217 patches0 repliesSuperseded
v113 patches10 repliesSuperseded

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/12arm64: sdei: move uaccess logic to arch/arm64/arch/arm64/kernel/sdei.c drivers/firmware/arm_sdei.c+12 -200 replies
2/12arm64: sdei: explicitly simulate PAN/UAO entryarch/arm64/include/asm/cpufeature.h arch/arm64/kernel/sdei.c+39 -61 reply
3/12arm64: uaccess: move uao_* alternatives to asm-uaccess.harch/arm64/include/asm/alternative.h arch/arm64/include/asm/asm-uaccess.h arch/arm64/lib/mte.S+60 -600 replies
4/12arm64: uaccess: rename privileged uaccess routinesarch/arm64/include/asm/futex.h arch/arm64/include/asm/uaccess.h arch/arm64/kernel/armv8_deprecated.c+8 -80 replies
5/12arm64: uaccess: simplify __copy_user_flushcache()arch/arm64/lib/uaccess_flushcache.c+1 -30 replies
6/12arm64: uaccess: refactor __{get,put}_userarch/arm64/include/asm/uaccess.h+27 -170 replies
7/12arm64: uaccess: split user/kernel routinesarch/arm64/include/asm/asm-uaccess.h arch/arm64/include/asm/uaccess.h+47 -650 replies
8/12arm64: uaccess cleanup macro namingarch/arm64/include/asm/asm-uaccess.h arch/arm64/lib/clear_user.S arch/arm64/lib/copy_from_user.S +3 more+26 -260 replies
9/12arm64: uaccess: remove set_fs()arch/arm64/Kconfig arch/arm64/include/asm/exec.h arch/arm64/include/asm/processor.h +10 more+13 -920 replies
10/12arm64: uaccess: remove addr_limit_user_check()arch/arm64/include/asm/thread_info.h arch/arm64/kernel/signal.c+2 -70 replies
11/12arm64: uaccess: remove redundant PAN togglingarch/arm64/include/asm/cpucaps.h arch/arm64/include/asm/uaccess.h arch/arm64/kernel/cpufeature.c+19 -581 reply
12/12arm64: uaccess: remove vestigal UAO supportarch/arm64/Kconfig arch/arm64/include/asm/cpucaps.h arch/arm64/kernel/cpufeature.c+0 -330 replies

Reviews trailers per patch

5 of 12 patches have a Reviewed-by or Acked-by.

PatchJames MorseRobin Murphy
1/12R-b
2/12R-b
3/12
4/12
5/12R-b
6/12
7/12
8/12R-b
9/12A-b
10/12
11/12
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCHv5 00/12] arm64: remove set_fs() and friends

Building atop Christoph's core rework now in v5.10-rc1, this series removes set_fs() from arm64. The series can be found in arm64/set_fs-removal branch [1].

Since v1 [2]:
* Remove redundant kthread init code
* Remove vestigal bit left by v1
* Rework SDEI entry
* Comment head.S better
* Fix commit message typos

Since v2 [3]:
* Rebase to v5.10-rc1
* Handle new MTE uaccess asm
* Fix trivial conflict with spectre mitigation rework
* Cleanup commit messages

Since v3 [4]:
* Rebase to v5.10-rc3 (trivial)
* Fix __get_kernel_nofault / __put_kernel_nofault error handling
* Fix include in mte asm
* Fix which patches change includes
* Fix typos

Since v4 [5]:
* Drop patches queued as arm64's for-next/uaccess branch
* Trivial rebase atop of for-next/uaccess (v5.10-rc3 based)
* Clarify __{get,put}_mem_asm() argument names
* Drop UAO manipulation, with expanded commentary
* Add R-b tags
* Fix typos

I've given v5 some light boot + userspace testing; prior versions have seen LTP and Syzkaller runs, so I'm not expecteing any major issues (but I'm soaking this under Syzkaller regardless).

Catalin, Will, there's is a trivial conflict with for-next/lto that git doesn't seem smart enough to resolve automatically despite our attempts to make this easy. The right thing to do is take Will's version of asm/alternative.h (which deletes the macros that got moved elsewhere), and my version of asm/asm-uaccess.h (which leaves the trivial ldtr/sttr helpers). I understand if you'd now prefer to wait and take this for v5.12, in which case I'll wait and rebase this atop v5.11-rc1 when that's out.

Patch 2 got an R-B from James in v4, but I dropped that for v5 since the UAO bits changed (based on feedback from catalin and James later in the series) and I didn't want to be presumptuous.

Thanks,
Mark.

[1] git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/set_fs-removal
[2] https://lore/kernel.org/r/[email protected]
[3] https://lore/kernel.org/r/[email protected]
[4] https://lore/kernel.org/r/[email protected]
[5] https://lore.kernel.org/r/[email protected]

Mark Rutland (12):
arm64: sdei: move uaccess logic to arch/arm64/
arm64: sdei: explicitly simulate PAN/UAO entry
arm64: uaccess: move uao_* alternatives to asm-uaccess.h
arm64: uaccess: rename privileged uaccess routines
arm64: uaccess: simplify __copy_user_flushcache()
arm64: uaccess: refactor __{get,put}_user
arm64: uaccess: split user/kernel routines
arm64: uaccess cleanup macro naming
arm64: uaccess: remove set_fs()
arm64: uaccess: remove addr_limit_user_check()
arm64: uaccess: remove redundant PAN toggling
arm64: uaccess: remove vestigal UAO support

 arch/arm64/Kconfig                   |  22 -----
 arch/arm64/include/asm/alternative.h |  59 ------------
 arch/arm64/include/asm/asm-uaccess.h |  29 ++++++
 arch/arm64/include/asm/cpucaps.h     |   2 -
 arch/arm64/include/asm/cpufeature.h  |  15 ++-
 arch/arm64/include/asm/exec.h        |   1 -
 arch/arm64/include/asm/futex.h       |   8 +-
 arch/arm64/include/asm/processor.h   |   4 +-
 arch/arm64/include/asm/ptrace.h      |   3 +-
 arch/arm64/include/asm/thread_info.h |  10 +-
 arch/arm64/include/asm/uaccess.h     | 174 +++++++++++++++--------------------
 arch/arm64/kernel/armv8_deprecated.c |   4 +-
 arch/arm64/kernel/asm-offsets.c      |   3 +-
 arch/arm64/kernel/cpufeature.c       |  32 -------
 arch/arm64/kernel/entry.S            |  19 +---
 arch/arm64/kernel/process.c          |  12 ---
 arch/arm64/kernel/sdei.c             |  33 +++++--
 arch/arm64/kernel/signal.c           |   3 -
 arch/arm64/kernel/suspend.c          |   1 -
 arch/arm64/lib/clear_user.S          |   8 +-
 arch/arm64/lib/copy_from_user.S      |   8 +-
 arch/arm64/lib/copy_in_user.S        |  16 ++--
 arch/arm64/lib/copy_to_user.S        |   8 +-
 arch/arm64/lib/mte.S                 |   6 +-
 arch/arm64/lib/uaccess_flushcache.c  |   4 +-
 arch/arm64/mm/fault.c                |   5 -
 drivers/firmware/arm_sdei.c          |  14 ---
 27 files changed, 181 insertions(+), 322 deletions(-)
Signature · 7 lines
2.11.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel