04/02/25 15:24, Тигран Согомонян пишет:
27/12/24 18:16, Richard Henderson пишет:
On 12/27/24 02:46, Tigran Sogomonian wrote:
1 << i is casted to uint64_t while bitwise and with val.
So this value may become 0x8000 but only
31th "start" bit is required.
Use the
27/12/24 18:16, Richard Henderson пишет:
On 12/27/24 02:46, Tigran Sogomonian wrote:
1 << i is casted to uint64_t while bitwise and with val.
So this value may become 0x8000 but only
31th "start" bit is required.
Use the bitfield extract() API instead.
Again, I < 32. There is no o
27/12/24 18:16, Richard Henderson пишет:
On 12/27/24 02:46, Tigran Sogomonian wrote:
1 << i is casted to uint64_t while bitwise and with val.
So this value may become 0x8000 but only
31th "start" bit is required.
Use the bitfield extract() API instead.
Again, I < 32. There is no o
27/12/24 01:49, Alex Bennée пишет:
Tigran Sogomonian writes:
s->buswidth = nand_flash_ids[s->chip_id].width >> 3;
<= 16 >> 3 <= 2.
x <= s->ioaddr[offset] << (s->buswidth << 3)
<= max_uint8_t << 16
With x << 24 overflow is possible.
Other cases are similar.
Thus, need to cast return value to ui