Skip to content

x86asm: Generate endbr32 based on __CET__.#18353

Closed
sebastianas wants to merge 2 commits intoopenssl:masterfrom
sebastianas:cet
Closed

x86asm: Generate endbr32 based on __CET__.#18353
sebastianas wants to merge 2 commits intoopenssl:masterfrom
sebastianas:cet

Conversation

@sebastianas
Copy link
Copy Markdown
Contributor

The VIA Nehemiah CPU is a x86-32 CPU without SSE2 support. It does not
support multi byte nops and considers the endb32 opcode as an invalid
instruction.

First patch renames .s -> .S so the pre-processor picks up the ifdef and second
patch adds the ifdef to the perl script.

Fixes: #18334

Rename x86-32 assembly files from .s to .S. While processing the .S file
gcc will use the pre-processor whic will evaluate macros and ifdef. This
is turn will be used to enable the endbr32 opcode based on the __CET__
define.

Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
The VIA Nehemiah CPU is a x86-32 CPU without SSE2 support. It does not
support multi byte nops and considers the endb32 opcode as an invalid
instruction.

Add an ifdef around the endbr32 opcode on x86-32.

Fixes: openssl#18334
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
@t8m t8m added branch: master Applies to master branch approval: review pending This pull request needs review by a committer triaged: bug The issue/pr is/fixes a bug branch: 3.0 Applies to openssl-3.0 branch labels May 20, 2022
@paulidale paulidale added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels May 23, 2022
@openssl-machine openssl-machine added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels May 24, 2022
@openssl-machine
Copy link
Copy Markdown
Collaborator

This pull request is ready to merge

@paulidale
Copy link
Copy Markdown
Contributor

Merged, thanks for the fix.

@paulidale paulidale closed this May 24, 2022
openssl-machine pushed a commit that referenced this pull request May 24, 2022
Rename x86-32 assembly files from .s to .S. While processing the .S file
gcc will use the pre-processor whic will evaluate macros and ifdef. This
is turn will be used to enable the endbr32 opcode based on the __CET__
define.

Signed-off-by: Sebastian Andrzej Siewior <[email protected]>

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from #18353)

(cherry picked from commit 9968c77)
openssl-machine pushed a commit that referenced this pull request May 24, 2022
The VIA Nehemiah CPU is a x86-32 CPU without SSE2 support. It does not
support multi byte nops and considers the endb32 opcode as an invalid
instruction.

Add an ifdef around the endbr32 opcode on x86-32.

Fixes: #18334
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from #18353)

(cherry picked from commit 2721387)
openssl-machine pushed a commit that referenced this pull request May 24, 2022
Rename x86-32 assembly files from .s to .S. While processing the .S file
gcc will use the pre-processor whic will evaluate macros and ifdef. This
is turn will be used to enable the endbr32 opcode based on the __CET__
define.

Signed-off-by: Sebastian Andrzej Siewior <[email protected]>

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from #18353)
openssl-machine pushed a commit that referenced this pull request May 24, 2022
The VIA Nehemiah CPU is a x86-32 CPU without SSE2 support. It does not
support multi byte nops and considers the endb32 opcode as an invalid
instruction.

Add an ifdef around the endbr32 opcode on x86-32.

Fixes: #18334
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from #18353)
@sebastianas sebastianas deleted the cet branch February 18, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Applies to master branch branch: 3.0 Applies to openssl-3.0 branch triaged: bug The issue/pr is/fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CET breaks 32bit x86 without SSE2, affects VIA Nehemiah (openssl 3.0)

4 participants