Skip to content

Commit

Permalink
tile: handle __ro_after_init like parisc does
Browse files Browse the repository at this point in the history
The tile architecture already marks RO_DATA as read-only in
the kernel, so grouping RO_AFTER_INIT_DATA with RO_DATA, as is
done by default, means the kernel faults in init when it tries
to write to RO_AFTER_INIT_DATA.  For now, just arrange that
__ro_after_init is handled like __write_once, i.e. __read_mostly.

Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: Chris Metcalf <[email protected]>
  • Loading branch information
cmetcalf-tilera committed Nov 14, 2016
1 parent bc33b0c commit e123386
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/tile/include/asm/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,7 @@
*/
#define __write_once __read_mostly

/* __ro_after_init is the generic name for the tile arch __write_once. */
#define __ro_after_init __read_mostly

#endif /* _ASM_TILE_CACHE_H */

0 comments on commit e123386

Please sign in to comment.