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

* Re: [PATCH] sched_getattr.2: update to include changed size semantics
  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
  0 siblings, 1 reply; 9+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2019-11-28 13:08 UTC (permalink / raw)
  To: Aleksa Sarai
  Cc: Michael Kerrisk, linux-man, linux-api, Ingo Molnar,
	Arnaldo Carvalho de Melo, Jiri Olsa, Patrick Bellasi,
	Peter Zijlstra, Thomas Gleixner

On Thu, Nov 28, 2019 at 11:01:40PM +1100, Aleksa Sarai wrote:
> 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
> 

I was thinking about documenting the difference in behavior of older kernels,
before uclamp support.

However, in practice, for sched_getattr, the kernel never returned E2BIG (the
code uses EFBIG incorrectly, in fact). It does, however, return EINVAL for
sizes smaller than SCHED_ATTR_SIZE_VER0.

The EINVAL return is already well documented in the manpage.

However, E2BIG is still mentioned below as a possible return value for
sched_getattr. Can you remove that too?

Thanks.
Cascardo.

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

* Re: [PATCH] sched_getattr.2: update to include changed size semantics
  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)
  0 siblings, 1 reply; 9+ messages in thread
From: Aleksa Sarai @ 2019-11-28 13:55 UTC (permalink / raw)
  To: Thadeu Lima de Souza Cascardo
  Cc: Michael Kerrisk, linux-man, linux-api, Ingo Molnar,
	Arnaldo Carvalho de Melo, Jiri Olsa, Patrick Bellasi,
	Peter Zijlstra, Thomas Gleixner

[-- Attachment #1: Type: text/plain, Size: 2831 bytes --]

On 2019-11-28, Thadeu Lima de Souza Cascardo <cascardo@canonical.com> wrote:
> On Thu, Nov 28, 2019 at 11:01:40PM +1100, Aleksa Sarai wrote:
> > 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
> > 
> 
> I was thinking about documenting the difference in behavior of older kernels,
> before uclamp support.
> 
> However, in practice, for sched_getattr, the kernel never returned E2BIG (the
> code uses EFBIG incorrectly, in fact). It does, however, return EINVAL for
> sizes smaller than SCHED_ATTR_SIZE_VER0.

I've been told the EFBIG was actually a typo and it was always meant to
be E2BIG. But yes, the precise problem with the old semantics was that
they weren't tested "in the wild" with a proper struct upgrade -- hence
all of the headaches.

If we ever do implement a copy_struct_to_user() we are almost certainly
going to implement it with the new sched_getattr() semantics. To be
honest, I'm not sure I can imagine a case where an old userspace program
would benefit from being given an error saying that the kernel has some
properties that it doesn't understand. (sched_getattr() is also weird
for other reasons, such as the fact it takes a separate size argument.)

> However, E2BIG is still mentioned below as a possible return value for
> sched_getattr. Can you remove that too?

Will do.

-- 
Aleksa Sarai
Senior Software Engineer (Containers)
SUSE Linux GmbH
<https://www.cyphar.com/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH] sched_getattr.2: update to include changed size semantics
  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)
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-04-25 19:12 UTC (permalink / raw)
  To: Aleksa Sarai
  Cc: Thadeu Lima de Souza Cascardo, linux-man, Linux API, Ingo Molnar,
	Arnaldo Carvalho de Melo, Jiri Olsa, Patrick Bellasi,
	Peter Zijlstra, Thomas Gleixner, Michael Kerrisk

Hi Aleksa,

I don't think there was ever a follow-up to this patch. Would you be
willing to send one?

Thanks,

Michael

On Thu, 28 Nov 2019 at 14:55, Aleksa Sarai <cyphar@cyphar.com> wrote:
>
> On 2019-11-28, Thadeu Lima de Souza Cascardo <cascardo@canonical.com> wrote:
> > On Thu, Nov 28, 2019 at 11:01:40PM +1100, Aleksa Sarai wrote:
> > > 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
> > >
> >
> > I was thinking about documenting the difference in behavior of older kernels,
> > before uclamp support.
> >
> > However, in practice, for sched_getattr, the kernel never returned E2BIG (the
> > code uses EFBIG incorrectly, in fact). It does, however, return EINVAL for
> > sizes smaller than SCHED_ATTR_SIZE_VER0.
>
> I've been told the EFBIG was actually a typo and it was always meant to
> be E2BIG. But yes, the precise problem with the old semantics was that
> they weren't tested "in the wild" with a proper struct upgrade -- hence
> all of the headaches.
>
> If we ever do implement a copy_struct_to_user() we are almost certainly
> going to implement it with the new sched_getattr() semantics. To be
> honest, I'm not sure I can imagine a case where an old userspace program
> would benefit from being given an error saying that the kernel has some
> properties that it doesn't understand. (sched_getattr() is also weird
> for other reasons, such as the fact it takes a separate size argument.)
>
> > However, E2BIG is still mentioned below as a possible return value for
> > sched_getattr. Can you remove that too?
>
> Will do.
>
> --
> Aleksa Sarai
> Senior Software Engineer (Containers)
> SUSE Linux GmbH
> <https://www.cyphar.com/>



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

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

* Re: [PATCH] sched_getattr.2: update to include changed size semantics
  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
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-05-15 12:10 UTC (permalink / raw)
  To: Aleksa Sarai
  Cc: Thadeu Lima de Souza Cascardo, linux-man, Linux API, Ingo Molnar,
	Arnaldo Carvalho de Melo, Jiri Olsa, Patrick Bellasi,
	Peter Zijlstra, Thomas Gleixner, Michael Kerrisk

Hi Aleksa,

A ping also on this :-).

Cheers,

Michael

On Sat, 25 Apr 2020 at 21:12, Michael Kerrisk (man-pages)
<mtk.manpages@gmail.com> wrote:
>
> Hi Aleksa,
>
> I don't think there was ever a follow-up to this patch. Would you be
> willing to send one?
>
> Thanks,
>
> Michael
>
> On Thu, 28 Nov 2019 at 14:55, Aleksa Sarai <cyphar@cyphar.com> wrote:
> >
> > On 2019-11-28, Thadeu Lima de Souza Cascardo <cascardo@canonical.com> wrote:
> > > On Thu, Nov 28, 2019 at 11:01:40PM +1100, Aleksa Sarai wrote:
> > > > 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
> > > >
> > >
> > > I was thinking about documenting the difference in behavior of older kernels,
> > > before uclamp support.
> > >
> > > However, in practice, for sched_getattr, the kernel never returned E2BIG (the
> > > code uses EFBIG incorrectly, in fact). It does, however, return EINVAL for
> > > sizes smaller than SCHED_ATTR_SIZE_VER0.
> >
> > I've been told the EFBIG was actually a typo and it was always meant to
> > be E2BIG. But yes, the precise problem with the old semantics was that
> > they weren't tested "in the wild" with a proper struct upgrade -- hence
> > all of the headaches.
> >
> > If we ever do implement a copy_struct_to_user() we are almost certainly
> > going to implement it with the new sched_getattr() semantics. To be
> > honest, I'm not sure I can imagine a case where an old userspace program
> > would benefit from being given an error saying that the kernel has some
> > properties that it doesn't understand. (sched_getattr() is also weird
> > for other reasons, such as the fact it takes a separate size argument.)
> >
> > > However, E2BIG is still mentioned below as a possible return value for
> > > sched_getattr. Can you remove that too?
> >
> > Will do.
> >
> > --
> > Aleksa Sarai
> > Senior Software Engineer (Containers)
> > SUSE Linux GmbH
> > <https://www.cyphar.com/>
>
>
>
> --
> Michael Kerrisk
> Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
> Linux/UNIX System Programming Training: http://man7.org/training/



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

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

* [PATCH 1/2] sched_getattr.2: update to include changed size semantics
  2020-05-15 12:10       ` Michael Kerrisk (man-pages)
@ 2020-09-29 22:35         ` Aleksa Sarai
  2020-09-29 22:35           ` [PATCH 2/2] openat2.2: fix minor reference typo Aleksa Sarai
  2020-09-30 10:51           ` [PATCH 1/2] sched_getattr.2: update to include changed size semantics Michael Kerrisk (man-pages)
  0 siblings, 2 replies; 9+ messages in thread
From: Aleksa Sarai @ 2020-09-29 22:35 UTC (permalink / raw)
  To: mtk.manpages
  Cc: Aleksa Sarai, Thadeu Lima de Souza Cascardo, Ingo Molnar,
	Arnaldo Carvalho de Melo, Jiri Olsa, Patrick Bellasi,
	Peter Zijlstra, Thomas Gleixner, linux-man, linux-api

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. We
also document the original error code correctly (it was EFBIG not
E2BIG) in the BUGS section.

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 | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/man2/sched_setattr.2 b/man2/sched_setattr.2
index 2592a761a086..da0972a6a86d 100644
--- a/man2/sched_setattr.2
+++ b/man2/sched_setattr.2
@@ -286,10 +286,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.
@@ -416,6 +414,16 @@ failed with the error
 instead of
 .BR E2BIG
 for the case described in ERRORS.
+.PP
+In Linux versions up to 5.3,
+.BR sched_getattr ()
+failed with the error
+.BR EFBIG
+if the in-kernel
+.IR sched_attr
+structure was larger than the
+.IR size
+passed by user space.
 .\" In Linux versions up to up 3.15,
 .\" FIXME . patch from Peter Zijlstra pending
 .\" .BR sched_setattr ()
-- 
2.28.0


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

* [PATCH 2/2] openat2.2: fix minor reference typo
  2020-09-29 22:35         ` [PATCH 1/2] " Aleksa Sarai
@ 2020-09-29 22:35           ` 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)
  1 sibling, 1 reply; 9+ messages in thread
From: Aleksa Sarai @ 2020-09-29 22:35 UTC (permalink / raw)
  To: mtk.manpages
  Cc: Aleksa Sarai, Thadeu Lima de Souza Cascardo, Ingo Molnar,
	Arnaldo Carvalho de Melo, Jiri Olsa, Patrick Bellasi,
	Peter Zijlstra, Thomas Gleixner, linux-man, linux-api

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
---
 man2/openat2.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man2/openat2.2 b/man2/openat2.2
index 29b716d97ac4..53056ee6d292 100644
--- a/man2/openat2.2
+++ b/man2/openat2.2
@@ -493,7 +493,7 @@ acting as an implicit version number.
 (Because new extension fields will always
 be appended, the structure size will always increase.)
 This extensibility design is very similar to other system calls such as
-.BR perf_setattr (2),
+.BR sched_setattr (2),
 .BR perf_event_open (2),
 and
 .BR clone3 (2).
-- 
2.28.0


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

* Re: [PATCH 1/2] sched_getattr.2: update to include changed size semantics
  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)
  1 sibling, 0 replies; 9+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-09-30 10:51 UTC (permalink / raw)
  To: Aleksa Sarai
  Cc: mtk.manpages, Thadeu Lima de Souza Cascardo, Ingo Molnar,
	Arnaldo Carvalho de Melo, Jiri Olsa, Patrick Bellasi,
	Peter Zijlstra, Thomas Gleixner, linux-man, linux-api

On 9/30/20 12:35 AM, Aleksa Sarai wrote:
> 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. We
> also document the original error code correctly (it was EFBIG not
> E2BIG) in the BUGS section.

Thanks, Aleksa. Patch applied.

Cheers,

Michael


> 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 | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/man2/sched_setattr.2 b/man2/sched_setattr.2
> index 2592a761a086..da0972a6a86d 100644
> --- a/man2/sched_setattr.2
> +++ b/man2/sched_setattr.2
> @@ -286,10 +286,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.
> @@ -416,6 +414,16 @@ failed with the error
>  instead of
>  .BR E2BIG
>  for the case described in ERRORS.
> +.PP
> +In Linux versions up to 5.3,
> +.BR sched_getattr ()
> +failed with the error
> +.BR EFBIG
> +if the in-kernel
> +.IR sched_attr
> +structure was larger than the
> +.IR size
> +passed by user space.
>  .\" In Linux versions up to up 3.15,
>  .\" FIXME . patch from Peter Zijlstra pending
>  .\" .BR sched_setattr ()
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

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

* Re: [PATCH 2/2] openat2.2: fix minor reference typo
  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)
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-09-30 10:51 UTC (permalink / raw)
  To: Aleksa Sarai
  Cc: mtk.manpages, Thadeu Lima de Souza Cascardo, Ingo Molnar,
	Arnaldo Carvalho de Melo, Jiri Olsa, Patrick Bellasi,
	Peter Zijlstra, Thomas Gleixner, linux-man, linux-api

On 9/30/20 12:35 AM, Aleksa Sarai wrote:
> Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>

Thanks, Aleksa. Patch applied.

Cheers,

Michael

> ---
>  man2/openat2.2 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/man2/openat2.2 b/man2/openat2.2
> index 29b716d97ac4..53056ee6d292 100644
> --- a/man2/openat2.2
> +++ b/man2/openat2.2
> @@ -493,7 +493,7 @@ acting as an implicit version number.
>  (Because new extension fields will always
>  be appended, the structure size will always increase.)
>  This extensibility design is very similar to other system calls such as
> -.BR perf_setattr (2),
> +.BR sched_setattr (2),
>  .BR perf_event_open (2),
>  and
>  .BR clone3 (2).
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[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).