HomeTechnologyFed-up Torvalds suggests disabling...

Fed-up Torvalds suggests disabling AMD’s ‘stupid’ performance-killing fTPM RNG


Ongoing issues with Linux and AMD’s fTPM – the chip designer’s firmware-based TPM – appear to be wearing on kernel overseer Linus Torvalds’ nerves, who has suggested switching off the module’s random number generator altogether.

“Let’s just disable the stupid fTPM hwrnd thing,” Torvalds said on the open source kernel’s development mailing list. “Maybe use it for the boot-time ‘gather entropy from different sources,’ but clearly it should not be used at runtime.”

TPMs, whether they’re firmware or hardware based, are used to securely create and store cryptographic keys, certificates, and passwords. The modules also, among things, generate random numbers for software to use.

In the case of AMD’s fTPM, the module can cause intermittent stuttering, depending on which Ryzen processor you’re using. It appeared when the fTPM was in use, it would access its flash storage via a serial interface, and when doing so, held up activity by the rest of the system. If the fTPM was used frequently, such as by software to generate streams of random numbers, the end result to users on affected systems was spluttering performance.

As AMD put it in a knowledge base entry from last year, “select AMD Ryzen system configurations may intermittently perform extended fTPM-related memory transactions in SPI flash memory (‘SPIROM’) located on the motherboard, which can lead to temporary pauses in system interactivity or responsiveness until the transaction is concluded.”

The problem cropped up on PCs powered by Microsoft Windows, and was resolved in a BIOS update that fixed the fTPM to ensure it behaved better. The issue also impacted Linux, and while it appeared that a kernel-level patch had resolved the bug, the slowdown has cropped up again, attracting Torvalds’ ire.

As we understand it, that kernel patch from February attempted to identify whether the PC was using a buggy version of AMD’s fTPM and disabled the random number generator if so. The justification being that not everyone has installed the necessary BIOS update or can install it, as they’re relying on motherboard makers to distribute the fix.

Fast forward to this month, and it seemed the patch doesn’t catch all iterations of the buggy firmware, or that the firmware isn’t completely fixed, so for some users, the stuttering persists. Hence the kernel chief’s suggestion to just disable the fTPM’s number generator regardless of version.

Torvalds’ argument is fairly straightforward and amounts to: if fTPM is causing so many problems, why not just use the processor’s rdrand instruction to offer random numbers instead. At best the fTPM could be used during system startup to provide entropy to the kernel’s random number generation service, where uneven performance may not be that annoying, but during normal use, the fTPM is not to be used as a random number source, he suggested.

“Why would anybody use that crud when any machine that has it supposedly fixed — which apparently didn’t turn out to be true after all — would also have the CPU rdrand instruction that doesn’t have the problem,” Torvalds wrote. “I don’t see any downside to just saying that fTPM thing is not working. Even if it ends up working in the future, there are alternatives that aren’t any worse.”

Torvalds acknowledged that rdrand can be slow, but compared to the stuttering users are seeing as a result of the fTPM, it would seem to be the better alternative. “So rdrand — and rdseed in particular — can be rather slow, but I think we’re talking hundreds of CPU cycles — maybe low thousands. Nothing like the stuttering reports we’ve seen from fTPM,” he wrote.

The actual cause of the bug isn’t clear at this point, though Torvalds offered a few theories as to what could be going on.

“I can easily imagine a BIOS fTPM code using some absolutely horrid global EFI synchronization lock or whatever, which could then cause random problems just based on some entirely unrelated activity,” he wrote. “I would not be surprised, for example, if [it] wasn’t the fTPM hwrnd code itself that decided to read some random number from SPI, but that it simply got serialized with something else that the BIOS was involved with.”

“It’s not like BIOS people are famous for their scalable code that is entirely parallel,” he added.

You can find Torvalds’ full comments here.

The Register reached out to AMD for comment on the issue and to get a better idea of the consequences associated with disabling the fTPM’s random number generator.

fTPM can be toggled off within the BIOS, however doing so can limit the functionality of the system, particularly with regard to hardware encryption and security. With that said, the TPM’s functionality is likely more relevant to users of Windows 11. Regardless of whether they actually use any services that rely on the TPM, Redmond’s latest operating system does technically require it.

AMD has previously suggested using a physical TPM module as an alternative to the firmware TPM used by many motherboards. You’ll want to disable any encryption that relies on the TPM first, of course, and you’ll also need a motherboard that has the appropriate header to accept such a module, which isn’t guaranteed. ®



Source link

Most Popular

LEAVE A REPLY

Please enter your comment!
Please enter your name here

More from Author

Read Now

The Second G.O.P. Debate: Republicans Scramble for Airtime as Second Debate Kicks Off

Seven Republican presidential hopefuls not named Donald J. Trump will gather on Wednesday at the Ronald Reagan Presidential Library in Simi Valley, Calif., with the pressing task of securing second place in the Republican Party’s nominating race — and the ultimate mission of actually challenging the...

SAG-AFTRA & Studios To Meet Monday – Update

NDZ/Star Max/GC Images UPDATED with day confirmed: As Deadline first told you yesterday, SAG-AFTRA and the AMPTP are meeting next week. The actors guild and the studio reps released a joint statement Wednesday evening saying that both sides are coming back to the table on Monday, October...

Will Aaron Rodgers show up for Sunday night’s Chiefs-Jets game?

Jets quarterback Aaron Rodgers hasn’t attended one of his team’s...

Why Sharon Osbourne Warns Against Ozempic After She Lost 42 Pounds – E! Online

Ozempic is no laughing matter for the comedian. Handler revealed her "anti-aging doctor" prescribed her the medication without realizing what the drug was. "I didn't even know I was on it," she said during the Jan. 25, 2023 episode of Call Her Daddy. "She said, 'If you ever...

PlayStation Boss Jim Ryan Is Retiring From Sony in March

Jim Ryan, chief executive officer of Sony Interactive Entertainment, is stepping down after almost 30 years with the company.The boss of Sony’s lucrative PlayStation video-game unit will retire in March 2024, the company said Wednesday in a statementBloomberg Terminal. He joined Sony in 1994, just before...

PlayStation leader Jim Ryan to retire after 28 years with Sony

Jim Ryan, the head of PlayStation and CEO of Sony, is stepping down. In a press release on Wednesday, Sony announced that Ryan will retire in March 2024, while Sony Group Corporation president and chief operating officer Hiroki Totoki will become the interim CEO of Sony...

Saleh, players OK with Rodgers calling out Jets

Rich CiminiESPN Staff WriterSep 27, 2023, 05:49 PM ET3 Minute ReadFLORHAM PARK, N.J. -- New York Jets coach Robert Saleh and key veteran leaders had no problem with injured quarterback Aaron Rodgers -- in absentia -- calling out the team for its sideline squabbles. They agreed...

NFL Injuries Week 4: Tracking Every Injury, Including the Latest on Jaylen Waddle, Austin Ekeler, David Montgomery, and Christian Watson

Injuries are an unfortunate reality of NFL life, but everyone who follows the league — fantasy football players, sports bettors, and fans of teams — wants the latest health information. In that vein, we’re tracking every NFL injury ahead of Week 4. Let’s review the injury report...

MTG and Boebert Try to Out-Troll Each Other Days Away From a Shutdown

With a government shutdown four days away, thanks largely to House Republicans’ inability to stop fighting amongst themselves, far-right Reps. Marjorie Taylor Greene and Lauren Boebert thought it important to focus on their pet grievances on Wednesday. Greene successfully used the Holman rule to attach an...

Lina Khan vs. Jeff Bezos: This Is Big Tech’s Real Cage Match

Jeff Bezos made his fortune with one truly big idea: What if a retailer did everything possible to make customers happy?His forcefully nurtured creation, Amazon, sold as many items as possible as cheaply as possible and delivered them as quickly as possible. The result is that...