linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sched_getattr.2: update to include changed size semantics
@ 2019-11-28 12:01 Aleksa Sarai
  2019-11-28 13:08 ` Thadeu Lima de Souza Cascardo
  0 siblings, 1 reply; 9+ messages in thread
From: Aleksa Sarai @ 2019-11-28 12:01 UTC (permalink / raw)
  To: Michael Kerrisk
  Cc: linux-man, linux-api, Ingo Molnar, Arnaldo Carvalho de Melo,
	Thadeu Lima de Souza Cascardo, Jiri Olsa, Patrick Bellasi,
	Peter Zijlstra, Thomas Gleixner, Aleksa Sarai

Due to a userspace breakage, commit 1251201c0d34 ("sched/core: Fix
uclamp ABI bug, clean up and robustify sched_read_attr() ABI logic and
code") changed the semantics of sched_getattr(2) when the userspace
struct is smaller than the kernel struct. Now, any trailing non-zero
data in the kernel structure is ignored when copying to userspace.

Ref: 1251201c0d34 ("sched/core: Fix uclamp ABI bug, clean up and
                    robustify sched_read_attr() ABI logic and code")
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
---
 man2/sched_setattr.2 | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/man2/sched_setattr.2 b/man2/sched_setattr.2
index 76ffa14eba85..fbb67b8eb98b 100644
--- a/man2/sched_setattr.2
+++ b/man2/sched_setattr.2
@@ -284,10 +284,8 @@ structure,
 the additional bytes in the user-space structure are not touched.
 If the caller-provided structure is smaller than the kernel
 .I sched_attr
-structure and the kernel needs to return values outside the provided space,
-.BR sched_getattr ()
-fails with the error
-.BR E2BIG .
+structure, the kernel will silently not return any values which would be stored
+outside the provided space.
 As with
 .BR sched_setattr (),
 these semantics allow for future extensibility of the interface.
-- 
2.24.0


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

end of thread, other threads:[~2020-09-30 10:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-28 12:01 [PATCH] sched_getattr.2: update to include changed size semantics Aleksa Sarai
2019-11-28 13:08 ` Thadeu Lima de Souza Cascardo
2019-11-28 13:55   ` Aleksa Sarai
2020-04-25 19:12     ` Michael Kerrisk (man-pages)
2020-05-15 12:10       ` Michael Kerrisk (man-pages)
2020-09-29 22:35         ` [PATCH 1/2] " Aleksa Sarai
2020-09-29 22:35           ` [PATCH 2/2] openat2.2: fix minor reference typo Aleksa Sarai
2020-09-30 10:51             ` Michael Kerrisk (man-pages)
2020-09-30 10:51           ` [PATCH 1/2] sched_getattr.2: update to include changed size semantics Michael Kerrisk (man-pages)

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).