Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-33435

RISC-V RDCYCLE cannot be accessed from userland

Details

    Description

      Starting with Linux kernel 6.6, the RDCYCLE instruction for RISC-V cannot be used with userland:

      https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cc4c07c89aada16229084eeb93895c95b7eabaa3

      We use this in `my_rdtsc.h` for RISC-V platforms, which means this code does not work any more.

      Instead we should use RDTIME, which while less accurate has the advantage of being synchronized between CPU (and thus monotonic) and of constant frequency. This exists in earlier kernel versions too, so will not break backwards compatibility.

      Attachments

        Issue Links

          Activity

            Earliest affected release is 10.8, 10.11 is the first release that isn't EoL.

            TheLinuxJedi Andrew Hutchings (Inactive) added a comment - Earliest affected release is 10.8, 10.11 is the first release that isn't EoL.
            danblack Daniel Black added a comment - - edited

            Thanks Aurelien Jarno for the fix (656f8867720efc1b4dd0969319f35a3e1a2a005e).

            danblack Daniel Black added a comment - - edited Thanks Aurelien Jarno for the fix (656f8867720efc1b4dd0969319f35a3e1a2a005e).

            People

              TheLinuxJedi Andrew Hutchings (Inactive)
              TheLinuxJedi Andrew Hutchings (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.