Skip to contentSkip to conversation

Buffer overrun in devfreq trans_stat_show()

Bug 218041 [email protected] 1 participant 8 messages Oct 24, 2023 – Feb 22, 2024 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]/

#1 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=218041

Artem S. Tashkinov ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

          Component|Other                       |cpufreq
           Assignee|[email protected] |[email protected]
                   |sdl.org                     |
            Product|Drivers                     |Power Management
Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#2 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=218041

Artem S. Tashkinov ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #1 from Artem S. Tashkinov ([email protected]) --- Christian, could you take a look please?

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#3 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=218041

Artem S. Tashkinov ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #2 from Artem S. Tashkinov ([email protected]) --- CC'ing Chanwoo as well.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#4 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=218041

--- Comment #3 from Christian Marangi (Ansuel) ([email protected]) --- Can you describe the amount of frequency? An easy fix would be truncating the output but I don't think it would be a correct fix...

If there isn't a bug in how the char are count I feel like the only solution is moving this to debugfs where there isn't the PAGE_SIZE limit.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#5 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=218041

--- Comment #4 from [email protected] --- (In reply to Christian Marangi (Ansuel) from comment #3)

Quoted 1 line

Can you describe the amount of frequency?

There are 20 available frequencies on the Tegra 30 "Ouya" device.

$ cat /sys/class/devfreq/6000c800.actmon/available_frequencies  
12750000 25500000 27000000 51000000 54000000 102000000 108000000 204000000
266500000 333500000 375000000 400000000 416000000 450000000 500000000 533000000
625000000 667000000 750000000 800000000
Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#6 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=218041

--- Comment #5 from Christian Marangi (Ansuel) ([email protected]) --- Thanks for the report. I checked how the equivalent function for cpufreq works and as I tought it does fail the thing to write exceed PAGE_SIZE. I sent a patch upstream that fix the missing check.

sysfs stuff is ABI so moving this to debugfs is a no go (due to we don't break userspace rule) so this is the only solution currently.

If accepted, it will be queued for stable backport.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#8 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=218041

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |CODE_FIX

--- Comment #7 from [email protected] ---
Thanks.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.