#2249 closed defect (fixed)

misaligned address exception in cpukit/librpc/src/rpc/get_myaddress.c

Reported by: Jeffrey Hill Owned by: Jeffrey Hill <johill@…>
Priority: normal Milestone: 4.11
Component: score Version: 4.10
Severity: normal Keywords: get_myaddress sun rpc
Cc: Blocked By:
Blocking:

Description

We see a misaligned address exception in cpukit/librpc/src/rpc/get_myaddress.c on nios2 architecture.

See bug report #1401 describing maybe a fix for the root cause, and that might avoid any need for the patch attached here. I am attaching this patch in a bug report only to call out attention to the need for a fix for #1401.

Note that we have also found it necessary to place an RTEMS specific patch within EPICS for this same #1401 issue.

I have attached a patch, modelled after the EPICS fix, which isn’t claimed to be optimal, minimal, carefully designed, etc but that does appear to resolve the issue here.

The cause appears to be that the individual address data structures copied into the user's buffer by the SIOCGIFCONF ioctl are not properly aligned.

Attachments (1)

ge_myaddres_patch.txt (2.6 KB) - added by Jeffrey Hill on Feb 3, 2015 at 9:49:24 PM.
one possible get_myaddress.c patch

Download all attachments as: .zip

Change History (6)

comment:1 Changed on Feb 3, 2015 at 9:44:56 PM by Jeffrey Hill

Keywords: rpc added; powerpc removed

Changed on Feb 3, 2015 at 9:49:24 PM by Jeffrey Hill

Attachment: ge_myaddres_patch.txt added

one possible get_myaddress.c patch

comment:2 Changed on Feb 23, 2015 at 3:48:15 PM by Till Straumann <strauman@…>

In 237595d86928874024c488d8e101fea4a727e9ab/rtems:

networking: alignment exception in ioctl(SIOCGIFCONF)

Access memory using a byte stream when copying to avoid unaligned
access. close #1401 update #2249

comment:3 Changed on Feb 23, 2015 at 5:07:23 PM by Jeffrey Hill <johill@…>

In 344856b8adff03b48b2e2e83417e175189ba75b5/rtems:

rpc: misaligned address exception in get_myaddress.c

updates #2249 see #1401

comment:4 Changed on Feb 23, 2015 at 5:07:46 PM by Jeffrey Hill <johill@…>

In 2fc3deae2e55fa333368af620fb11413384619a7/rtems:

rpc: misaligned address exception in get_myaddress.c

updates #2249 see #1401

comment:5 Changed on Feb 23, 2015 at 5:09:01 PM by Jeffrey Hill <johill@…>

Owner: set to Jeffrey Hill <johill@…>
Resolution: fixed
Status: newclosed

In 49ff36b8d76ad73ee7007ecdf86f355b610ce2b0/rtems:

rpc: misaligned address exception in get_myaddress.c

closes #2249 see #1401

Note: See TracTickets for help on using tickets.