Re: [PATCH nf] netfilter: nf_tables: fix missmatch in big-endian system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9 March 2017 at 13:46, Liping Zhang <zlpnobody@xxxxxxxxx> wrote:
>>
>> Any chance the compiler detects the double assignment and removes the first one?
>
> This will never happen, since these two assignment statements are not identical.

But perhaps the compiler can look beyond the high level statement? a
present or future compiler may detect (at low level) that you are
indeed writing the very same piece of memory twice in a row.

The kernel sources has 'memzero_explicit' [0] but it seems to use
'volatile' which perhaps isn't useful either [1].

Anyway, I was simply curious.

[0] http://lxr.free-electrons.com/source/lib/string.c#L679
[1] http://www.daemonology.net/blog/2014-09-04-how-to-zero-a-buffer.html
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux