Re: GSoC Project - Beagle BSP Projects

2021-03-23 Thread Utkarsh Rai
On Tue, Mar 23, 2021 at 9:36 PM Nils Hölscher wrote: > Hi, > > Regarding the PRU. > I was able to load code to the PRU. > However I wasn't able to map IRQ interrupts to the PRU, thus unable to > communicate with it in a meaningful way > Just a small addition, AFAIK the issue with this was the f

Re: GSoC project: Memory protection (Ticket no: 2904)

2021-03-23 Thread Utkarsh Rai
elated to user extension iterators and then making it compatible with existing testsuites should be a long enough task. You can also take up the task of thread stack sharing if this is resolved early. > Thanks and regards, > Rajiv > > On Tue, 23 Mar 2021 at 16:15, Utkarsh Rai wrote: >

Re: GSoC project: Memory protection (Ticket no: 2904)

2021-03-23 Thread Utkarsh Rai
On Mon, Mar 22, 2021 at 9:54 PM Gedare Bloom wrote: > Hi Rajiv, > > On Sat, Mar 20, 2021 at 12:40 AM Rajiv Vaidyanathan > wrote: > > > > Hello RTEMS community, > Hello Rajiv, > > > > I am interested in the ticket: Memory protection. I saw that this topic > has been pursued a few times in GSoC

Re: Memory Protection related project for GSOC

2021-02-20 Thread Utkarsh Rai
On Sun, Feb 21, 2021 at 12:00 AM Gedare Bloom wrote: > Hi Sanskar, > > We had a student (Utkarsh) work on this project last year. I have CC'd > him here, and he may be able to suggest some ideas/updates. > > On Sat, Feb 20, 2021 at 7:17 AM Sanskar Khandelwal > wrote: > > > > Hello, > Hello Sans

Re: Report on failing tests with thread stack protection and their resolution.

2021-01-26 Thread Utkarsh Rai
On Tue, Jan 26, 2021 at 9:33 PM Gedare Bloom wrote: > > > On Tue, Jan 26, 2021 at 8:24 AM Sebastian Huber < > sebastian.hu...@embedded-brains.de> wrote: > >> On 23/01/2021 07:27, Utkarsh Rai wrote: >> >> > The issue that remains is of User extensi

Re: Report on failing tests with thread stack protection and their resolution.

2021-01-24 Thread Utkarsh Rai
On Sat, Jan 23, 2021 at 9:29 PM Joel Sherrill wrote: > > > On Sat, Jan 23, 2021, 12:28 AM Utkarsh Rai > wrote: > >> >> >> On Mon, Dec 7, 2020 at 8:00 AM Utkarsh Rai >> wrote: >> >>> >>> >>> On Thu, Dec 3, 2020 at 10:22 P

Re: Report on failing tests with thread stack protection and their resolution.

2021-01-22 Thread Utkarsh Rai
On Mon, Dec 7, 2020 at 8:00 AM Utkarsh Rai wrote: > > > On Thu, Dec 3, 2020 at 10:22 PM Gedare Bloom wrote: > >> >> >> On Wed, Dec 2, 2020 at 5:53 PM Utkarsh Rai >> wrote: >> >>> Hello, >>> As discussed in this >>> <h

Re: Report on failing tests with thread stack protection and their resolution.

2020-12-17 Thread Utkarsh Rai
On Thu, Dec 17, 2020 at 8:23 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > Hello, > > On 03/12/2020 01:53, Utkarsh Rai wrote: > > +rtems_status_code _Memory_protection_Disable( void ) > > +{ > > + uint32_t access_flags; > >

Re: Report on failing tests with thread stack protection and their resolution.

2020-12-08 Thread Utkarsh Rai
On Thu, Dec 3, 2020 at 10:22 PM Gedare Bloom wrote: > > > On Wed, Dec 2, 2020 at 5:53 PM Utkarsh Rai > wrote: > >> Hello, >> As discussed in this >> <https://lists.rtems.org/pipermail/devel/2020-November/063341.html> thread, >> I have compiled a

Report on failing tests with thread stack protection and their resolution.

2020-12-02 Thread Utkarsh Rai
Hello, As discussed in this thread, I have compiled a list of the tests that deal with inter stack communication and fail with the thread stack protection option. Most of these tests pass when, as Sebastian suggested and had provid

Re: [PATCH v4 0/1] Test for clock_nanosleep() with CLOCK_MONOTONIC option

2020-11-30 Thread Utkarsh Rai
Hello, Is there any update on this patch? On Wed, Oct 28, 2020 at 7:04 PM Utkarsh Rai wrote: > Ping. > > On Wed, Oct 21, 2020 at 8:58 AM Utkarsh Rai > wrote: > >> This patch has the tests for clock_nanosleep with the CLOCK_MONOTONIC >> option. >> The psxtests

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-19 Thread Utkarsh Rai
On Thu, Nov 19, 2020 at 11:39 PM Gedare Bloom wrote: > Hi Utkarsh, > > On Thu, Nov 19, 2020 at 4:59 AM Sebastian Huber > wrote: > > > > On 19/11/2020 11:47, Utkarsh Rai wrote: > > > > > There are a couple of other areas in RTEMS in which the stack of

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-10 Thread Utkarsh Rai
On Thu, Nov 5, 2020 at 11:45 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 04/11/2020 19:38, Gedare Bloom wrote: > > >> Based on the above suggestions I tried to move the > User_extensions_Iterator storage to the TCB by adding a new field to the > structure, but that did n

Re: [PATCH v4 0/1] Test for clock_nanosleep() with CLOCK_MONOTONIC option

2020-11-05 Thread Utkarsh Rai
On Thu, Nov 5, 2020 at 12:13 AM Gedare Bloom wrote: > i need to find time to look at this, and try it out. > > Does this compile? e.g., I don't see a definition of OPERATION_COUNT > Yes, the OPERATION_COUNT is defined in "timesys.h". > > On Wed, Oct 28, 202

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-01 Thread Utkarsh Rai
On Fri, Oct 23, 2020 at 10:28 PM Utkarsh Rai wrote: > > > On Fri, Oct 23, 2020 at 9:57 PM Gedare Bloom wrote: > >> On Fri, Oct 23, 2020 at 9:37 AM Utkarsh Rai >> wrote: >> > >> > >> > >> > On Thu, Oct 22, 2020 at 11:23 PM Se

Re: [PATCH v4 0/1] Test for clock_nanosleep() with CLOCK_MONOTONIC option

2020-10-28 Thread Utkarsh Rai
Ping. On Wed, Oct 21, 2020 at 8:58 AM Utkarsh Rai wrote: > This patch has the tests for clock_nanosleep with the CLOCK_MONOTONIC > option. > The psxtests/psxclocknanosleep01/.. tests for valid timeout values as well > as > for the effect on timeout delay when REALTIME clock

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-10-23 Thread Utkarsh Rai
On Fri, Oct 23, 2020 at 9:57 PM Gedare Bloom wrote: > On Fri, Oct 23, 2020 at 9:37 AM Utkarsh Rai > wrote: > > > > > > > > On Thu, Oct 22, 2020 at 11:23 PM Sebastian Huber < > sebastian.hu...@embedded-brains.de> wrote: > >> > >> On 22/

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-10-23 Thread Utkarsh Rai
On Thu, Oct 22, 2020 at 11:23 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 22/10/2020 02:40, Utkarsh Rai wrote: > > > Hello, this thread has gone a bit cold over the last few weeks, due to > > my engagement in the university tests. I have provid

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-10-21 Thread Utkarsh Rai
been set to NO-ACCESS during the context switch. Is there any work-around to this? On Tue, Sep 22, 2020 at 8:28 PM Utkarsh Rai wrote: > > > > On Mon, Sep 21, 2020 at 10:29 PM Gedare Bloom wrote: > >> On Sat, Sep 19, 2020 at 5:41 AM Utkarsh Rai >> wrote: >>

[PATCH v4 0/1] Test for clock_nanosleep() with CLOCK_MONOTONIC option

2020-10-20 Thread Utkarsh Rai
(yielding and blocking). Utkarsh Rai (1): Test for clock_nanosleep() with CLOCK_MONOTONIC option .../psxtests/psxclocknanosleep01.yml | 19 +++ spec/build/testsuites/psxtmtests/grp.yml | 4 + .../psxtmtests/psxtmclocknanosleep04.yml | 19 +++ .../psxtmtests

[PATCH v4 1/1] Test for clock_nanosleep() with CLOCK_MONOTONIC option

2020-10-20 Thread Utkarsh Rai
-SA-4.0 OR BSD-2-Clause +build-type: test-program +cflags: [] +copyrights: +- Copyright (C) 2020 Utkarsh Rai(utkarsh.ra...@gmail.com) +cppflags: [] +cxxflags: [] +enabled-by: true +features: c cprogram +includes: [] +ldflags: [] +links: [] +source: +- testsuites/psxtests/psxclocknanosleep01/init.c

Error while using the trace linker

2020-09-28 Thread Utkarsh Rai
Hello, I am following the tracing example as mentioned in the docs for sparc/erc32 BSP. When I run the "rtems-tld" command, I get the following error - "error: /home/utkarsh/sandbox/bsps/sparc: Invalid RTEMS path" My directory st

Re: [PATCH v4] Test for clock_nanosleep() with CLOCK_MONOTONIC option

2020-09-28 Thread Utkarsh Rai
what I have implemented. I will change this. > > > On Mon, Sep 21, 2020 at 9:15 AM Utkarsh Rai > wrote: > > > > From: Utkarsh > Please use full (legal) name for commit metadata > > > > > Closes #3890 > > > > Signed-off-by: Utkarsh Rai > &

Re: [PATCH v4] Test for clock_nanosleep() with CLOCK_MONOTONIC option

2020-09-25 Thread Utkarsh Rai
Hello, Can someone please review this. I would like to work on the suggested changes over the weekend. On Mon, Sep 21, 2020 at 8:45 PM Utkarsh Rai wrote: > From: Utkarsh > > Closes #3890 > > Signed-off-by: Utkarsh Rai > --- > spec/build/testsuites/psxtests

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-09-22 Thread Utkarsh Rai
On Mon, Sep 21, 2020 at 10:29 PM Gedare Bloom wrote: > On Sat, Sep 19, 2020 at 5:41 AM Utkarsh Rai > wrote: > > > > Hello, > > When I isolate more than two threads in RTEMS (the implementation can be > found here), I get fatal exceptions while context-switching. On st

[PATCH v4] Test for clock_nanosleep() with CLOCK_MONOTONIC option

2020-09-21 Thread Utkarsh Rai
From: Utkarsh Closes #3890 Signed-off-by: Utkarsh Rai --- spec/build/testsuites/psxtests/grp.yml| 2 + .../psxtests/psxclocknanosleep01.yml | 20 +++ .../psxtests/psxclocknanosleep01/init.c | 94 ++ .../psxclocknanosleep01.doc | 13

Fatal exceptions on context-switching for more than two isolated threads

2020-09-19 Thread Utkarsh Rai
Hello, When I isolate more than two threads in RTEMS (the implementation can be found here ), I get fatal exceptions while context-switching. On stepping into the code, the problem seems to be with the _User_extensions_T

Re: devel Digest, Vol 106, Issue 81

2020-09-16 Thread Utkarsh Rai
On Mon, Sep 14, 2020 at 5:30 PM wrote: > Send devel mailing list submissions to > devel@rtems.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.rtems.org/mailman/listinfo/devel > or, via email, send a message with subject or body 'help' to >

Re: How to use _Thread_Get() function properly?

2020-08-31 Thread Utkarsh Rai
Thanks, I'll check it out. On Mon, Aug 31, 2020 at 11:35 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 31/08/2020 19:52, Utkarsh Rai wrote: > > > Hello, > > I have been trying to get the pointer to the control block of a thread > > u

How to use _Thread_Get() function properly?

2020-08-31 Thread Utkarsh Rai
Hello, I have been trying to get the pointer to the control block of a thread using the _Thread_Get() function for stack sharing using a shared-memory object, the implementation can be seen here . The problem is when

Re: GSoC 2020 - Final project report

2020-08-30 Thread Utkarsh Rai
n, Aug 30, 2020 at 4:55 AM Utkarsh Rai > wrote: > > > > I have updated my post with the help of all of your suggestions. As > @Niteesh G. S. said, sorry to disturb you on a weekend but please take a > look. > > > > On Sat, Aug 29, 2020 at 6:03 PM Utkarsh Rai > wrote

Re: GSoC 2020 - Final project report

2020-08-30 Thread Utkarsh Rai
I have updated my post with the help of all of your suggestions. As @Niteesh G. S. said, sorry to disturb you on a weekend but please take a look. On Sat, Aug 29, 2020 at 6:03 PM Utkarsh Rai wrote: > > > On Sat, Aug 29, 2020 at 3:59 PM Hesham Almatary < > hesham.almat...@cl.c

Re: GSoC 2020 - Final project report

2020-08-29 Thread Utkarsh Rai
t demos) and on which platform? A HOWTO > guide/blogpost will be great. > Currently no, as there are a couple more tests that I want to get reviewed. I will update my post according to your suggestions by today > > On Sat, 29 Aug 2020 at 00:51, Utkarsh Rai wrote: > > > > &

Re: GSoC 2020 - Final project report

2020-08-28 Thread Utkarsh Rai
On Sat, Aug 29, 2020 at 4:18 AM Gedare Bloom wrote: > Similarly, I would like to have a consolidated set of links to "your > code" instead of having them woven in with the narrative and links to > blogs etc. > > Ok, I will do that. > On Thu, Aug 27, 2020 at

GSoC 2020 - Final project report

2020-08-27 Thread Utkarsh Rai
Hello, I have prepared a tentative final report for my project. You can view it here . Note there are few changes to be made in the report based on my progress this week as I am working on static initialization of PMP and

Re: mmap shared stack design was: [PATCH v4 1/3] Strict thread-stack isolation

2020-08-24 Thread Utkarsh Rai
On Mon, Aug 24, 2020 at 9:34 PM Gedare Bloom wrote: > On Sat, Aug 22, 2020 at 11:27 PM Utkarsh Rai > wrote: > > > > > > > > On Sat, Aug 22, 2020 at 11:32 PM Gedare Bloom wrote: > >> > >> I have some comments below. I'm not that happy with th

Re: [PATCH v4 1/3] Strict thread-stack isolation

2020-08-22 Thread Utkarsh Rai
o also comment on stylistic problems, and when some decisions you > make while coding end up not being correct or aren't easily understood > during code review then you might have to spend more time recoding. It > can be hard to find the balance between design and code reviews, > > On Sat

[PATCH v4 1/3] Strict thread-stack isolation

2020-08-22 Thread Utkarsh Rai
/ + +/* + * Copyright (C) 2020 Utkarsh Rai + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list o

[PATCH v4 2/3] High level configuration option for thread stack protection

2020-08-22 Thread Utkarsh Rai
-4.0 OR BSD-2-Clause +actions: +- get-boolean: null +- env-enable: null +- define-condition: null +build-type: option +copyrights: +- Copyright (C) 2020 Utkarsh Rai (utkarsh.ra...@gmail.com) +default: false +default-by-variant: [] +description: | + Enable the thread stack protection support +enabled

[PATCH v4 3/3] Thread stack sharing

2020-08-22 Thread Utkarsh Rai
For the design details of the stack sharing mechanism please refer to the following post - https://gsoc2020memoryprotection.blogspot.com/2020/08/high-level-design-and-implementation-of.html --- cpukit/posix/src/mmap.c | 39 - cpukit/posix/src/shmopen.c

Re: Context switching through an ISR in RTEMS

2020-08-17 Thread Utkarsh Rai
On Mon, Aug 17, 2020 at 10:12 PM Gedare Bloom wrote: > On Mon, Aug 17, 2020 at 10:30 AM Utkarsh Rai > wrote: > > > > > > > > On Mon, Aug 17, 2020 at 9:24 PM Gedare Bloom wrote: > >> > >> On Mon, Aug 17, 2020 at 5:53 AM Utkarsh Rai > wrote:

Re: Context switching through an ISR in RTEMS

2020-08-17 Thread Utkarsh Rai
On Mon, Aug 17, 2020 at 9:24 PM Gedare Bloom wrote: > On Mon, Aug 17, 2020 at 5:53 AM Utkarsh Rai > wrote: > > > > > > > > On Mon, Aug 17, 2020 at 11:32 AM Sebastian Huber < > sebastian.hu...@embedded-brains.de> wrote: > >

Re: Context switching through an ISR in RTEMS

2020-08-17 Thread Utkarsh Rai
On Mon, Aug 17, 2020 at 11:32 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 16/08/2020 18:09, Utkarsh Rai wrote: > > > > > > > On Sun, Aug 16, 2020 at 9:18 PM Gedare Bloom > <mailto:ged...@rtems.org>> wrote: > > >

Re: Context switching through an ISR in RTEMS

2020-08-16 Thread Utkarsh Rai
On Sun, Aug 16, 2020 at 9:18 PM Gedare Bloom wrote: > On Sat, Aug 15, 2020 at 9:03 PM Utkarsh Rai > wrote: > > > > > > > > On Sun, Aug 16, 2020 at 6:12 AM Utkarsh Rai > wrote: > >> > >> > >> > >> On Sat, Aug 15, 2020 at 7:2

Re: Context switching through an ISR in RTEMS

2020-08-15 Thread Utkarsh Rai
On Sun, Aug 16, 2020 at 6:12 AM Utkarsh Rai wrote: > > > On Sat, Aug 15, 2020 at 7:26 PM Gedare Bloom wrote: > >> On Sat, Aug 15, 2020 at 6:26 AM Utkarsh Rai >> wrote: >> > >> > >> > On Thu, Aug 13, 2020 at 5:10 AM Utkarsh Rai >> wrote

Re: Context switching through an ISR in RTEMS

2020-08-15 Thread Utkarsh Rai
On Sat, Aug 15, 2020 at 7:26 PM Gedare Bloom wrote: > On Sat, Aug 15, 2020 at 6:26 AM Utkarsh Rai > wrote: > > > > > > On Thu, Aug 13, 2020 at 5:10 AM Utkarsh Rai > wrote: > >> > >> Thanks, I'll check them out. > >> > >> On T

Re: Context switching through an ISR in RTEMS

2020-08-15 Thread Utkarsh Rai
On Thu, Aug 13, 2020 at 5:10 AM Utkarsh Rai wrote: > Thanks, I'll check them out. > > On Thu, Aug 13, 2020 at 12:56 AM Gedare Bloom wrote: > >> On Wed, Aug 12, 2020 at 11:33 AM Utkarsh Rai >> wrote: >> > >> > Hello, >> > I have been te

Re: [PATCH] Strict thread-stack isolation and thread-stack sharing.

2020-08-14 Thread Utkarsh Rai
On Sat, Aug 15, 2020 at 12:39 AM Gedare Bloom wrote: > On Fri, Aug 14, 2020 at 9:25 AM Utkarsh Rai > wrote: > > > > Sorry for the late reply, I somehow missed the mail notification! > > > > On Thu, Aug 13, 2020 at 9:35 PM Gedare Bloom wrote: > >> >

Re: [PATCH] Strict thread-stack isolation and thread-stack sharing.

2020-08-14 Thread Utkarsh Rai
Sorry for the late reply, I somehow missed the mail notification! On Thu, Aug 13, 2020 at 9:35 PM Gedare Bloom wrote: > On Thu, Aug 13, 2020 at 9:06 AM Utkarsh Rai > wrote: > > > > -This patch provides thread-stack isolation and thread-stack sharing > > mech

[PATCH] Strict thread-stack isolation and thread-stack sharing.

2020-08-13 Thread Utkarsh Rai
evel memory protection + * + */ + +/* + * Copyright (C) 2020 Utkarsh Rai + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyrig

Strict thread stack isolation and sharing

2020-08-13 Thread Utkarsh Rai
Following is the complete set of changes for thread stack isolation and sharing. Configuration for thread stack isolation. > The configuration for thread stack isolation is based upon the new build system. > The RTEMS_THREAD_STACK_PROTECTION option needs to be specified and set to 'True' for en

Re: Context switching through an ISR in RTEMS

2020-08-12 Thread Utkarsh Rai
Thanks, I'll check them out. On Thu, Aug 13, 2020 at 12:56 AM Gedare Bloom wrote: > On Wed, Aug 12, 2020 at 11:33 AM Utkarsh Rai > wrote: > > > > Hello, > > I have been testing my code for thread stack isolation against various > tests( Some written by me, and

Re: [PATCH v2] Test for clock_nanosleep with CLOCK_MONOTONIC option.

2020-08-12 Thread Utkarsh Rai
t;>> On Tue, Apr 14, 2020 at 10:56 PM Sebastian Huber >>> wrote: >>> > >>> > Hello Utkarsh Rai, >>> > >>> > do we really need a new test program for this test case? I would prefer >>> > add it to an existing test program o

Context switching through an ISR in RTEMS

2020-08-12 Thread Utkarsh Rai
Hello, I have been testing my code for thread stack isolation against various tests( Some written by me, and remaining already present). One of the limitations that I have found is that I encounter fatal errors whenever a context switch takes place through an ISR. Can you please explain how the con

Re: Configuration option for thread-stack protection.

2020-08-06 Thread Utkarsh Rai
On Thu, Aug 6, 2020 at 8:34 PM Gedare Bloom wrote: > On Thu, Aug 6, 2020 at 6:21 AM Sebastian Huber > wrote: > > > > On 06/08/2020 14:12, Utkarsh Rai wrote: > > > > > Hello, > > > The thread-stack protection needs to be configured by the user. Two

Configuration option for thread-stack protection.

2020-08-06 Thread Utkarsh Rai
Hello, The thread-stack protection needs to be configured by the user. Two of the options that need configuring during build time are - > Enabling thread stack protection ( THREAD_STACK_PROTECTION )- This is a high-level option similar to RTEMS_SMP, RTEMS_POSIX_API etc. > Size of the MMU pages - T

Re: Error while building realview_pbx_a9 BSP with the new build system

2020-08-03 Thread Utkarsh Rai
n Mon, Aug 3, 2020 at 10:47 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 03/08/2020 18:32, Gedare Bloom wrote: > > > On Mon, Aug 3, 2020 at 10:27 AM Sebastian Huber > > wrote: > >> On 03/08/2020 18:25, Gedare Bloom wrote: > >> &g

Re: Error while building realview_pbx_a9 BSP with the new build system

2020-08-03 Thread Utkarsh Rai
On Mon, Aug 3, 2020 at 9:56 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 03/08/2020 18:17, Utkarsh Rai wrote: > > > When I use the above branch I get the following error on './waf > > install ' - > > > > Build failed >

Re: Design issues with thread-stack isolation/sharing.

2020-08-03 Thread Utkarsh Rai
On Mon, Aug 3, 2020 at 9:35 PM Gedare Bloom wrote: > On Sun, Aug 2, 2020 at 5:46 AM Utkarsh Rai > wrote: > > > > > > > > On Sat, Aug 1, 2020 at 10:51 PM Gedare Bloom wrote: > >> > >> On Sat, Aug 1, 2020 at 10:38 AM Utkarsh Rai > wrote: >

Re: Error while building realview_pbx_a9 BSP with the new build system

2020-08-03 Thread Utkarsh Rai
mkdir self.parent.mkdir() File "/home/utkarsh/new_build/rtems/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Node.py", line 188, in mkdir raise Errors.WafError('Could not create the directory %r'%self) WafError: Could not create the directory /opt/rtems On Mon, Aug 3, 2020 at 9:42 PM Se

Error while building realview_pbx_a9 BSP with the new build system

2020-08-03 Thread Utkarsh Rai
Hello, I have been trying out the new build system. Unfortunately, while building for the realview_pbx_a9 BSP I get the following error on ' ./waf install ' - " Waf: Entering directory `/home/utkarsh/new_build/rtems/build' Waf: Leaving directory `/home/utkarsh/new_build/rtems/build' 'install' fin

Re: Design issues with thread-stack isolation/sharing.

2020-08-02 Thread Utkarsh Rai
On Sat, Aug 1, 2020 at 10:51 PM Gedare Bloom wrote: > On Sat, Aug 1, 2020 at 10:38 AM Utkarsh Rai > wrote: > > > > This thread is an attempt to consolidate and resolve all the issues that > have been raised related to my patches- 1. > https://lists.rtems.org/pipermai

Design issues with thread-stack isolation/sharing.

2020-08-01 Thread Utkarsh Rai
This thread is an attempt to consolidate and resolve all the issues that have been raised related to my patches- 1. https://lists.rtems.org/pipermail/devel/2020-July/060675.html and 2. https://lists.rtems.org/pipermail/devel/2020-July/061056.html. I intend to first resolve all the issues through th

[PATCH] Strict thread-stack isolation and thread-stack sharing.

2020-07-31 Thread Utkarsh Rai
ryprotection.h @@ -0,0 +1,82 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSScoreMemoryprotection + * + * @brief This file provodes APIs for high-level memory protection + * + */ + +/* + * Copyright (C) 2020 Utkarsh Rai + * + * Redistribution and use in sour

Re: Translation table for small pages in ARMv7 MMU conflicting with other data regions

2020-07-29 Thread Utkarsh Rai
Thanks, I'll check it out. On Wed, Jul 29, 2020 at 9:36 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 29/07/2020 18:02, Utkarsh Rai wrote: > > > The translation table for ARMv7 MMU starts at 0x10 and extends up > > to 0x104000 for sect

Translation table for small pages in ARMv7 MMU conflicting with other data regions

2020-07-29 Thread Utkarsh Rai
The translation table for ARMv7 MMU starts at 0x10 and extends up to 0x104000 for section-based pages. Although for small pages it extends up to 0x504000 this possibly conflicts with other data regions and setting up of translation table for smaller pages fails. I realize that various data regi

Re: Segmentation fault whie setting up translation table for small pages in ARMv7 MMU

2020-07-26 Thread Utkarsh Rai
On Sun, Jul 26, 2020 at 9:12 PM Hesham Almatary < hesham.almat...@cl.cam.ac.uk> wrote: > > > On Sun, Jul 26, 2020 at 2:04 PM Utkarsh Rai > wrote: > >> Hello, >> I was facing issues while changing the memory entries for a section. The >> thread can be

Segmentation fault whie setting up translation table for small pages in ARMv7 MMU

2020-07-26 Thread Utkarsh Rai
Hello, I was facing issues while changing the memory entries for a section. The thread can be viewed here . The error is most probably due to the fact that while I change the memory entry of my desired region it ends up changing the mem

Re: Fatal exception while changing the memory entries in ARMv7 MMU

2020-07-25 Thread Utkarsh Rai
> On Sat, Jul 25, 2020 at 9:44 AM Utkarsh Rai > wrote: > > > > Hello, > > While changing the memory entries for a section in the ARMv7 MMU using > 'arm_cp15_set_translation_table_entries()' I get fatal exception error. On > stepping through the debugger, the

Fatal exception while changing the memory entries in ARMv7 MMU

2020-07-25 Thread Utkarsh Rai
Hello, While changing the memory entries for a section in the ARMv7 MMU using 'arm_cp15_set_translation_table_entries()' I get fatal exception error. On stepping through the debugger, the exception occurs when invalidating the data TLB entries, using 'arm_cp15_tlb_data_invalidate_entry()'. You can

Re: GSoC: Correct placement and naming of memory protection APIs

2020-07-18 Thread Utkarsh Rai
cing this in the score? (If you look into my commit history, I have fiddled with the placement quite a bit without any resolution). > > > On Fri, 17 Jul 2020 at 21:33, Utkarsh Rai wrote: > > > > Hello, > > In RTEMS each set of BSP has its own MMU implementation, for uti

GSoC: Correct placement and naming of memory protection APIs

2020-07-17 Thread Utkarsh Rai
Hello, In RTEMS each set of BSP has its own MMU implementation, for utilizing this for high-level operations such as thread-stack protection we need a common interface that is implemented for each BSP but is available for high-level operations ( Something along the lines of the cache manager ), my

GSoC: Disabling interrupts while modifying translation table entries for armv7-A MMU.

2020-07-17 Thread Utkarsh Rai
Hello, The translation table setting code has _ARM_Data_synchronization_barrier() before and after invalidating the instruction and data TLB entry, this ensures synchronization of instructions for the TLB invalidation in case of multiple cores. My question is, do we have to explicitly disable inter

Re: [PATCH v2] Strict thread-stack isolation

2020-07-17 Thread Utkarsh Rai
On Fri, Jul 17, 2020 at 11:08 AM Gedare Bloom wrote: > Is this code working? how do you test it? > > There are several points buried below that you might need to bring out > to separate threads for discussion, while you work on the code. > > On Thu, Jul 16, 2020 at 5:34 AM Ut

[PATCH v2] Thread-stack isolation

2020-07-16 Thread Utkarsh Rai
The following is the rectified patch and does not break the build. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

[PATCH v2] Strict thread-stack isolation

2020-07-16 Thread Utkarsh Rai
c680 --- /dev/null +++ b/cpukit/include/rtems/score/memorymanagement.h @@ -0,0 +1,89 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSScoreMemorymanagement + * + * @brief This file provodes APIs for high-level memory management + * + */ + +/* + * Copyright (C)

Re: [PATCH v2] Strict thread-stack isolation

2020-07-16 Thread Utkarsh Rai
Kindly ignore this patch. It breaks the build. On Thu, Jul 16, 2020 at 4:54 PM Utkarsh Rai wrote: > - This is the complete set of changes for strict isolation of thread > stacks. > - There needs to be a confiuration operation,(#if > defined(USE_THREAD_STACK_PROTECTION) for simple c

[PATCH v2] Strict thread-stack isolation

2020-07-16 Thread Utkarsh Rai
c680 --- /dev/null +++ b/cpukit/include/rtems/score/memorymanagement.h @@ -0,0 +1,89 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSScoreMemorymanagement + * + * @brief This file provodes APIs for high-level memory management + * + */ + +/* + * Copyright (C)

Re: [PATCH] Strict thread-stack isolation

2020-07-14 Thread Utkarsh Rai
On Tue, Jul 14, 2020 at 7:36 PM Gedare Bloom wrote: > I won't comment on the namespace and coding conventions, other than to > say you should focus on doing them correctly as you code, rather than > going back and fixing them later. More below. > > On Mon, Jul 13, 2020 at

Re: [PATCH] Strict thread-stack isolation

2020-07-14 Thread Utkarsh Rai
the code format? Have you looked at > > https://docs.rtems.org/branches/master/eng/coding.html > > ? > Yes, sorry, I realize I need to do a better job with the coding standard and maintaining namespace consistency. I will rectify this. > On 13/07/2020 18:33, Utkarsh Rai wrote: &g

[PATCH] Strict thread-stack isolation

2020-07-13 Thread Utkarsh Rai
- This is the complete set of changes for strict isolation of thread stacks. - There needs to be a confiuration operation,(#if defined(USE_THREAD_STACK_PROTECTION) for simple configuration can be used) - The stack attributes are allocated through malloc, this needs to be done through score unlimi

Re: Converting stack address to shared-memory object name

2020-07-09 Thread Utkarsh Rai
On Thu, Jul 9, 2020 at 8:57 PM Gedare Bloom wrote: > On Thu, Jul 9, 2020 at 9:24 AM Gedare Bloom wrote: > > > > On Wed, Jul 8, 2020 at 10:08 PM Utkarsh Rai > wrote: > > > > > > > > > > > > > > > On Wed, Jul 8, 2020 at 6:56 PM Ge

Re: Converting stack address to shared-memory object name

2020-07-08 Thread Utkarsh Rai
On Wed, Jul 8, 2020 at 6:56 PM Gedare Bloom wrote: > On Wed, Jul 8, 2020 at 6:53 AM Sebastian Huber > wrote: > > > > On 08/07/2020 14:43, Utkarsh Rai wrote: > > > > > Hello, > > > For my GSoC project, I have to provide high-level APIs for sharing > &

Converting stack address to shared-memory object name

2020-07-08 Thread Utkarsh Rai
Hello, For my GSoC project, I have to provide high-level APIs for sharing isolated stacks. The POSIX compliant high-level way of sharing stacks can be to create a shared memory object of the stack to be shared through shm_open and then mmap that to the address space of the current stack. My doubt i

Re: Applying an operation to a set of threads in RTEMS

2020-07-03 Thread Utkarsh Rai
> > > > My thought is that it matches what is needed and is expected to be > optimized. > > > >> On Jul 3, 2020, at 24:37 , Utkarsh Rai wrote: > >> > >> > >> > >> On Fri, Jul 3, 2020 at 1:32 AM Peter Dufault wrote: > >> I f

Re: Applying an operation to a set of threads in RTEMS

2020-07-02 Thread Utkarsh Rai
On Fri, Jul 3, 2020 at 1:32 AM Peter Dufault wrote: > I finally have gotten to reviewing Utkarsh's work in GSOC. One item that > I don't like is that there is a linked list management of the threads that > have access to the stack. > I think this access is similar to the file descriptors that ar

Re: [PATCH] Assembly suppport for context switch and bug fixes

2020-06-29 Thread Utkarsh Rai
rates your > idea for review. Should I squash all of my commits and send it as a single patch (along with the changes suggested in this one) or break it into multiple patches? > More below: > > On Mon, Jun 29, 2020 at 8:48 AM utkarsh.ra...@gmail.com > wrote: > > > > F

Verfication of context-switching mechanism for protected stacks

2020-06-29 Thread Utkarsh Rai
The following patch provides a context-switching mechanism for protected stacks. This is not a mergeable patch. I want to have feedback on the mechanism. > I have added 'stack_attribute' to the 'Context_Control' structure. > On a call to 'Context_Initialize()'. the 'stack_attribute' field is initia

Offset locations of registers in ARM context-switch code

2020-06-27 Thread Utkarsh Rai
Hello, The 'Context_Control' structure in score/.../arm/cpu.h has registers and attributes that need to be saved during context-switching. Some of these registers/attributes are conditionally compiled depending upon the mode in which the processor is running. The registers are saved by 'ldr' instru

Re: Context switching for protected stacks

2020-06-18 Thread Utkarsh Rai
On Fri, Jun 19, 2020 at 3:04 AM Gedare Bloom wrote: > On Thu, Jun 18, 2020 at 8:03 AM Utkarsh Rai > wrote: > > > > > > > > On Thu, Jun 18, 2020 at 6:34 PM Gedare Bloom wrote: > >> > >> On Wed, Jun 17, 2020 at 11:17 PM Utkarsh Rai > wrote:

Re: Context switching for protected stacks

2020-06-18 Thread Utkarsh Rai
On Thu, Jun 18, 2020 at 6:34 PM Gedare Bloom wrote: > On Wed, Jun 17, 2020 at 11:17 PM Utkarsh Rai > wrote: > > > > Hello, > > For my GSoC project, I need to set/unset the memory attributes of the > thread stacks on each context switch. > > Right now I am m

Context switching for protected stacks

2020-06-17 Thread Utkarsh Rai
Hello, For my GSoC project, I need to set/unset the memory attributes of the thread stacks on each context switch. Right now I am making changes to the CPU-specific context switch assembly code. The arm/../cpu.h file has the Context_Control structure, which is used to store the relevant registers a

Re: Help in figuring out score objects in RTEMS and ticket #3131

2020-06-15 Thread Utkarsh Rai
On Mon, Jun 15, 2020 at 6:46 PM Joel Sherrill wrote: > > > On Wed, Jun 10, 2020 at 7:34 PM Utkarsh Rai > wrote: > >> Hello, >> For my GSoC project, user-configurable thread stack protection, I need to >> track, allocate, and manipulate attributes of shar

Re: Help in figuring out score objects in RTEMS and ticket #3131

2020-06-15 Thread Utkarsh Rai
e have to define the mmap_h in the IMFS file system layer(as I could not find an implementation for this handler) and then register it in the file_handlers table and then use this in mmap? Or do we already have a generic mmap_h implementation that I can use? On Thu, Jun 11, 2020 at 6:04 AM Utkarsh R

Help in figuring out score objects in RTEMS and ticket #3131

2020-06-10 Thread Utkarsh Rai
Hello, For my GSoC project, user-configurable thread stack protection, I need to track, allocate, and manipulate attributes of shared as well as protected stacks. Dr.Gedare suggested that tracking them with score objects would be a good idea. He also indicated a good place to start and understand s

Re: Setting up the TTBR0 and TTBR1 register for thread stack protection in ARMv7-A MMU

2020-06-05 Thread Utkarsh Rai
ables for more > fine-grained page sizes. No this will not be an issue, we can set the bits[1:0] of the table-entry to account for the levels of page tables. I was thinking about ways to simplify the implementation of stack allocation, but doing this is definitely not feasible. > O

Setting up the TTBR0 and TTBR1 register for thread stack protection in ARMv7-A MMU

2020-06-04 Thread Utkarsh Rai
Hello, Section B3.3.3 of the ARMv7-A Reference manual says that we can have TTBR0 and 1 split up the address space into two parts, where each register has the address of the translation table base of the divid

Re: Error in building application with rpi BSP with waf build system

2020-05-31 Thread Utkarsh Rai
On Mon, Jun 1, 2020 at 9:32 AM Utkarsh Rai wrote: > Hello, > > I was unable to build a sample app for raspberrypi, I followed the docs > <https://docs.rtems.org/branches/master/user/start/app.html> and was able > to build the app for Xilinx-qemu and beagleboard. > > Th

Error in building application with rpi BSP with waf build system

2020-05-31 Thread Utkarsh Rai
gure command. Is there a typo in my configure command or the waf build does not support raspberrypi BSP? Kindly point out my error. Regards, Utkarsh Rai. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

Re: Help on how to configure for user-defined memory protection support (GSoC 2020)

2020-05-28 Thread Utkarsh Rai
On Wed, May 27, 2020 at 8:29 PM Gedare Bloom wrote: > On Tue, May 26, 2020 at 6:12 PM Utkarsh Rai > wrote: > > > > > > > > On Mon, May 25, 2020 at 9:32 PM Gedare Bloom wrote: > >> > >> On Mon, May 25, 2020 at 5:39 AM Utkarsh Rai > wrote: >

  1   2   >