Note, LLMs are very good at finding suspect “security issues” in kernel code these days. But even with the best of the current and next generation tools, at least 1/3 of the results they generate are flat out wrong or harmful. So, if you think your LLM-found/fixed issue in a drivers/staging/ file is really valid, it’s fine to submit it BUT you must have first tested it on the actual hardware for the driver, and described how you have done so, in order for us to be willing to take the change.

  • NotSteve_@lemmy.ca
    link
    fedilink
    arrow-up
    45
    ·
    2 days ago

    Nice, I can get behind that policy. LLMs can be useful but only if you assume the output is wrong until proven correct. Using it to find potential threads to pull at makes sense to me but not blindly trusting everything it points out

    • Hirom@beehaw.org
      link
      fedilink
      arrow-up
      17
      ·
      2 days ago

      Actually proving that C code is correct is not easy.

      Having a human developer manually write code that is less harmful/wrong, and doesn’t require proof, is probably easier.

      • LurkingLuddite@piefed.social
        link
        fedilink
        English
        arrow-up
        7
        ·
        2 days ago

        Except a good programmer will have proof, in the form of at minimum manual tests that exercise the exact issue. A good programmer will have automated tests that clearly assert the behavior in question.

        It genuinely boggles my mind when people whine about having to prove what the AI said… THEY SHOULD’VE BEEN DOING THAT THE WHOLE FUCKING TIME in their entire career!

        • Miaou@jlai.lu
          link
          fedilink
          arrow-up
          3
          ·
          13 hours ago

          No one proves their code is correct except in extremely niche cases. No idea what you’re talking about.

          • harmbugler@piefed.social
            link
            fedilink
            English
            arrow-up
            4
            ·
            13 hours ago

            Maybe think of test driven development not like proving the code is correct, but failing to prove it’s broken.

        • Hirom@beehaw.org
          link
          fedilink
          arrow-up
          19
          ·
          edit-2
          2 days ago

          We’re talking about different kind of proofs.

          Proving a program is correct requires a formal specification and a formal verification with mathematics and/or formal methods. ie proving the behavior and result perfectly match specification for all possible inputs.

          A test only proves that a program 1) returns the expected output for a specific input, or limited set of inputs, and 2) appears to behave correctly, ie there may be undefined behaviour but they don’t cause an immediate crash.

          • LurkingLuddite@piefed.social
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 day ago

            lol no. Absolutely no. In any way. Ever. A bug either works or it doesn’t. The fact you think I’m talking about something else means you are already cooked, utterly and completely. Sad.

            • psud@aussie.zone
              link
              fedilink
              English
              arrow-up
              4
              ·
              18 hours ago

              So you prove you fixed the bug. How do you test to prove you didn’t introduce another?