Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Uncategorized
  3. I guess people are just going to keep discovering that you can't really make a C compiler do constant time

I guess people are just going to keep discovering that you can't really make a C compiler do constant time

Scheduled Pinned Locked Moved Uncategorized
31 Posts 14 Posters 66 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • John RegehrR This user is from outside of this forum
    John RegehrR This user is from outside of this forum
    John Regehr
    wrote last edited by
    #8

    @rygorous sure, and the right answer is to figure out real solutions (as seems to be happening in LLVM, for constant time), not complaining about the optimizer

    1 Reply Last reply
    0
    • John RegehrR This user is from outside of this forum
      John RegehrR This user is from outside of this forum
      John Regehr
      wrote last edited by
      #9

      @rygorous don't worry the LLMs will do this asm rewriting for us

      1 Reply Last reply
      0
      • Per VognsenP This user is from outside of this forum
        Per VognsenP This user is from outside of this forum
        Per Vognsen
        wrote last edited by
        #10

        @rygorous @regehr Regarding diffing, the thread I had with John the other day got me thinking about using FileCheck for that kind of thing and I want to try it out, but I suspect the problem is that it's either too loose or too strict in terms of the matching depending on how many matches you specify, across compilers. Either way, too much work on maintain.

        1 Reply Last reply
        0
        • John RegehrR John Regehr

          "Can it be fair to require the average programmer to understand inline assembly, or any of these other inherently obtuse obfuscation techniques?"

          can it be fair for the average programmer (if they don't understand this stuff) to just not write code where timing channels matter? who even writes these articles

          David BeazleyD This user is from outside of this forum
          David BeazleyD This user is from outside of this forum
          David Beazley
          wrote last edited by
          #11

          @regehr What about fractions?

          ROTOPE~1 ⭐️R 1 Reply Last reply
          0
          • David BeazleyD David Beazley

            @regehr What about fractions?

            ROTOPE~1 ⭐️R This user is from outside of this forum
            ROTOPE~1 ⭐️R This user is from outside of this forum
            ROTOPE~1 ⭐️
            wrote last edited by
            #12

            @dabeaz 🐸

            1 Reply Last reply
            0
            • DougallD This user is from outside of this forum
              DougallD This user is from outside of this forum
              Dougall
              wrote last edited by
              #13

              @rygorous @regehr And ABI-related bugs can be much more insidious than I once thought, since they're not guaranteed to actually crash as one might expect. They can just lurk there as vulnerabilities, potentially causing crashes in totally unrelated code:

              https://randomascii.wordpress.com/2022/11/21/please-restore-our-registers-when-youre-done-with-them/

              1 Reply Last reply
              0
              • John RegehrR John Regehr

                "Can it be fair to require the average programmer to understand inline assembly, or any of these other inherently obtuse obfuscation techniques?"

                can it be fair for the average programmer (if they don't understand this stuff) to just not write code where timing channels matter? who even writes these articles

                SiguzaS This user is from outside of this forum
                SiguzaS This user is from outside of this forum
                Siguza
                wrote last edited by
                #14

                @regehr even the best programmers in the world struggle with this kind of stuff, ffs...

                1 Reply Last reply
                0
                • Per VognsenP This user is from outside of this forum
                  Per VognsenP This user is from outside of this forum
                  Per Vognsen
                  wrote last edited by
                  #15

                  @rygorous @regehr Petition to rename to -fun-math.

                  1 Reply Last reply
                  0
                  • Per VognsenP This user is from outside of this forum
                    Per VognsenP This user is from outside of this forum
                    Per Vognsen
                    wrote last edited by
                    #16

                    @rygorous @regehr -fhonor-yahweh -fhonor-buddha -fhonor-brahma just to be safe. You need all the help you can get with -ffast-math.

                    1 Reply Last reply
                    0
                    • John RegehrR This user is from outside of this forum
                      John RegehrR This user is from outside of this forum
                      John Regehr
                      wrote last edited by
                      #17

                      @rygorous

                      well, if the problems are important enough, something like this:

                      https://discourse.llvm.org/t/rfc-constant-time-coding-support/87781

                      1 Reply Last reply
                      0
                      • John RegehrR John Regehr

                        I guess people are just going to keep discovering that you can't really make a C compiler do constant time

                        https://www.theregister.com/2026/02/09/compilers_undermine_encryption/

                        kaoudisK This user is from outside of this forum
                        kaoudisK This user is from outside of this forum
                        kaoudis
                        wrote last edited by
                        #18

                        @regehr all I will say to that is eyup

                        John RegehrR 1 Reply Last reply
                        0
                        • John RegehrR This user is from outside of this forum
                          John RegehrR This user is from outside of this forum
                          John Regehr
                          wrote last edited by
                          #19

                          @rygorous @pervognsen aw, look at all the little nans and infs flying and being free!!!

                          Per VognsenP 1 Reply Last reply
                          0
                          • kaoudisK kaoudis

                            @regehr all I will say to that is eyup

                            John RegehrR This user is from outside of this forum
                            John RegehrR This user is from outside of this forum
                            John Regehr
                            wrote last edited by
                            #20

                            @kaoudis I've not been paying too much attention to the LLVM effort-- anything interesting going on there? or should I just dig into the discourse?

                            kaoudisK 1 Reply Last reply
                            0
                            • John RegehrR John Regehr

                              @rygorous @pervognsen aw, look at all the little nans and infs flying and being free!!!

                              Per VognsenP This user is from outside of this forum
                              Per VognsenP This user is from outside of this forum
                              Per Vognsen
                              wrote last edited by
                              #21

                              @regehr @rygorous My first thought was, if this is meant for the far future, assuming they retain our current warning symbol for radiation seems a bit hopeful.

                              1 Reply Last reply
                              0
                              • John RegehrR John Regehr

                                @kaoudis I've not been paying too much attention to the LLVM effort-- anything interesting going on there? or should I just dig into the discourse?

                                kaoudisK This user is from outside of this forum
                                kaoudisK This user is from outside of this forum
                                kaoudis
                                wrote last edited by
                                #22

                                @regehr I think* @wizardengineer landed the first bits of that work!

                                *I left trail of bits voluntarily (and for reasons unrelated) a bit before this happened though

                                John RegehrR 1 Reply Last reply
                                0
                                • Janne MorenJ This user is from outside of this forum
                                  Janne MorenJ This user is from outside of this forum
                                  Janne Moren
                                  wrote last edited by
                                  #23

                                  @rygorous @regehr
                                  Rename to -ffast-bad-math perhaps?

                                  1 Reply Last reply
                                  0
                                  • kaoudisK kaoudis

                                    @regehr I think* @wizardengineer landed the first bits of that work!

                                    *I left trail of bits voluntarily (and for reasons unrelated) a bit before this happened though

                                    John RegehrR This user is from outside of this forum
                                    John RegehrR This user is from outside of this forum
                                    John Regehr
                                    wrote last edited by
                                    #24

                                    @kaoudis @wizardengineer ah! I don't think I knew that. where are you at right now?

                                    kaoudisK 1 Reply Last reply
                                    0
                                    • Janne MorenJ This user is from outside of this forum
                                      Janne MorenJ This user is from outside of this forum
                                      Janne Moren
                                      wrote last edited by
                                      #25

                                      @rygorous @regehr
                                      -flooks-like-math-if-you-squint

                                      1 Reply Last reply
                                      0
                                      • John RegehrR John Regehr

                                        I guess people are just going to keep discovering that you can't really make a C compiler do constant time

                                        https://www.theregister.com/2026/02/09/compilers_undermine_encryption/

                                        William D. JonesC This user is from outside of this forum
                                        William D. JonesC This user is from outside of this forum
                                        William D. Jones
                                        wrote last edited by
                                        #26

                                        @regehr Maybe it's time to write new assemblers that complement NASM*.

                                        * Or MASM; I wish NASM had an invoke keyword, like MASM, to abstract away calling conventions. Rather than writing a macro for it.

                                        1 Reply Last reply
                                        0
                                        • Andy GockeA This user is from outside of this forum
                                          Andy GockeA This user is from outside of this forum
                                          Andy Gocke
                                          wrote last edited by
                                          #27

                                          @rygorous @regehr We've had a hell of a time with our macos ARM64 ASM. Last ~3 ld64 updates have all had reloc problems

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          Powered by NodeBB Contributors
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups