Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1485066 > unrolled thread
| Started by | Stafford Horne <shorne@gmail.com> |
|---|---|
| First post | 2016-09-16 16:50 +0200 |
| Last post | 2016-09-16 17:00 +0200 |
| Articles | 10 on this page of 30 — 5 participants |
Back to article view | Back to linux.kernel
[PATCH 0/7] openrisc: Misc fixes from backlog Stafford Horne <shorne@gmail.com> - 2016-09-16 16:50 +0200
[PATCH 6/7] openrisc: add SMP and NR_CPUS Kconfig options Stafford Horne <shorne@gmail.com> - 2016-09-16 16:50 +0200
Re: [PATCH 6/7] openrisc: add SMP and NR_CPUS Kconfig options Jonas Bonn <jonas@southpole.se> - 2016-09-19 16:40 +0200
Re: [PATCH 6/7] openrisc: add SMP and NR_CPUS Kconfig options Stafford Horne <shorne@gmail.com> - 2016-09-19 17:00 +0200
[PATCH 3/7] openrisc: restore call-saved regs on sigreturn Stafford Horne <shorne@gmail.com> - 2016-09-16 16:50 +0200
Re: [PATCH 3/7] openrisc: restore call-saved regs on sigreturn Jonas Bonn <jonas@southpole.se> - 2016-09-19 16:50 +0200
Re: [PATCH 3/7] openrisc: restore call-saved regs on sigreturn Stafford Horne <shorne@gmail.com> - 2016-09-19 17:00 +0200
[PATCH 7/7] openrisc: remove the redundant of_platform_populate Stafford Horne <shorne@gmail.com> - 2016-09-16 16:50 +0200
Re: [PATCH 7/7] openrisc: remove the redundant of_platform_populate Jonas Bonn <jonas@southpole.se> - 2016-09-19 16:40 +0200
Re: [PATCH 7/7] openrisc: remove the redundant of_platform_populate Stafford Horne <shorne@gmail.com> - 2016-09-19 17:00 +0200
Re: [PATCH 7/7] openrisc: remove the redundant of_platform_populate Rob Herring <robh@kernel.org> - 2016-09-19 18:20 +0200
[PATCH 5/7] openrisc: Support both old (or32) and new (or1k) toolchain Stafford Horne <shorne@gmail.com> - 2016-09-16 16:50 +0200
Re: [PATCH 5/7] openrisc: Support both old (or32) and new (or1k) toolchain Guenter Roeck <linux@roeck-us.net> - 2016-09-18 17:30 +0200
Re: [PATCH 5/7] openrisc: Support both old (or32) and new (or1k) toolchain Stafford Horne <shorne@gmail.com> - 2016-09-19 08:10 +0200
Re: [PATCH 5/7] openrisc: Support both old (or32) and new (or1k) toolchain Guenter Roeck <linux@roeck-us.net> - 2016-09-19 09:20 +0200
Re: [PATCH 5/7] openrisc: Support both old (or32) and new (or1k) toolchain Stafford Horne <shorne@gmail.com> - 2016-09-19 11:20 +0200
Re: [PATCH 5/7] openrisc: Support both old (or32) and new (or1k) toolchain Guenter Roeck <linux@roeck-us.net> - 2016-09-19 15:20 +0200
Re: [PATCH 5/7] openrisc: Support both old (or32) and new (or1k) toolchain Stafford Horne <shorne@gmail.com> - 2016-09-19 16:10 +0200
Re: [PATCH 5/7] openrisc: Support both old (or32) and new (or1k) toolchain Jonas Bonn <jonas@southpole.se> - 2016-09-19 16:40 +0200
Re: [PATCH 5/7] openrisc: Support both old (or32) and new (or1k) toolchain Guenter Roeck <linux@roeck-us.net> - 2016-09-19 17:00 +0200
Re: [PATCH 5/7] openrisc: Support both old (or32) and new (or1k) toolchain Stafford Horne <shorne@gmail.com> - 2016-09-19 17:20 +0200
Re: [PATCH 5/7] openrisc: Support both old (or32) and new (or1k) toolchain Guenter Roeck <linux@roeck-us.net> - 2016-09-19 16:50 +0200
Re: [PATCH 5/7] openrisc: Support both old (or32) and new (or1k) toolchain Stafford Horne <shorne@gmail.com> - 2016-09-20 12:10 +0200
[PATCH 1/7] Apply transparent_union attribute to union semun Stafford Horne <shorne@gmail.com> - 2016-09-16 16:50 +0200
Re: [PATCH 1/7] Apply transparent_union attribute to union semun kbuild test robot <lkp@intel.com> - 2016-09-16 18:00 +0200
Re: [PATCH 1/7] Apply transparent_union attribute to union semun kbuild test robot <lkp@intel.com> - 2016-09-17 01:40 +0200
Re: [PATCH 1/7] Apply transparent_union attribute to union semun Stafford Horne <shorne@gmail.com> - 2016-09-17 02:10 +0200
Re: [PATCH 1/7] Apply transparent_union attribute to union semun Stafford Horne <shorne@gmail.com> - 2016-09-19 16:50 +0200
Re: [PATCH 1/7] Apply transparent_union attribute to union semun Jonas Bonn <jonas@southpole.se> - 2016-09-19 16:50 +0200
Re: [PATCH 0/7] openrisc: Misc fixes from backlog Stafford Horne <shorne@gmail.com> - 2016-09-16 17:00 +0200
Page 2 of 2 — ← Prev page 1 [2]
| From | Stafford Horne <shorne@gmail.com> |
|---|---|
| Date | 2016-09-19 17:20 +0200 |
| Subject | Re: [PATCH 5/7] openrisc: Support both old (or32) and new (or1k) toolchain |
| Message-ID | <sj8wq-74K-19@gated-at.bofh.it> |
| In reply to | #1486543 |
On Mon, 19 Sep 2016, Jonas Bonn wrote:
> On 09/19/2016 04:04 PM, Stafford Horne wrote:
>>
>>
>> On Mon, 19 Sep 2016, Guenter Roeck wrote:
>>
>> > On 09/19/2016 02:11 AM, Stafford Horne wrote:
>> > >
>> > >
>> > > On Mon, 19 Sep 2016, Guenter Roeck wrote:
>> > >
>> > > > On 09/18/2016 11:02 PM, Stafford Horne wrote:
>> > > > > > > > > On Sun, 18 Sep 2016, Guenter Roeck wrote:
>> > > > > > > > Tested-by: Guenter Roeck <linux@roeck-us.net>
>> > > > > > > If you plan to handle openrisc going forward, it would be
>> > > great > > > > if you > could
>> > > > > > consider updating MAINTAINERS. The web site and git
>> > > repository have > > > been > unreachable
>> > > > > > for a long time.
>> > > > > > > Thank you,
>> > > > > Updating maintainers was kind of on my plans, but I figured I
>> > > need to
>> > > > > prove that I kind of know what I am doing.
>> > > > > > > The alternative would be to mark it as Orphaned. Which, for
>> > > all > practical purpose,
>> > > > would be the correct state right now.
>> > >
>> > > +CC The openrisc list
>> > >
>> > > Understood, I don't think we would want that to happen.
>> > >
>> > Look at the entry today:
>> >
>> > OPENRISC ARCHITECTURE
>> > M: Jonas Bonn <jonas@southpole.se>
>> > W: http://openrisc.net
>> > S: Maintained
>> > T: git git://openrisc.net/~jonas/linux
>> > F: arch/openrisc/
>> >
>> > At the very least, W: and T: are incorrect and need to be updated or
>> > removed.
>> > Plus, apparently there is a L:, and "T:
>> > https://github.com/openrisc/linux"
>> > might be appropriate.
>> >
>>
>> Thanks,
>> I am aware of this, we have since setup a new website, mailing list and as
>> you have found, git repo. Stefan has been nominated as the maintainer by
>> Jonas on a previous mail thread.
>>
>> The issue (as we see it) is that neither Stefan or I have signed PGP keys
>> by anyone in the web of trust.
>>
>> I sent this patch set with a cover lett trying to explain of the situation
>> trying to get some help. Your reponses are very helpful.
>>
>> Do you think I should just send "git pull" reuqests to Linus with a self
>> signed pgp key and eplaination to see how it goes?
>
> The bigger question I would have at this point is the value of the code
> remaining upstream... Five years ago, there was a promise to try to get the
> toolchain upstream within a year or two; to this day, I don't know that much
> progress has been made there so this architecture still requires a
> hodge-podge of tools from various sources to build.
>
> Given the toolchain maintainer's general reluctance to move things upstream,
> I'd almost be inclined to just remove the OpenRISC arch from the kernel
> altogether. Are there any other arch's that can't be built with an upstream
> GCC at this point?
Hi Jonas,
We have tried to get the toolchain in order in the last year. The latest
efforts is headlined by a toolchain build tutorial here:
http://openrisc.io/newlib/building.html
The main toolchain project
binutils-gdb - is upstreamed, I have been working on getting more of the
but there are many patches sitting in our repo on github
I have been working on getting them rebased to 7.11 and
upstreamed.
newlib - is upstreamed, with my gdb fixes I have also worked on
fixing some bugs in the last year.
gcc - this is the problem, the gcc code has not been signed over
to the fsf by the original authors. A clean-room rewrite
seems to needed last I checked
The projects are all being maintained on the openrisc github page and we
are trying to keep it going.
The attraction of openrisc, I would say, is that its one of the only fully
open platforms in the kernel. Its also relatively simple so for hobbyist
and students who want to have a 32-bit cpu which they can do 'full-stack'
development on it fits a good nitch.
Keeping it upstream means also this code base is not getting stale. But we
do need people to look after it and the patches.
-Stafford
>>
>> -Stafford
>>
>> FYI
>> I have a change as following in my backlog, as follows:
>>
>> ---
>> @@ -8691,10 +8063,12 @@ F: drivers/of/overlay.c
>> F: drivers/of/resolver.c
>>
>> OPENRISC ARCHITECTURE
>> -M: Jonas Bonn <jonas@southpole.se>
>> -W: http://openrisc.net
>> +M: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
>> +M: Stafford Horne <shorne@gmail.com>
>> +W: http://openrisc.io
>> +L: openrisc@lists.librecores.org
>> +T: https://github.com/openrisc/linux.git
>> S: Maintained
>> -T: git git://openrisc.net/~jonas/linux
>> F: arch/openrisc/
>>
>> OPENVSWITCH
>>
>> --
>
>
[toc] | [prev] | [next] | [standalone]
| From | Guenter Roeck <linux@roeck-us.net> |
|---|---|
| Date | 2016-09-19 16:50 +0200 |
| Subject | Re: [PATCH 5/7] openrisc: Support both old (or32) and new (or1k) toolchain |
| Message-ID | <sj83p-6ES-49@gated-at.bofh.it> |
| In reply to | #1486534 |
On 09/19/2016 07:04 AM, Stafford Horne wrote: > > > On Mon, 19 Sep 2016, Guenter Roeck wrote: > >> On 09/19/2016 02:11 AM, Stafford Horne wrote: >>> >>> >>> On Mon, 19 Sep 2016, Guenter Roeck wrote: >>> >>> > On 09/18/2016 11:02 PM, Stafford Horne wrote: >>> > > > > > > On Sun, 18 Sep 2016, Guenter Roeck wrote: >>> > > > > > Tested-by: Guenter Roeck <linux@roeck-us.net> >>> > > > > If you plan to handle openrisc going forward, it would be great > > > > if you > could >>> > > > consider updating MAINTAINERS. The web site and git repository have > > > been > unreachable >>> > > > for a long time. >>> > > > > Thank you, >>> > > Updating maintainers was kind of on my plans, but I figured I need to >>> > > prove that I kind of know what I am doing. >>> > > > > The alternative would be to mark it as Orphaned. Which, for all > practical purpose, >>> > would be the correct state right now. >>> >>> +CC The openrisc list >>> >>> Understood, I don't think we would want that to happen. >>> >> Look at the entry today: >> >> OPENRISC ARCHITECTURE >> M: Jonas Bonn <jonas@southpole.se> >> W: http://openrisc.net >> S: Maintained >> T: git git://openrisc.net/~jonas/linux >> F: arch/openrisc/ >> >> At the very least, W: and T: are incorrect and need to be updated or removed. >> Plus, apparently there is a L:, and "T: https://github.com/openrisc/linux" >> might be appropriate. >> > > Thanks, > I am aware of this, we have since setup a new website, mailing list and as you have found, git repo. Stefan has been nominated as the maintainer by Jonas on a previous mail thread. > > The issue (as we see it) is that neither Stefan or I have signed PGP keys by anyone in the web of trust. > > I sent this patch set with a cover lett trying to explain of the situation trying to get some help. Your reponses are very helpful. > > Do you think I should just send "git pull" reuqests to Linus with a self signed pgp key and eplaination to see how it goes? > Nope, that won't work. Linus will not accept pull requests without signed key, or at least I would be very surprised if he does. You'll have to get your key signed. I understand that may be tricky, with you being in Japan (if that is you ;-), but we can't help it. Guenter > -Stafford > > FYI > I have a change as following in my backlog, as follows: > > --- > @@ -8691,10 +8063,12 @@ F: drivers/of/overlay.c > F: drivers/of/resolver.c > > OPENRISC ARCHITECTURE > -M: Jonas Bonn <jonas@southpole.se> > -W: http://openrisc.net > +M: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> > +M: Stafford Horne <shorne@gmail.com> > +W: http://openrisc.io > +L: openrisc@lists.librecores.org > +T: https://github.com/openrisc/linux.git > S: Maintained > -T: git git://openrisc.net/~jonas/linux > F: arch/openrisc/ > > OPENVSWITCH > > -- >
[toc] | [prev] | [next] | [standalone]
| From | Stafford Horne <shorne@gmail.com> |
|---|---|
| Date | 2016-09-20 12:10 +0200 |
| Subject | Re: [PATCH 5/7] openrisc: Support both old (or32) and new (or1k) toolchain |
| Message-ID | <sjq9X-1yF-13@gated-at.bofh.it> |
| In reply to | #1486566 |
On Mon, 19 Sep 2016, Guenter Roeck wrote: > On 09/19/2016 07:04 AM, Stafford Horne wrote: >> >> >> On Mon, 19 Sep 2016, Guenter Roeck wrote: >> >> > On 09/19/2016 02:11 AM, Stafford Horne wrote: >> > > >> > > >> > > On Mon, 19 Sep 2016, Guenter Roeck wrote: >> > > >> > > > On 09/18/2016 11:02 PM, Stafford Horne wrote: >> > > > > > > > > On Sun, 18 Sep 2016, Guenter Roeck wrote: >> > > > > > > > Tested-by: Guenter Roeck <linux@roeck-us.net> >> > > > > > > If you plan to handle openrisc going forward, it would be >> > > > > > > great > > > > if you > could >> > > > > > consider updating MAINTAINERS. The web site and git repository >> > > > > > have > > > been > unreachable >> > > > > > for a long time. >> > > > > > > Thank you, >> > > > > Updating maintainers was kind of on my plans, but I figured I >> > > > > need to >> > > > > prove that I kind of know what I am doing. >> > > > > > > The alternative would be to mark it as Orphaned. Which, for >> > > > > > > all > practical purpose, >> > > > would be the correct state right now. >> > > >> > > +CC The openrisc list >> > > >> > > Understood, I don't think we would want that to happen. >> > > >> > Look at the entry today: >> > >> > OPENRISC ARCHITECTURE >> > M: Jonas Bonn <jonas@southpole.se> >> > W: http://openrisc.net >> > S: Maintained >> > T: git git://openrisc.net/~jonas/linux >> > F: arch/openrisc/ >> > >> > At the very least, W: and T: are incorrect and need to be updated or >> > removed. >> > Plus, apparently there is a L:, and "T: >> > https://github.com/openrisc/linux" >> > might be appropriate. >> > >> >> Thanks, >> I am aware of this, we have since setup a new website, mailing list and as >> you have found, git repo. Stefan has been nominated as the maintainer by >> Jonas on a previous mail thread. >> >> The issue (as we see it) is that neither Stefan or I have signed PGP keys >> by anyone in the web of trust. >> >> I sent this patch set with a cover lett trying to explain of the situation >> trying to get some help. Your reponses are very helpful. >> >> Do you think I should just send "git pull" reuqests to Linus with a self >> signed pgp key and eplaination to see how it goes? >> > > Nope, that won't work. Linus will not accept pull requests without signed > key, > or at least I would be very surprised if he does. You'll have to get your key > signed. I understand that may be tricky, with you being in Japan (if that is > you ;-), but we can't help it. Thats as I figured. It is me and I just missed LinuxCon Japan 2016 as I was out of town. I have some contacts I may be able to reach out to though. -Stafford >> FYI >> I have a change as following in my backlog, as follows: >> >> --- >> @@ -8691,10 +8063,12 @@ F: drivers/of/overlay.c >> F: drivers/of/resolver.c >> >> OPENRISC ARCHITECTURE >> -M: Jonas Bonn <jonas@southpole.se> >> -W: http://openrisc.net >> +M: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> >> +M: Stafford Horne <shorne@gmail.com> >> +W: http://openrisc.io >> +L: openrisc@lists.librecores.org >> +T: https://github.com/openrisc/linux.git >> S: Maintained >> -T: git git://openrisc.net/~jonas/linux >> F: arch/openrisc/ >> >> OPENVSWITCH >> >> -- >> > >
[toc] | [prev] | [next] | [standalone]
| From | Stafford Horne <shorne@gmail.com> |
|---|---|
| Date | 2016-09-16 16:50 +0200 |
| Subject | [PATCH 1/7] Apply transparent_union attribute to union semun |
| Message-ID | <si2CK-608-31@gated-at.bofh.it> |
| In reply to | #1485066 |
From: Jonas Bonn <jonas@southpole.se>
The syscall handler for semctl is written under the assumption that the
toolchain will pass "small" unions as function parameters directly instead
of by reference. The union semun is "small" and thus fits this description.
Since it is assumed that the union will be passed directly and not by
reference, it is safe to access the union members without going via
get_user.
The OpenRISC architecture, however, passes all unions by reference, thus
breaking the above assumption.
The technically correct fix here is to mark the union as being transparent
so that the ABI of the union's first element determines the parameter
passing method and thus make explicit what's already implied in the function
definition.
Signed-off-by: Jonas Bonn <jonas@southpole.se>
Signed-off-by: Stafford Horne <shorne@gmail.com>
---
include/uapi/linux/sem.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/sem.h b/include/uapi/linux/sem.h
index dd73b90..aabe50f 100644
--- a/include/uapi/linux/sem.h
+++ b/include/uapi/linux/sem.h
@@ -48,7 +48,7 @@ union semun {
unsigned short __user *array; /* array for GETALL & SETALL */
struct seminfo __user *__buf; /* buffer for IPC_INFO */
void __user *__pad;
-};
+} __attribute__ ((transparent_union));
struct seminfo {
int semmap;
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2016-09-16 18:00 +0200 |
| Subject | Re: [PATCH 1/7] Apply transparent_union attribute to union semun |
| Message-ID | <si3Iu-6DG-15@gated-at.bofh.it> |
| In reply to | #1485077 |
[Multipart message — attachments visible in raw view] — view raw
Hi Jonas,
[auto build test WARNING on linus/master]
[also build test WARNING on v4.8-rc6 next-20160916]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]
url: https://github.com/0day-ci/linux/commits/Stafford-Horne/openrisc-Misc-fixes-from-backlog/20160916-230114
config: x86_64-randconfig-x011-09161116 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
In file included from include/linux/sem.h:7:0,
from include/linux/sched.h:35,
from include/linux/utsname.h:5,
from init/version.c:12:
>> include/uapi/linux/sem.h:45:7: warning: union cannot be made transparent
union semun {
^~~~~
--
In file included from include/linux/sem.h:7:0,
from include/linux/sched.h:35,
from include/linux/kasan.h:4,
from kernel/sched/core.c:29:
>> include/uapi/linux/sem.h:45:7: warning: union cannot be made transparent
union semun {
^~~~~
In file included from include/linux/perf_event.h:47:0,
from kernel/sched/core.c:42:
include/linux/ftrace.h: In function 'preempt_schedule_common':
include/linux/ftrace.h:703:36: warning: calling '__builtin_return_address' with a nonzero argument is unsafe [-Wframe-address]
# define ftrace_return_address(n) __builtin_return_address(n)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:710:38: note: in expansion of macro 'ftrace_return_address'
#define CALLER_ADDR1 ((unsigned long)ftrace_return_address(1))
^~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:723:9: note: in expansion of macro 'CALLER_ADDR1'
addr = CALLER_ADDR1;
^~~~~~~~~~~~
include/linux/ftrace.h:703:36: warning: calling '__builtin_return_address' with a nonzero argument is unsafe [-Wframe-address]
# define ftrace_return_address(n) __builtin_return_address(n)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:711:38: note: in expansion of macro 'ftrace_return_address'
#define CALLER_ADDR2 ((unsigned long)ftrace_return_address(2))
^~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:726:9: note: in expansion of macro 'CALLER_ADDR2'
return CALLER_ADDR2;
^~~~~~~~~~~~
include/linux/ftrace.h: In function 'preempt_count_add':
include/linux/ftrace.h:703:36: warning: calling '__builtin_return_address' with a nonzero argument is unsafe [-Wframe-address]
# define ftrace_return_address(n) __builtin_return_address(n)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:710:38: note: in expansion of macro 'ftrace_return_address'
#define CALLER_ADDR1 ((unsigned long)ftrace_return_address(1))
^~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:723:9: note: in expansion of macro 'CALLER_ADDR1'
addr = CALLER_ADDR1;
^~~~~~~~~~~~
include/linux/ftrace.h:703:36: warning: calling '__builtin_return_address' with a nonzero argument is unsafe [-Wframe-address]
# define ftrace_return_address(n) __builtin_return_address(n)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:711:38: note: in expansion of macro 'ftrace_return_address'
#define CALLER_ADDR2 ((unsigned long)ftrace_return_address(2))
^~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:726:9: note: in expansion of macro 'CALLER_ADDR2'
return CALLER_ADDR2;
^~~~~~~~~~~~
include/linux/ftrace.h: In function 'preempt_schedule_notrace':
include/linux/ftrace.h:703:36: warning: calling '__builtin_return_address' with a nonzero argument is unsafe [-Wframe-address]
# define ftrace_return_address(n) __builtin_return_address(n)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:710:38: note: in expansion of macro 'ftrace_return_address'
#define CALLER_ADDR1 ((unsigned long)ftrace_return_address(1))
^~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:723:9: note: in expansion of macro 'CALLER_ADDR1'
addr = CALLER_ADDR1;
^~~~~~~~~~~~
include/linux/ftrace.h:703:36: warning: calling '__builtin_return_address' with a nonzero argument is unsafe [-Wframe-address]
# define ftrace_return_address(n) __builtin_return_address(n)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:711:38: note: in expansion of macro 'ftrace_return_address'
#define CALLER_ADDR2 ((unsigned long)ftrace_return_address(2))
^~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:726:9: note: in expansion of macro 'CALLER_ADDR2'
return CALLER_ADDR2;
^~~~~~~~~~~~
vim +45 include/uapi/linux/sem.h
607ca46e David Howells 2012-10-13 29 struct sem_queue **sem_pending_last; /* last pending operation */
607ca46e David Howells 2012-10-13 30 struct sem_undo *undo; /* undo requests on this array */
607ca46e David Howells 2012-10-13 31 unsigned short sem_nsems; /* no. of semaphores in array */
607ca46e David Howells 2012-10-13 32 };
607ca46e David Howells 2012-10-13 33
607ca46e David Howells 2012-10-13 34 /* Include the definition of semid64_ds */
607ca46e David Howells 2012-10-13 35 #include <asm/sembuf.h>
607ca46e David Howells 2012-10-13 36
607ca46e David Howells 2012-10-13 37 /* semop system calls takes an array of these. */
607ca46e David Howells 2012-10-13 38 struct sembuf {
607ca46e David Howells 2012-10-13 39 unsigned short sem_num; /* semaphore index in array */
607ca46e David Howells 2012-10-13 40 short sem_op; /* semaphore operation */
607ca46e David Howells 2012-10-13 41 short sem_flg; /* operation flags */
607ca46e David Howells 2012-10-13 42 };
607ca46e David Howells 2012-10-13 43
607ca46e David Howells 2012-10-13 44 /* arg for semctl system calls. */
607ca46e David Howells 2012-10-13 @45 union semun {
607ca46e David Howells 2012-10-13 46 int val; /* value for SETVAL */
607ca46e David Howells 2012-10-13 47 struct semid_ds __user *buf; /* buffer for IPC_STAT & IPC_SET */
607ca46e David Howells 2012-10-13 48 unsigned short __user *array; /* array for GETALL & SETALL */
607ca46e David Howells 2012-10-13 49 struct seminfo __user *__buf; /* buffer for IPC_INFO */
607ca46e David Howells 2012-10-13 50 void __user *__pad;
46f40460 Jonas Bonn 2016-09-16 51 } __attribute__ ((transparent_union));
607ca46e David Howells 2012-10-13 52
607ca46e David Howells 2012-10-13 53 struct seminfo {
:::::: The code at line 45 was first introduced by commit
:::::: 607ca46e97a1b6594b29647d98a32d545c24bdff UAPI: (Scripted) Disintegrate include/linux
:::::: TO: David Howells <dhowells@redhat.com>
:::::: CC: David Howells <dhowells@redhat.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2016-09-17 01:40 +0200 |
| Subject | Re: [PATCH 1/7] Apply transparent_union attribute to union semun |
| Message-ID | <siaTE-37g-5@gated-at.bofh.it> |
| In reply to | #1485077 |
[Multipart message — attachments visible in raw view] — view raw
Hi Jonas,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.8-rc6 next-20160916]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]
url: https://github.com/0day-ci/linux/commits/Stafford-Horne/openrisc-Misc-fixes-from-backlog/20160916-230114
config: x86_64-randconfig-b0-09170504 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
cc1: warnings being treated as errors
In file included from include/linux/sem.h:7,
from include/linux/sched.h:35,
from include/linux/kasan.h:4,
from include/linux/slab.h:118,
from include/linux/resource_ext.h:19,
from include/linux/acpi.h:26,
from drivers/gpu/drm/i915/i915_drv.c:30:
>> include/uapi/linux/sem.h:51: error: union cannot be made transparent
vim +51 include/uapi/linux/sem.h
45 union semun {
46 int val; /* value for SETVAL */
47 struct semid_ds __user *buf; /* buffer for IPC_STAT & IPC_SET */
48 unsigned short __user *array; /* array for GETALL & SETALL */
49 struct seminfo __user *__buf; /* buffer for IPC_INFO */
50 void __user *__pad;
> 51 } __attribute__ ((transparent_union));
52
53 struct seminfo {
54 int semmap;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [next] | [standalone]
| From | Stafford Horne <shorne@gmail.com> |
|---|---|
| Date | 2016-09-17 02:10 +0200 |
| Subject | Re: [PATCH 1/7] Apply transparent_union attribute to union semun |
| Message-ID | <sibmF-3x5-5@gated-at.bofh.it> |
| In reply to | #1485436 |
On Sat, 17 Sep 2016, kbuild test robot wrote:
> Hi Jonas,
>
> [auto build test ERROR on linus/master]
> [also build test ERROR on v4.8-rc6 next-20160916]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> [Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
> [Check https://git-scm.com/docs/git-format-patch for more information]
>
> url: https://github.com/0day-ci/linux/commits/Stafford-Horne/openrisc-Misc-fixes-from-backlog/20160916-230114
> config: x86_64-randconfig-b0-09170504 (attached as .config)
> compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> All errors (new ones prefixed by >>):
>
> cc1: warnings being treated as errors
> In file included from include/linux/sem.h:7,
> from include/linux/sched.h:35,
> from include/linux/kasan.h:4,
> from include/linux/slab.h:118,
> from include/linux/resource_ext.h:19,
> from include/linux/acpi.h:26,
> from drivers/gpu/drm/i915/i915_drv.c:30:
>>> include/uapi/linux/sem.h:51: error: union cannot be made transparent
Thanks for catching this. I missed that this would break non openrisc
architectures.
This issue is that "
All members of the union must have the same machine representation; this
is necessary for this argument passing to work properly.
"
Definitely int and * will not always be the same. Investingating what we
can do on in arch/openrisc side without breaking the build/backcompat for
others.
Any other idea's welcome.
-Stafford
> vim +51 include/uapi/linux/sem.h
>
> 45 union semun {
> 46 int val; /* value for SETVAL */
> 47 struct semid_ds __user *buf; /* buffer for IPC_STAT & IPC_SET */
> 48 unsigned short __user *array; /* array for GETALL & SETALL */
> 49 struct seminfo __user *__buf; /* buffer for IPC_INFO */
> 50 void __user *__pad;
> > 51 } __attribute__ ((transparent_union));
> 52
> 53 struct seminfo {
> 54 int semmap;
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
>
[toc] | [prev] | [next] | [standalone]
| From | Stafford Horne <shorne@gmail.com> |
|---|---|
| Date | 2016-09-19 16:50 +0200 |
| Subject | Re: [PATCH 1/7] Apply transparent_union attribute to union semun |
| Message-ID | <sj83o-6ES-13@gated-at.bofh.it> |
| In reply to | #1485077 |
On Mon, 19 Sep 2016, Jonas Bonn wrote:
> NAK... this breaks other architectures.
>
> The OpenRISC toolchain is broken with regard to this issue. Five years ago
> (last I looked) nobody seemed interesting in fixing it. Has anything changed
> here?
Hi Jonas,
This was also pointed out by the automated kbuild system and I replied on
it. I am currently looking at a possible fix of adding an abi compat layer
similar to what arm does with 'arch/arm/kernel/sys_oabi-compat.c'.
By toolchain being broken do you mean the openrisc abi spec is broken as
well? Last I checked gcc does compile as per the spec. But it is not a
very good spec. There have been discussions to change this as well but no
progress.
-Stafford
> On 09/16/2016 04:42 PM, Stafford Horne wrote:
>> ..From: Jonas Bonn <jonas@southpole.se>
>>
>> The syscall handler for semctl is written under the assumption that the
>> toolchain will pass "small" unions as function parameters directly instead
>> of by reference. The union semun is "small" and thus fits this
>> description.
>>
>> Since it is assumed that the union will be passed directly and not by
>> reference, it is safe to access the union members without going via
>> get_user.
>>
>> The OpenRISC architecture, however, passes all unions by reference, thus
>> breaking the above assumption.
>>
>> The technically correct fix here is to mark the union as being transparent
>> so that the ABI of the union's first element determines the parameter
>> passing method and thus make explicit what's already implied in the
>> function
>> definition.
>>
>> Signed-off-by: Jonas Bonn <jonas@southpole.se>
>> Signed-off-by: Stafford Horne <shorne@gmail.com>
>> ---
>> include/uapi/linux/sem.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/uapi/linux/sem.h b/include/uapi/linux/sem.h
>> index dd73b90..aabe50f 100644
>> --- a/include/uapi/linux/sem.h
>> +++ b/include/uapi/linux/sem.h
>> @@ -48,7 +48,7 @@ union semun {
>> unsigned short __user *array; /* array for GETALL & SETALL */
>> struct seminfo __user *__buf; /* buffer for IPC_INFO */
>> void __user *__pad;
>> -};
>> +} __attribute__ ((transparent_union));
>>
>> struct seminfo {
>> int semmap;
>
>
[toc] | [prev] | [next] | [standalone]
| From | Jonas Bonn <jonas@southpole.se> |
|---|---|
| Date | 2016-09-19 16:50 +0200 |
| Subject | Re: [PATCH 1/7] Apply transparent_union attribute to union semun |
| Message-ID | <sj83o-6ES-15@gated-at.bofh.it> |
| In reply to | #1485077 |
NAK... this breaks other architectures.
The OpenRISC toolchain is broken with regard to this issue. Five years
ago (last I looked) nobody seemed interesting in fixing it. Has anything
changed here?
/Jonas
On 09/16/2016 04:42 PM, Stafford Horne wrote:
> ..From: Jonas Bonn <jonas@southpole.se>
>
> The syscall handler for semctl is written under the assumption that the
> toolchain will pass "small" unions as function parameters directly instead
> of by reference. The union semun is "small" and thus fits this description.
>
> Since it is assumed that the union will be passed directly and not by
> reference, it is safe to access the union members without going via
> get_user.
>
> The OpenRISC architecture, however, passes all unions by reference, thus
> breaking the above assumption.
>
> The technically correct fix here is to mark the union as being transparent
> so that the ABI of the union's first element determines the parameter
> passing method and thus make explicit what's already implied in the function
> definition.
>
> Signed-off-by: Jonas Bonn <jonas@southpole.se>
> Signed-off-by: Stafford Horne <shorne@gmail.com>
> ---
> include/uapi/linux/sem.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/sem.h b/include/uapi/linux/sem.h
> index dd73b90..aabe50f 100644
> --- a/include/uapi/linux/sem.h
> +++ b/include/uapi/linux/sem.h
> @@ -48,7 +48,7 @@ union semun {
> unsigned short __user *array; /* array for GETALL & SETALL */
> struct seminfo __user *__buf; /* buffer for IPC_INFO */
> void __user *__pad;
> -};
> +} __attribute__ ((transparent_union));
>
> struct seminfo {
> int semmap;
[toc] | [prev] | [next] | [standalone]
| From | Stafford Horne <shorne@gmail.com> |
|---|---|
| Date | 2016-09-16 17:00 +0200 |
| Message-ID | <si2Mp-63M-11@gated-at.bofh.it> |
| In reply to | #1485066 |
Forgot to CC the new openrisc list. On Fri, 16 Sep 2016, Stafford Horne wrote: > Hello, > > This patch is a small set of fixes from the openrisc backlog. These > changes fix several issues with the openrisc build on modern tool chains > and address other issues which have cropped up as the kernel as it is > being used on newer hardware. > > Please consider for merge. > > On-the-other-hand > > The openrisc project has been missing a kernel maintainer > for some time now. Currently listed in MAINTAINERS is Jonas > and a website that no longer exists. > > > Some mail threads from Jonas > https://lkml.org/lkml/2015/5/13/469 - mail from Jonas mentioning > he is no longer able to maintain > https://lkml.org/lkml/2015/6/11/426 - mail from Jonas mentioning stefan > is to be the new maintainer > > Ideally stefan kristiansson would become the maintainer but he > does not have a PGP key signed by kernel maintainers. Also, he > does not seem to have much time recently. > > We would like some help on how to proceed, options: > - Someone take these patches into a branch that will be pulled > by linus? I can work to maintain the patch queue for openrisc. > - I can work to get a my PGP key signed and send git pull requests > to linus? > > Regards, > Stafford > > > Christian Svensson (1): > openrisc: Add thread-local storage (TLS) support > > Guenter Roeck (1): > openrisc: Support both old (or32) and new (or1k) toolchain > > Jonas Bonn (2): > Apply transparent_union attribute to union semun > openrisc: restore call-saved regs on sigreturn > > Rob Herring (1): > openrisc: remove the redundant of_platform_populate > > Stefan Kristiansson (2): > openrisc: fix PTRS_PER_PGD define > openrisc: add SMP and NR_CPUS Kconfig options > > arch/openrisc/Kconfig | 14 ++++++++++++++ > arch/openrisc/include/asm/pgtable.h | 2 +- > arch/openrisc/kernel/entry.S | 10 +++++++++- > arch/openrisc/kernel/process.c | 13 +++++++++++++ > arch/openrisc/kernel/setup.c | 10 ---------- > arch/openrisc/kernel/vmlinux.lds.S | 8 +++++++- > arch/openrisc/mm/init.c | 2 +- > include/uapi/linux/sem.h | 2 +- > 8 files changed, 46 insertions(+), 15 deletions(-) > > -- > 2.7.4 > >
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | linux.kernel
csiph-web