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


Please enter your comment!
Please enter your name here

More from Author

Read Now

Coachella Weekend 1 Recap, J Balvin’s Out Of This World Coachella Set, Metro Boomin & Future Top Hot 100 | Billboard News

It’s Monday April 15th, Billboard counts down the top 10 on the Hot 100, we’re running down all the headliners and special guest performers and some notable audience members that went down at the first weekend of Coachella, J Balvin gives us a behind the scene...

ACKO’s game-changing campaign with Disney+ Hotstar for ICC Men’s Cricket World Cup 2023 – Exchange4media

Amidst the exhilarating atmosphere that surrounded the ICC Men's Cricket World Cup 2023, where...

China’s Economy, Propelled by Its Factories, Grew More Than Expected

The Chinese economy grew more than expected in the first three months of the year, new data shows, as China built more factories and exported huge amounts of goods to counter a severe real estate crisis and sluggish spending at home.To stimulate growth, China, the world’s...

Angel Reese Picked 7th by Sky in 2024 WNBA Draft as Fans Hype Kamilla Cardoso Pairing

Welcome to Chicago, Angel Reese. The Sky made the former LSU star the No. 7 overall selection at Monday night's WNBA draft, adding the high-profile forward to the mix alongside No. 3 overall pick Kamilla...

GM says it will move headquarters from RenCen to Hudson’s site in 2025

Detroit — General Motors Co. announced Monday it will move its global headquarters to the Hudson’s Detroit development next year as it works with billionaire mortgage mogul Dan Gilbert's real estate firm to redevelop the Renaissance Center, its current home a mile away.GM CEO Mary Barra,...

Spotify planning to launch Music Pro subscription with lossless

A recent report revealed that Spotify is planning to raise the price of its subscription soon, at least in some countries. And for those who think that paying $10.99 a month for a music streaming platform is already too much, the company may soon introduce an...

Ryan Gosling’s Viral Beavis and Butt-Head Skit Was 5 Years in the Making

People watch Saturday Night Live to laugh, of course, but there are laughs and then there are sketches that last forever. This past weekend, Ryan Gosling hosted SNL and the episode may have featured one of those all-time sketches. What starts as a discussion of AI...

Angel Reese, Caitlin Clark dazzle on WNBA draft’s orange carpet

For the top picks of the 2024 WNBA draft, what they wear could be almost as memorable as where they land.Editor's Picks1 RelatedThe latest crop of hoops prospects -- including Caitlin Clark, Angel Reese and Kamilla Cardoso -- will learn where their pro basketball careers will...

Tesla lays off more than 10% of its workforce – BBC News

By Shiona McCallumTechnology reporter15 April 2024, 13:00 BSTUpdated 1 hour agoImage source, Getty ImagesTesla will lay off more than 10% of its global electric vehicle workforce.In a memo, first reported by news website Electrek, billionaire owner Elon Musk told staff there was nothing he hated more,...

Longtime Yankees voice Sterling retires after 35-year run

The legendary radio voice of the Yankees, John Sterling, is retiring effective immediately after more than three decades in the booth, he and the team said Monday.The Yankees and Sterling made the announcement after The Athletic reported on a planned news conference for this weekend in...