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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 26 Nov 2020 22:45:37 +0800
From:   Chen Yu <yu.c.chen@...el.com>
To:     Kai-Heng Feng <kai.heng.feng@...onical.com>
Cc:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Len Brown <len.brown@...el.com>,
        Tony Nguyen <anthony.l.nguyen@...el.com>,
        Jesse Brandeburg <jesse.brandeburg@...el.com>,
        "moderated list:INTEL ETHERNET DRIVERS" 
        <intel-wired-lan@...ts.osuosl.org>,
        Linux PM list <linux-pm@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        Sasha Neftin <sasha.neftin@...el.com>,
        Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Subject: Re: [PATCH] e1000e: Assign DPM_FLAG_SMART_SUSPEND and
 DPM_FLAG_MAY_SKIP_RESUME to speed up s2ram

On Thu, Nov 26, 2020 at 08:05:02PM +0800, Kai-Heng Feng wrote:
> 
> 
> > On Nov 26, 2020, at 19:10, Chen Yu <yu.c.chen@...el.com> wrote:
> > 
> > On Thu, Nov 26, 2020 at 02:36:42PM +0800, Kai-Heng Feng wrote:
> >>>> 
> >>>> What about plugging ethernet cable and using WoL after system is suspended?
> >>>> Commit "e1000e: Exclude device from suspend direct complete optimization" was to address that scenario.
> > [cut]
> >> 
> >> I don't think this is right.
> >> Isn't E1000_WUFC_LNKC already set for runtime suspend?
> >> What if WoL doesn't have it set?
> >> 
> > After re-taking a look at your description, please let me elaborate more about the scenario.
> > With this patch applied, and with sysfs wake up disabled, the expected behavior is:
> > 
> > 1. If NIC is not runtime suspended:
> > 1.1 s2ram suspend -> wufc will be set to 0(no WoL settings), suspend(), suspend_late(), suspend_noirq()
> > 1.2 s2ram resume  -> NIC resumes normaly
> > 
> > 2. If NIC is runtime suspended:
> > 2.1 s2ram suspend -> wufc set to E1000_WUFC_LNKC, skip the subsequent suspend callbacks.
> 
> Is it safe to keep E1000_WUFC_LNKC enabled here?
> 
> From commit 6bf6be1127f7 ("e1000e: Do not wake up the system via WOL if device wakeup is disabled"):
> 
>        /* Runtime suspend should only enable wakeup for link changes */
>        if (runtime)
>                wufc = E1000_WUFC_LNKC;
>        else if (device_may_wakeup(&pdev->dev))
>                wufc = adapter->wol;
>        else
>                wufc = 0;
> 
> So it has different wakeup settings for runtime suspend and system suspend, either device_may_wakeup() true or false.
Right.
> Or maybe e1000e devs can confirm E1000_WUFC_LNKC is a safe for system suspend?
>
Does 'safe' here mean waking up the system?
For s2ram, whether the NIC can wake up the system from S3 via cable plug is platform
(BIOS) specific. So the wufc settings here is not directly related to system wake up
via plug event.
thanks,
Chenyu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ