[lkml]   [2000]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] alignment issue with ipchains
Hi David, 

I'd like to explain my point clearly. My point is that accessing with
get_user as int is questionable. In my case, it's string. I don't
think all the string argment to the kernel should be aligned.

David S. Miller wrote:
> Why not make sure in the user tools that the argument is properly
> aligned to 4 bytes?

Because (I think) it's not needed by the interface definition.

> I would really like to see specific examples of the failure before I
> consider this issue further.

OK, here's example (I'm talking about ipchains 1.3.8 or 9):

# ipchains -F input

Here, on SuperH, the string of command line argument "input" is not
aligned to 4-byte boundary. The argument to main argv ("input") goes
through the setsockopt.

main --> flush_entries --> libipfwc.c:ipfwc_flush_entries
--> do_setsockopt --> setsockopt

For the optname IP_FW_APPEND...IP_FW_MASQ_CTL, the type of the value
is not integer but string. Accessing as int is rather violent.

I guess that on Sparc or Alpha the command line argument string is
4-byte aligned.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.583 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site