Re: [PATCH] sched/headers: Fix sched_setattr userspace compilation breakage

2020-05-29 Thread Joel Fernandes
Hi Linus, On Thu, May 28, 2020 at 07:17:38PM -0700, Linus Torvalds wrote: > On Thu, May 28, 2020 at 6:45 PM Joel Fernandes wrote: > > > > glibc's already defines struct sched_param (which is a POSIX > > struct), so my inclusion of above which is a UAPI > > header exported by the kernel,

Re: [PATCH] sched/headers: Fix sched_setattr userspace compilation breakage

2020-05-28 Thread Linus Torvalds
On Thu, May 28, 2020 at 6:45 PM Joel Fernandes wrote: > > glibc's already defines struct sched_param (which is a POSIX > struct), so my inclusion of above which is a UAPI > header exported by the kernel, breaks because the following commit moved > sched_param into the UAPI: > e2d1e2aec572a

Re: [PATCH] sched/headers: Fix sched_setattr userspace compilation breakage

2020-05-28 Thread Joel Fernandes
On Thu, May 28, 2020 at 04:23:26PM -0700, Linus Torvalds wrote: > On Thu, May 28, 2020 at 4:09 PM Joel Fernandes wrote: > > > > > So no, this patch is fundamentally wrong. It negates the whole point > > > of having a uapi header at all. > > > > Sorry, I naively assumed that headers in

Re: [PATCH] sched/headers: Fix sched_setattr userspace compilation breakage

2020-05-28 Thread Linus Torvalds
On Thu, May 28, 2020 at 4:09 PM Joel Fernandes wrote: > > > So no, this patch is fundamentally wrong. It negates the whole point > > of having a uapi header at all. > > Sorry, I naively assumed that headers in 'include/uapi/' are safe to include > from userspace. I feel terrible. Well, they

Re: [PATCH] sched/headers: Fix sched_setattr userspace compilation breakage

2020-05-28 Thread Joel Fernandes
Hi Linus, On Thu, May 28, 2020 at 03:21:56PM -0700, Linus Torvalds wrote: > On Thu, May 28, 2020 at 6:55 AM Joel Fernandes (Google) > wrote: > > > > On a modern Linux distro, compiling the following program fails: > > #include > > #include > > #include > > #include > > You shouldn't include

Re: [PATCH] sched/headers: Fix sched_setattr userspace compilation breakage

2020-05-28 Thread Linus Torvalds
On Thu, May 28, 2020 at 6:55 AM Joel Fernandes (Google) wrote: > > On a modern Linux distro, compiling the following program fails: > #include > #include > #include > #include You shouldn't include kernel headers in user space - that's the job of glibc and friends. > ---