lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0jNiq_-T9nF_-Xe7q_XMfxSbU7OzC02Y8SrhYv6XjX=Aw@mail.gmail.com>
Date:   Mon, 7 Aug 2023 19:44:50 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Nathan Chancellor <nathan@...nel.org>,
        Thomas Weißschuh <linux@...ssschuh.net>
Cc:     Huang Rui <ray.huang@....com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jannik Glueckert <jannik.glueckert@...il.com>,
        Bagas Sanjaya <bagasdotme@...il.com>,
        Linux LLVM Build Support <llvm@...ts.linux.dev>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        stable@...r.kernel.org
Subject: Re: [PATCH] cpufreq: amd-pstate: fix global sysfs attribute type

On Mon, Aug 7, 2023 at 6:06 PM Nathan Chancellor <nathan@...nel.org> wrote:
>
> Hi Thomas,
>
> On Mon, Aug 07, 2023 at 08:37:45AM +0200, Thomas Weißschuh wrote:
> > In commit 3666062b87ec ("cpufreq: amd-pstate: move to use bus_get_dev_root()")
> > the "amd_pstate" attributes where moved from a dedicated kobject to the
> > cpu root kobject.
> > While the dedicated kobject expects to contain kobj_attributes the root
> > kobject needs device_attributes.
> >
> > As the changed arguments are not used by the callbacks it works most of
> > the time.
> > However CFI will detect this issue:
> >
> > [ 4947.849350] CFI failure at dev_attr_show+0x24/0x60 (target: show_status+0x0/0x70; expected type: 0x8651b1de)
> > ...
> > [ 4947.849409] Call Trace:
> > [ 4947.849410]  <TASK>
> > [ 4947.849411]  ? __warn+0xcf/0x1c0
> > [ 4947.849414]  ? dev_attr_show+0x24/0x60
> > [ 4947.849415]  ? report_cfi_failure+0x4e/0x60
> > [ 4947.849417]  ? handle_cfi_failure+0x14c/0x1d0
> > [ 4947.849419]  ? __cfi_show_status+0x10/0x10
> > [ 4947.849420]  ? handle_bug+0x4f/0x90
> > [ 4947.849421]  ? exc_invalid_op+0x1a/0x60
> > [ 4947.849422]  ? asm_exc_invalid_op+0x1a/0x20
> > [ 4947.849424]  ? __cfi_show_status+0x10/0x10
> > [ 4947.849425]  ? dev_attr_show+0x24/0x60
> > [ 4947.849426]  sysfs_kf_seq_show+0xa6/0x110
> > [ 4947.849433]  seq_read_iter+0x16c/0x4b0
> > [ 4947.849436]  vfs_read+0x272/0x2d0
> > [ 4947.849438]  ksys_read+0x72/0xe0
> > [ 4947.849439]  do_syscall_64+0x76/0xb0
> > [ 4947.849440]  ? do_user_addr_fault+0x252/0x650
> > [ 4947.849442]  ? exc_page_fault+0x7a/0x1b0
> > [ 4947.849443]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
> >
> > Reported-by: Jannik Glückert <jannik.glueckert@...il.com>
> > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217765
> > Link: https://lore.kernel.org/lkml/c7f1bf9b-b183-bf6e-1cbb-d43f72494083@gmail.com/
> > Fixes: 3666062b87ec ("cpufreq: amd-pstate: move to use bus_get_dev_root()")
> > Cc: stable@...r.kernel.org
> > Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
>
> Thanks a lot for the quick patch! Unfortunately, it seems like neither
> of my AMD machines support amd-pstate so I can't test this but it seems
> like the right fix to me.
>
> Reviewed-by: Nathan Chancellor <nathan@...nel.org>

Applied as 6.5-rc material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ